Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A builtin menu action #7649

Closed
roylez opened this issue Jul 19, 2024 · 1 comment
Closed

A builtin menu action #7649

roylez opened this issue Jul 19, 2024 · 1 comment

Comments

@roylez
Copy link

roylez commented Jul 19, 2024

Is your feature request related to a problem? Please describe.

There are always some shortcuts that I do not use frequently enough to develop muscle memory, and my usual strategy for them is a menu or palette to group them together, so that there are fewer shortcuts to remember. I could do this in tmux or wezterm using built-in functionality, but kitty does not have this built-in. Yes, I could do the same thing with external tools, such as Keyboard Maestro or fzf, but it would be nicer if it is built-in.

Describe the solution you'd like

An action that brings up an overlay window containing a list of predefined actions.

Additional context

Screenshot of tmux menu
screenshot 2024 07 20 0913

Screenshot of wezterm menu
screenshot 2024 07 20 0917

@kovidgoyal
Copy link
Owner

You can trivially create one yourself in about 5 lines of bash script.
kitty provides you all the tools to do so. I will outline it for you:

cmd=$(echo "new_window\nnew_os_window\nnew_tab\n...." | fzf)
kitten @ action "$cmd"

chmod +x script

Then in kitty.conf

map f1 launch --allow-remote-control --type=overlay /path/to/the/script/from/above

You can make it more fancy by using command names and description in
your selector script. Or using whatever tool you like instead of fzf
to pick a selection. The list of all actions is at
https://sw.kovidgoyal.net/kitty/actions/

Choose the ones you want in your script.
You can actually be much more fancy and make up your own aliases for
complex sequences of actions or remote control commands. Way more
powerful and personalizable than a command palette.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants