Use Fish as applications launcher #9327
Replies: 2 comments 1 reply
-
I don't know why two nohups are needed here, but the level of nesting is very deep: we have I would recommend trying to simplify this. It looks like you want to read a command and then execute it in the background; you can do that using
this avoids trying to intercept it in |
Beta Was this translation helpful? Give feedback.
-
I managed to simplify the function:
But I don't understand how to do without fish_preexec. If I use To make things more clear, here is the nesting of the processes in htop:
When I type a command in this terminal and press "enter", app_launcher.fish intercepts the command, runs it in the background & nohup, and exits the terminal before the "normal" execution of the command. |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm trying to convert fish to an application launcher. To do this, I create the file:
$XDG_CONFIG_HOME/fish/functions/app_launcher.fish
The function will intercept the command before it is executed, run it with nohup, and exit the terminal immediately.
I don't know why nohup is needed for fish. Without nohup, sometimes fish exit before the command is run. I would be interested in an explanation.
Then I created the small script:
Which I can launch via a keyboard key ("Super" for example).
"st" is my terminal emulator.
There is no bug? Maybe a suggestion?
Beta Was this translation helpful? Give feedback.
All reactions