You are not logged in.
Pages: 1
I found the relevant command (bash script)f or cycle between Icon
#!/bin/bash
case $(xfconf-query -c thunar -p /last-view) in
ThunarIconView) xdotool key Ctrl+2 ;;
ThunarDetailsView) xdotool key Ctrl+3 ;;
ThunarCompactView) xdotool key Ctrl+1 ;;
esac
But it is not executed properly, only the last line is executed " ThunarCompactView) xdotool key Ctrl+1 ;;"
Don't work icon view and details view
Does anyone know where the problem comes from?
Thanks
Offline
If "Remember view settings for each folder" is selected, then that xfconf property isn't use. Thunar grabs the view settings from the folder's metdata:
gio info FODLERNAME | grep thunar-view-type
That xfconf property then serves as the default view as specified in the Preferences dialog.
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
Thank you for reply
gio info FODLERNAME | grep thunar-view-type
.
Where should I replace this command?
I'm the beginner user.
How should I change the above script to work properly?
Last edited by Xfcelan06 (2021-09-27 06:21:47)
Offline
Try this:
#!/bin/bash
# $1 is %f in UCA
LAST=$(gio info "$1" | grep thunar-view-type | awk '{print $2}')
if [ -z "$LAST" ]; then
LAST=$(xfconf-query -c thunar -p /last-view)
fi
case $LAST in
ThunarIconView) xdotool key Ctrl+2 ;;
ThunarDetailsView) xdotool key Ctrl+3 ;;
ThunarCompactView) xdotool key Ctrl+1 ;;
esac
On the Appearance tab, you need to select only "Directories".
There is one issue though, it won't change the view if you click on a sub-folder in thunar (e.g. the Documents folder when viewing your home directory) - it will only work if you click on the background in the thunar view for the current folder in thunar. Unfortunately, there is no way to work around this.
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
Thank you
It works very well
Offline
Pages: 1
[ Generated in 0.011 seconds, 8 queries executed - Memory usage: 545.95 KiB (Peak: 546.8 KiB) ]