Closed idanarye closed 5 years ago
I feel like choosing from all commands isn't much faster that typing out the whole command, because of the amount of executables in the path (~6700 in my case). Maybe having an option to specify what command will be shown is a good solution. This could also be an easy alternative to #18.
So like rofi -show file-browser -file-browser-custom-cmd evince -file-browser-custom-cmd gimp ...
. I'll also add a configuration file so this doesn't need to added to every rofi call.
Choosing from all commands is very slow, but the point of tools like rofi is being able to type a few characters and quickly filter these 6700 exectuables to 5 you can select from, with the one you want already marked because rofi remembers your past choices and uses that to rank the executables.
My point is that, to filter the 6k executables down to a few, you have to type 4-5 characters and then select the executable, which isn't much faster than typing the name out. While if you set a list of commands you use often, you'd probably only have to type 1-2 characters to filter the list down to a single command (and then you wouldn't even have to select it, just press enter).
Also rofi doesn't remember the past choices on it's own. Since this is a plugin, this would have to be implemented.
I implemented both alternatives with the options file-browser-oc-search-path
to find executables in $PATH
, and the option -file-browser-oc-cmd
to specify own commands.
When you want to run a custom command on a file and get prompt to enter the custom command, the rofi list has only the selected file name. It would be more useful if instead it would contain the full list of available commands (
compgen -c
) so one could use rofi to filter for and pick the command to run on that file.