kitty productivity setup

I have used tmux for ages. Even though I am using i3, I still use tmux locally, because I want to copy text from my terminal without using my mouse.

How do you copy text in tmux? You first go to the select mode with ctrl+B,[, press space to start selection and select with vim motions (if you have the vi bindings on). It improves my life, but it has always felt very clunky and slow to me. But now I found a better option!

Kitty terminal emulator has a ctrl+shift+g shortcut to show the output of the last command. By default, it uses less to show it, but you can override the pager! I am overriding mine to open a neovim window with it, btw. I also added another shortcut for ctrl+shift+s to copy the output of the last command to my clipboard. This is useful when I want to get a full path of some dataset, and add it to a script or invoke another command with it.

If you want the niceties I have just decsribed, just add these two lines to your ~/.config/kitty/kitty.conf


map ctrl+shift+g launch --stdin-source=@last_cmd_output --type=overlay nvim
map ctrl+shift+s launch --stdin-source=@last_cmd_output --type=clipboard
You are welcome!