You are not logged in.
Pages: 1
Windows file explorer can run commands from location bar (the place where the path to the current folder is written in and can be changed to go to the different path)
I usually type the starting of the name of the folder, hit enter to go open it, then inside, I hit ctrl + L to give focus to the location bar, then I can write `cmd .` or `code .` to run a command easily
the only closer thing I can think of in Thunar was to bind a key binding for opening terminal in the current folder (which can behave not in the expected way since argument can either take the folder, or the highlighted folder in that folder if we have a selection). to run a simple command, I have to open a terminal and close it and even worse if it has to keep terminal open, I have to have it as a window.
then how to identify whether it's a command or path question appears. well just like in the run interface, use a match or prefix. I mean, can a path start with a `>` anyways?
so yeah. one thing I miss from windows is being able to run commands from file explorer. maybe it's `.` like `~` being not expanded in keyboard commands as well but anyways,
I want to write a command with ctrl + L in Thunar's location/path bar and expect it to be run
Last edited by va9iff (2024-05-17 21:08:32)
Offline
What version of thunar are you running. It works for me if I type in, for example:
/usr/bin/xfce4-terminal
...and press enter in the location widget. It seems I need to type in the full path to the executable into the location bar for it to execute.
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
that's actually not a big problem for me. I always have a drop-down terminal. the reason that I cared about running it from Thunar is to pass the current open folder as argument. I can write this to anywhere from verve command to instant xfce dropdown terminal (I really like it) so "being able to run a command" isn't why I want to run it from Thunar's location. I want to run it from there so I can have that `pwd` or somehow make use of where I am in Thunar.
Last edited by va9iff (2024-05-17 22:23:56)
Offline
In that case you will need to create an enhancement request for it.
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
that's actually not a big problem for me. I always have a drop-down terminal. the reason that I cared about running it from Thunar is to pass the current open folder as argument. I can write this to anywhere from verve command to instant xfce dropdown terminal (I really like it) so "being able to run a command" isn't why I want to run it from Thunar's location. I want to run it from there so I can have that `pwd` or somehow make use of where I am in Thunar.
There's no need to request it as a Thunar feature because the functionality is already there.
Create a Custom Action in Thunar:
Name:
Terminal here
Command:
exo-open --working-directory %f --launch TerminalEmulator
Icon:
org.xfce.terminal
Put it in the Thunar's Toolbar for instant access.
Likewise,
you can create a "root terminal" action:
Name:
Root terminal here
Command
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xfce4-terminal --default-working-directory=%f
Icon:
utilities-terminal
Last edited by chang-zhao (2024-05-19 09:10:22)
Offline
There's no need to request it as a Thunar feature because the functionality is already there.
I know, that's what I'm doing right now. I have a shortcut to open a terminal in the current directory, which still requires to have a terminal window and requires me to close this after I run the command.
now you're thinking "if you just run it and close it, why not create a key binding for that" and you'd be right. I have key binding for terminal, ide, text editor or similar frequent things. but sometimes I don't want to have a key binidng. for example, to create an http server on a folder, I don't want to block a key binding for that nor have it so simple to launch. I want to type out the exact command such as `live-serever .` but this exapmle doesn't make lot of sense since I wouldn't be able to close it easily when launched this way haha. but I think you get the point. sometimes you don't want it to be reachable from key binding but neither want to have a terminal window. a better example would be opening some app from cli that requires the terminal to stay open. then I just close the window of that app, and the process is ended as well (which has started from thunar's location bar command).
I see why you didn't see the difference, and yes it's kinda subtle, but I think it now makes sense to you
Offline
Pages: 1
[ Generated in 0.013 seconds, 8 queries executed - Memory usage: 542.91 KiB (Peak: 543.75 KiB) ]