Use kitty for dmenu replacement. #8797
-
I am trying to use kitty terminal as dmenu replacement. kitten quick-access-terminal -c ./kitten.conf ./test.sh ^ works just the terminal does not exit after the completion of the script. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
^ This works fine. |
Beta Was this translation helpful? Give feedback.
-
You dont want the terminal to close. Otherwise re-opening it wont be instant. Instead in your script needs to stay runing in the terminal and toggle its visibility using --toggle-visibility. Use the panel kitten not the quick-access-terminal for more control. You can run kitten panel --single-instance --instance-group dmenu --start-as-hidden --edge=center(or whatever) myscript.sh Now in your window manager bind a key to run kitten panel --single-instance --instance-group dmenu --toggle-visibility this will cause the terminal to appear instantly. Every time you press the key. In your script after you get the name of the program to run hide the terminal using the same command and then run the program. |
Beta Was this translation helpful? Give feedback.
-
Generally speaking you can listen for focus in events which are
sent as escape codes in your script. Or if that's too complicated
when you are showing the window use a script that also sends a signal to
all child processes of the kitty window, which you can get using tools
such as ps or friends. In the script first send the signal then show the
window using --toggle-visibility
|
Beta Was this translation helpful? Give feedback.
-
📌 For anyone reading this in the future:You can run the following to start a hidden Kitty panel instance named kitten panel --single-instance --instance-group dmenu \
--start-as-hidden --lines=0 --columns=0 cat
Now, you can quickly launch any script inside the kitten panel --single-instance --instance-group dmenu \
--start-as-hidden --layer=top --edge=bottom \
-o cursor_trail=0 -o background_opacity=0.4 \
--focus-policy=exclusive --lines=20 \
<yourScript or fzf wrapper> |
Beta Was this translation helpful? Give feedback.
You dont want the terminal to close. Otherwise re-opening it wont be instant. Instead in your script needs to stay runing in the terminal and toggle its visibility using --toggle-visibility. Use the panel kitten not the quick-access-terminal for more control.
You can run
kitten panel --single-instance --instance-group dmenu --start-as-hidden --edge=center(or whatever) myscript.sh
Now in your window manager bind a key to run
kitten panel --single-instance --instance-group dmenu --toggle-visibility
this will cause the terminal to appear instantly. Every time you press the key.
In your script after you get the name of the program to run hide the terminal using the same command and then run t…