kitty Terminal配置使用详解

在使用kitty中,其实我没有使用到它的多窗口还有一些功能,所以在这篇文章逐步更新一些快捷键

注意

kitty terminal无法中文输入

内容

首先通过tldr命令查看

tldr kitty

❯ tldr kitty
kitty

A fast, feature-rich, GPU based terminal emulator.
More information: https://sw.kovidgoyal.net/kitty/.

 - Open a new terminal:
   kitty

 - Open a terminal with the specified title for the window:
   kitty --title "title"

 - Start the theme-chooser builtin:
   kitty +kitten themes

 - Display an image in the terminal:
   kitty +kitten icat path/to/image

 - Copy the contents of stdin to the clipboard:
   echo example | kitty +kitten clipboard

修改主题颜色

kitty +kitten themes

常用命令

切换窗口

Ctrl+Shift+[(切换到左边的窗口)
Ctrl+Shift+](切换到右边的窗口)

新建窗口

新建窗口 | Ctrl+Shift+Enter | 创建独立窗口

关闭当前窗口(光标所在为准)

Ctrl+Shift+q

这个快捷键也可以用来关闭默认的Terminal,需要着重记忆

关闭所有窗口

Ctrl+Shift+W


其他命令

查看版本

kitty --version

更新,同安装(

https://sw.kovidgoyal.net/kitty/binary/#install-kitty

curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin

配置

官方文档快捷键的修改

https://sw.kovidgoyal.net/kitty/conf/#keyboard-shortcuts

配置文件一般位于
~/.config/kitty/kitty.conf

取消titlebar

hide_window_decorations yes

解决没有titlebar无法拖动软件的问题:使用super+鼠标左键进行拖动
还有个问题是无法拖动设定窗口大小!

Super + [↑/↓/←/→] 调整预设尺寸。

设定终端右下角的图片
经测验jpeg,png等图片可以使用,svg不可使用

#不需要添加单引号/引号
window_logo_path /home/ying/Pictures/download.jpeg
window_logo_position bottom-right

下载图片资源

https://yesicon.app/devicon/debian?lang=zh-hans

效果预览

jpeg
在这里插入图片描述
位置太奇怪了,需要设置个右下边距50px(找了一圈没看到设置边距的,最后选择了设置为center)
在这里插入图片描述
在这里插入图片描述

其他

ctrl + shift + 鼠标左键打开链接
kitty +kitten themes

Background
background #E3D1A6

#背景透明度
background_opacity 0.9

kitty +kitten diff file1 file2
kitty +kitten icat imageName
kitty +kitten ssh root@192.168.50.95

https://sw.kovidgoyal.net/kitty/kittens_intro/

参考

https://github.com/kovidgoyal/kitty/issues/1444

配置文件

map ctrl+shift+f6 debug_config

initial_window_width  80c
initial_window_height 20c

# my configuration
remember_window_size no

hide_window_decorations yes
#hide_window_decorations no

window_logo_path /home/ying/Pictures/DeviconDebian.png
window_logo_position center

# resize windowSize(not work)
#map Ctrl+Shift+Left  change_window_width -5
#map Ctrl+Shift+Right change_window_width +5
#map Ctrl+Shift+Up    change_window_height -5
#map Ctrl+Shift+Down  change_window_height +5

# Font configuration
#font_family      FiraCode Nerd Font
font_family MesloLGS NF, Noto Sans CJK HK

font_size        14.0
bold_font        auto
italic_font      auto

# Background and foreground colors
# background        #1e1e2e
# foreground        #c0caf5
# cursor            #ff9e64
# cursor_text_color #1e1e2e
# selection_foreground #1e1e2e
# selection_background #73daca

# Background opacity
background_opacity 0.85

# Tab bar configuration
hide_tab_bar_if_only_one_tab yes
tab_bar_edge bottom
window_padding_width 5
# tab_bar_background #2d2d2d

# Scroll configuration
scrollback_lines 10000
scrollback_pager no
scrollback_cursor_line false

# Mouse configuration
mouse_hide_wait 2.0

# Key bindings
##default
map ctrl+shift+c copy_to_clipboard
map ctrl+shift+v paste_from_clipboard
map ctrl+shift+up scroll_line_up
map ctrl+shift+k scroll_line_up
map ctrl+shift+up scroll_line_up
map ctrl+shift+k scroll_line_up
map ctrl+shift+page_down scroll_page_down
map ctrl+shift+home scroll_home
map ctrl+shift+end scroll_end

## ExtraConfiguration
map ctrl+shift+z scroll_to_prompt -1
map ctrl+shift+x scroll_to_prompt 1
map ctrl+shift+t new_tab
map ctrl+shift+w close_tab
map ctrl+shift+h new_window horizontal
#conflict with paste
#map ctrl+shift+v new_window vertical
map ctrl+shift+q close_window

#not work
#map ctrl+shift+arrow move_window_left
#map ctrl+shift+arrow move_window_right

# Enable mouse reporting
enable_mouse_reporting yes

# Window appearance and behavior
borderless_window yes
allow_remote_control yes

# Audio bell configuration
enable_audio_bell no
bell_padding 10

# Image support
allow_remote_control yes

# Dynamic background and foreground switching
dynamic_background yes
dynamic_foreground yes

# Window switching key bindings
map ctrl+shift+tab next_window
map ctrl+shift+shift+tab prev_window


# BEGIN_KITTY_THEME
# Alabaster Dark
include current-theme.conf
# END_KITTY_THEME
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值