You are not logged in.
Pages: 1
Hi,
Is it possible to avoid multiple windows in thunar if there is already another one showing the same location?
For example if I download something I choose open file location ,a window pops up showing the downloads.
Now if I choose to open file location again a new window will be created
I'd prefer showing the previous window instead of opening a new one.
Is there a setting,script,plugin or something ??
Offline
Hello and welcome.
Try this (I think I got most of the use cases - some outside ones still exist). Create the file as /usr/local/bin/thunar with the following content:
#!/bin/bash
if [ "$#" -lt 2 ]; then
if [ "$#" -eq 1 ]; then
LAS="$(basename $1) "
else
LAS="$(basename $PWD) "
fi
LOC=$(wmctrl -lx | grep "Thunar.Thunar" | grep -i thunar | grep -i "$LAS" | head -1)
if [ "$LOC" != "" ]; then
WIN=$(wmctrl -lx | grep "Thunar.Thunar" | grep -i "$LAS" | grep -i thunar | head -1 | awk '{print $1}')
wmctrl -i -a "$WIN"
else
/usr/bin/thunar $@
fi
else
/usr/bin/thunar $@
fi
exit 0
...and make the file executable. Requires wmctrl.
Note: doesn't work with exo-open - you must use the Thunar menu items.
Edit: typo
Last edited by ToZ (2018-11-12 03:11:02)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Pages: 1
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 522.98 KiB (Peak: 531.93 KiB) ]