From 1e5b5013a3d7cb958043fc3ded1948cceb1dbb60 Mon Sep 17 00:00:00 2001 From: Ian Chesal Date: Wed, 15 Jun 2022 09:53:00 -0400 Subject: [PATCH] A plugin for the Kitty terminal Provides a handful of useful aliases for anyone working in a Kitty terminal. In particular, the kssh command is handy for ensuring that terminfo is set correctly on remote hosts when you ssh to them. --- plugins/kitty/README.md | 23 +++++++++++++++++++++++ plugins/kitty/kitty.plugin.zsh | 13 +++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 plugins/kitty/README.md create mode 100644 plugins/kitty/kitty.plugin.zsh diff --git a/plugins/kitty/README.md b/plugins/kitty/README.md new file mode 100644 index 000000000..ec9e375de --- /dev/null +++ b/plugins/kitty/README.md @@ -0,0 +1,23 @@ +# Kitty plugin + +This plugin adds a few aliases and functions that are useful for users of the [Kitty](https://sw.kovidgoyal.net/kitty/) terminal. + +To use it, add _kitty_ to the plugins array of your zshrc file: +``` +plugins=(... kitty) +``` + +## Plugin commands + +* `kssh` + Runs a kitten ssh session that ensures your terminfo settings are copied + correctly to the remote hose. +* `kssh-slow` + A slower form of `kssh` that should always work. Use this if `kssh` fails + to set terminfo correctly for you on the remote host. +* `kitty-theme` + Browse and change the theme of your Kitty terminal. + +## Contributors + +- [Ian Chesal](https://github.com/ianchesal) diff --git a/plugins/kitty/kitty.plugin.zsh b/plugins/kitty/kitty.plugin.zsh new file mode 100644 index 000000000..6e480dac6 --- /dev/null +++ b/plugins/kitty/kitty.plugin.zsh @@ -0,0 +1,13 @@ +##################################################### +# Kitty plugin for oh-my-zsh # +##################################################### + +# kssh +# Use this when your terminfo isn't recognized on remote hosts. +# See: https://sw.kovidgoyal.net/kitty/faq/#i-get-errors-about-the-terminal-being-unknown-or-opening-the-terminal-failing-when-sshing-into-a-different-computer +alias kssh="kitty +kitten ssh" +# Use this if kssh fails +alias kssh-slow="infocmp -a xterm-kitty | ssh myserver tic -x -o \~/.terminfo /dev/stdin" + +# Change the colour theme +alias kitty-theme="kitty +kitten themes"