Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-03-20 06:59:50

bimlas
Member
Registered: 2020-03-20
Posts: 14
Website

Thunar: Change directory by custom action

Dear all,

Can I change the current directory in Thunar with a custom action? I would like to use Rofi to specify the current directory. The video below shows how to open files with it, but if I could change the Thunar directory in a custom action, I could easily jump to different points in the file system.

https://www.youtube.com/watch?v=Oks3p_R54IU

I tried these solutions. Replace ROFI_CMD with this, I don't want to complicate the example unnecessarily.

locate /home /media | rofi -threads 0 -font 'mono 10' -width 100 -dmenu -i -p 'locate'

Simply change directory

cd "$(ROFI_CMD)"

Does not work because it only changes the shell directory, not Thunar.

Open a new Thunar and close the current

thunar "$(ROFI_CMD)"; thunar --quit

The --quit option closes the current Thunar instance, but closes any other instance that is open from it.

Open a new Thunar with nohup and close the current

nohup thunar "$(ROFI_CMD)" &> /dev/null; thunar --quit

This solution is almost perfect because I can switch between directories, but when I open a file instead of a directory, Thunar closes and I have to reopen it to browse the files. I could add basaname to the ROFI_CMD, but it still seems like a hacky solution.

So my question is: can I change the current Thunar directory from custom action?

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 513.27 KiB (Peak: 520.66 KiB) ]