kitty new keys and new shell aliases

This commit is contained in:
2026-02-22 05:00:07 +01:00
parent 4629322b51
commit 7811f69ce4
4 changed files with 43 additions and 3 deletions

View File

@@ -2,6 +2,8 @@ font_family HurmitNerdFont
font_size 11 font_size 11
cursor_blink_interval 0 cursor_blink_interval 0
enable_audio_bell no
visual_bell_duration 1.0
tab_bar_style powerline tab_bar_style powerline
tab_bar_filter session:~ or session:^$ tab_bar_filter session:~ or session:^$
@@ -10,6 +12,9 @@ tab_powerline_style round
open_url_with qutebrowser open_url_with qutebrowser
action_alias launch_tab_home launch --type tab --cwd=~
kitten_alias hints hints --hints-background-color red --hints-foreground-color white
map ctrl+shift+6 no_op map ctrl+shift+6 no_op
map ctrl+shift+0 nth_window -1 map ctrl+shift+0 nth_window -1
@@ -29,21 +34,27 @@ map ctrl+alt+j neighboring_window down
map ctrl+alt+k neighboring_window up map ctrl+alt+k neighboring_window up
map ctrl+alt+l neighboring_window right map ctrl+alt+l neighboring_window right
map ctrl+alt+return last_used_layout map ctrl+alt+a last_used_layout
map ctrl+alt+b goto_layout fat map ctrl+alt+b goto_layout fat
map ctrl+alt+g goto_layout grid map ctrl+alt+g goto_layout grid
map ctrl+alt+r goto_layout tall map ctrl+alt+r goto_layout tall
map ctrl+alt+space goto_session -1 map ctrl+alt+space goto_session -1
map ctrl+alt+return new_window_with_cwd
map ctrl+alt+d new_tab_with_cwd sh -c 'cd $(kitten choose-file --mode dir) && nvim'
map ctrl+alt+e new_tab_with_cwd nvim map ctrl+alt+e new_tab_with_cwd nvim
map ctrl+alt+i new_tab_with_cwd lazygit map ctrl+alt+i new_tab_with_cwd lazygit
map ctrl+alt+f new_tab_with_cwd lf map ctrl+alt+f new_tab_with_cwd sh -c 'nvim $(kitten choose-file)'
map ctrl+alt+m toggle_layout stack map ctrl+alt+m toggle_layout stack
map ctrl+alt+o goto_session ~/.config/kitty/sessions map ctrl+alt+o goto_session ~/.config/kitty/sessions
map ctrl+alt+p new_tab_with_cwd spf
map ctrl+alt+s launch --stdin-source=@screen_scrollback --type=overlay nvim -R - map ctrl+alt+s launch --stdin-source=@screen_scrollback --type=overlay nvim -R -
map ctrl+alt+w new_window_with_cwd map ctrl+alt+w new_window_with_cwd
map ctrl+alt+t new_tab_with_cwd map ctrl+alt+t new_tab_with_cwd
map ctrl+alt+x close_window_with_confirmation map ctrl+alt+x close_window_with_confirmation
map ctrl+alt+u>d launch_tab_home sh -c 'cd $(kitten choose-file --mode dir) && nvim'
map ctrl+alt+u>f launch_tab_home sh -c 'nvim $(kitten choose-file)'
map ctrl+alt+v focus_visible_window
map ctrl+alt+y new_window nvim @selection map ctrl+alt+y new_window nvim @selection
map ctrl+alt+shift+s save_as_session --base-dir ~/.config/kitty/sessions --match=session:. map ctrl+alt+shift+s save_as_session --base-dir ~/.config/kitty/sessions --match=session:.

View File

@@ -13,3 +13,9 @@ vim.opt.timeout = false
vim.o.undofile = true vim.o.undofile = true
vim.cmd([[autocmd TermOpen * startinsert]]); vim.cmd([[autocmd TermOpen * startinsert]]);
vim.filetype.add({
extension = {
["kitty-session"] = 'kitty',
},
})

View File

@@ -77,6 +77,9 @@ if ok then
set("n", "<leader>es", function() set("n", "<leader>es", function()
builtin.find_files({ cwd = vim.fs.normalize('~/.config/kitty/sessions') }) builtin.find_files({ cwd = vim.fs.normalize('~/.config/kitty/sessions') })
end, { desc = "Telescope kitty sessions" }) end, { desc = "Telescope kitty sessions" })
set("n", "<leader>eS", function()
vim.cmd("Oil " .. vim.fs.normalize('~/.config/kitty/sessions'))
end, { desc = "Telescope kitty sessions (dir)" })
set("n", "<leader>fa", builtin.git_files, { desc = "Telescope nvim package files" }) set("n", "<leader>fa", builtin.git_files, { desc = "Telescope nvim package files" })
set("n", "<leader>F", builtin.find_files, { desc = "Telescope find files" }) set("n", "<leader>F", builtin.find_files, { desc = "Telescope find files" })
set("n", "<leader>fh", function() set("n", "<leader>fh", function()

View File

@@ -72,5 +72,25 @@ tai() {
} }
vf() { vf() {
nvim $(fzf --multi) if [ "$TERM" = "xterm-kitty" ]; then
local FILE=$(kitten choose-file)
[ -n "$FILE" ] && nvim "$FILE"
else
nvim $(fzf --multi)
fi
}
vd() {
if [ "$TERM" = "xterm-kitty" ]; then
local DIR=$(kitten choose-file --mode dir)
[ -n "$DIR" ] && ( cd "$DIR" && exec nvim )
else
local DIR=$(fzf --walker dir,follow,hidden)
[ -n "$DIR" ] && ( cd "$DIR" && exec nvim )
fi
}
vz() {
local DIR=$(zoxide query -l | fzf --query "$Q")
[ -n "$DIR" ] && ( cd "$DIR" && exec nvim )
} }