Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 12328  / 2 Years ago, sat, april 30, 2022, 1:09:36

Are there any command line options that can launch Thunar with different display options for that instance?



I sometimes want Thunar to use the directory tree sidebar view instead of the usual shortcuts view. Is there an option I could use so I can create a launcher for each view?



man thunar and thunar --help weren't helpful in this regard.


More From » xubuntu

 Answers
4

Thunar & command line


Like you, I could not find any direct command to open a new window in either treeview or shortcuts (left) pane. I doubt if they are available.


There is however a workaround, but I don't know if you want it to be "pure", or if your goal is mainly to make it functional via command line, so that you can make a starter. If the last is the case, there is a pretty straightforward solution in xdotool.


Using xdotool to create a command


The side pane view in Thunar is set by key combinations. You can simulate these key combinations with xdotool in a command. xdotool is not installed by default, so you have to install it first:


sudo apt-get install xdotool

To generate a working command which you can use in a starter, you need to know that the key combinations to set the tree/shortcut view are:


ctrl+e
ctrl+b

The command to open a new Thunar window in tree view:


thunar; xdotool key ctrl+b; xdotool key ctrl+e

enter image description here


or shortcut view:


thunar; xdotool key ctrl+e; xdotool key ctrl+b

enter image description here


To make a double xdotool command seems odd, but that is necessary to prevent Thunar from cycling through the options, and hide the side pane.


if you want the window to open in a specific directory; add the directory to the command:


thunar /path; xdotool key ctrl+e; xdotool key ctrl+b

Other Thunar options


No need to say that you can use other options in Thunar in a similar way, just look at the key combination(s) after the menu options.


[#26073] Saturday, April 30, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atetamme

Total Points: 11
Total Questions: 121
Total Answers: 109

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;