You are not logged in.
Hello-
I would like to make a shortcut for switching between Show Thumnails Always / Never on thunar.
I know Alt+e > e takes me to the Preferences, but looking for something more straightforward, if it was possible.
Any idea?
Thanks a lot.
Last edited by Laurentius (2018-09-19 17:50:52)
Offline
Try this script and assign it to a shortcut key:
#!/bin//bash
CURRENT=$(xfconf-query -c thunar -p /misc-thumbnail-mode)
echo $CURRENT
case $CURRENT in
THUNAR_THUMBNAIL_MODE_NEVER)
NEW=THUNAR_THUMBNAIL_MODE_ALWAYS
;;
THUNAR_THUMBNAIL_MODE_ALWAYS)
NEW=THUNAR_THUMBNAIL_MODE_NEVER
;;
THUNAR_THUMBNAIL_MODE_ONLY_LOCAL)
NEW=THUNAR_THUMBNAIL_MODE_ALWAYS
;;
*) ;;
esac
xfconf-query -c thunar -p /misc-thumbnail-mode -s $NEW
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
Thanks Toz!.
It works!
One more question:
Would it be possible to add a line to the script for refreshing thunar, so that the changes are immediately visible?
Currently, I press F5 to make changes visible on the thunar window i am working on.
But it would be great if I could add that to the end of the script for it to apply automatically.
Thanks again.
Last edited by Laurentius (2018-09-19 15:17:46)
Offline
Yes.
#!/bin//bash
CURRENT=$(xfconf-query -c thunar -p /misc-thumbnail-mode)
echo $CURRENT
case $CURRENT in
THUNAR_THUMBNAIL_MODE_NEVER)
NEW=THUNAR_THUMBNAIL_MODE_ALWAYS
;;
THUNAR_THUMBNAIL_MODE_ALWAYS)
NEW=THUNAR_THUMBNAIL_MODE_NEVER
;;
THUNAR_THUMBNAIL_MODE_ONLY_LOCAL)
NEW=THUNAR_THUMBNAIL_MODE_ALWAYS
;;
*) ;;
esac
xfconf-query -c thunar -p /misc-thumbnail-mode -s $NEW
sleep .5 && xdotool key F5
It requires xdotool and the thunar window must be the active window (the xdotool command sends F5 to the active window).
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
Oh yes!
Thank you.
Long life to xfce!
Offline
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 534.15 KiB (Peak: 534.99 KiB) ]