Fix Yazi shell integration and enhance Kitty configuration

**Yazi Integration Fixes:**
- Fixed y() function in .zshrc to prevent shell exit when quitting Yazi
- Updated kitty-yazi.sh script to use AppleScript for proper tab creation
- Script now focuses existing Kitty window and creates new tab instead of new window

**Kitty Configuration Enhancements:**
- Added advanced font rendering with ligature support
- Improved cursor animations and visual effects
- Enhanced tab bar with powerline styling and fade effects
- Added background blur and better transparency handling
- Optimized performance settings (rendering delays, scrolling)
- Added comprehensive keyboard shortcuts for window/tab management
- Improved URL handling and text selection features
- Added notification system for long-running commands

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Naderer
2025-06-28 23:38:13 +02:00
parent 85ef8dca72
commit e715400806
9 changed files with 401 additions and 29 deletions

47
kitty/current-theme.conf Normal file
View File

@@ -0,0 +1,47 @@
background #3b3c35
foreground #fdfff1
cursor #fdfff1
cursor_text_color #000000
selection_foreground #3b3c35
selection_background #fdfff1
# dull black
color0 #3b3c35
# light black
color8 #6e7066
# dull red
color1 #f82570
# light red
color9 #f82570
# dull green
color2 #a6e12d
# light green
color10 #a6e12d
# yellow
color3 #e4db73
# light yellow
color11 #e4db73
# blue
color4 #fc961f
# light blue
color12 #fc961f
# magenta
color5 #ae81ff
# light magenta
color13 #ae81ff
# cyan
color6 #66d9ee
# light cyan
color14 #66d9ee
# dull white
color7 #fdfff1
# bright white
color15 #fdfff1

56
kitty/keymap.conf Normal file
View File

@@ -0,0 +1,56 @@
map cmd+1 goto_tab 1
map cmd+2 goto_tab 2
map cmd+3 goto_tab 3
map cmd+4 goto_tab 4
map cmd+5 goto_tab 5
map cmd+6 goto_tab 6
map cmd+7 goto_tab 7
map cmd+8 goto_tab 8
map cmd+9 goto_tab 9
map ctrl+tab next_window
map ctrl+shift+left resize_window narrower
map ctrl+shift+right resize_window wider
map ctrl+shift+up resize_window taller
map ctrl+shift+down resize_window shorter 3
map ctrl+left neighboring_window left
map ctrl+down neighboring_window down
map ctrl+shift+] next_tab
map ctrl+shift+[ previous_tab
# Window Management
map ctrl+shift+r rotate_windows
map ctrl+shift+l toggle_layout tall
map ctrl+enter launch --cwd=current
map ctrl+shift+enter launch --type=tab --cwd=current
map ctrl+shift+f toggle_fullscreen
map ctrl+shift+u input_unicode_character
# Reset window sizes
map ctrl+home resize_window reset
# Text Selection & Search
map ctrl+shift+f show_scrollback
map ctrl+shift+h show_last_command_output
map cmd+f launch --type=overlay --stdin-source=@screen_scrollback /usr/bin/less +G -R
# Font Size
map cmd+plus change_font_size all +2.0
map cmd+minus change_font_size all -2.0
map cmd+0 change_font_size all 0
# Background Opacity
map ctrl+shift+a>m set_background_opacity +0.1
map ctrl+shift+a>l set_background_opacity -0.1
map ctrl+shift+a>1 set_background_opacity 1
map ctrl+shift+a>d set_background_opacity default
# Advanced Features
map ctrl+shift+delete clear_terminal reset active
map ctrl+shift+f5 load_config_file
map ctrl+shift+f6 debug_config
# Scrollback
map ctrl+shift+s show_scrollback
map ctrl+shift+g show_last_command_output

138
kitty/kitty.conf Normal file
View File

@@ -0,0 +1,138 @@
# Font Configuration
font_family MesloGS NF
bold_font auto
italic_font auto
bold_italic_font auto
font_size 15
# Font rendering improvements
disable_ligatures never
font_features MesloGSNF +calt +liga
text_composition_strategy platform
undercurl_style thin-sparse
# Cursor Configuration
cursor_shape beam
cursor_beam_thickness 1.5
cursor_underline_thickness 2.0
cursor_blink_interval 0.5
cursor_stop_blinking_after 15.0
# Window Configuration
window_padding_width 8 12
placement_strategy center
window_border_width 1pt
draw_minimal_borders yes
window_margin_width 0
single_window_margin_width -1
resize_debounce_time 0.1
# Visual Polish
inactive_text_alpha 0.7
dim_opacity 0.75
# Font size (in pts)
# NOTE: Do not use odd values as these affect how kitty renders margin
# Background & Transparency
dynamic_background_opacity yes
background_opacity 0.85
background_blur 20
# macOS Specific
hide_window_decorations titlebar-only
macos_titlebar_color background
macos_option_as_alt yes
macos_quit_when_last_window_closed yes
# Audio
enable_audio_bell no
visual_bell_duration 0.0
# Enable remote control for new tab creation
allow_remote_control yes
# Keymap
include ./keymap.conf
macos_show_window_title_in none
# BEGIN_KITTY_THEME
# Monokai Classic
include current-theme.conf
# END_KITTY_THEME
# macos_titlebar_color background
#
# Tab Bar Configuration
tab_bar_style powerline
tab_powerline_style round
tab_bar_edge top
tab_bar_margin_width 2.0
tab_bar_margin_height 2.0 0.0
tab_bar_min_tabs 1
tab_switch_strategy previous
# Tab Colors (Gruvbox-inspired)
active_tab_foreground #282828
active_tab_background #fabd2f
active_tab_font_style bold
inactive_tab_foreground #a89984
inactive_tab_background #3c3836
inactive_tab_font_style normal
tab_bar_background #282828
tab_bar_margin_color #282828
# Tab Title Template
tab_title_template " {fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab} {index}: {title.split()[0] if title.rfind(title.split()[0]) < 30 else title.split()[0][:15] + '…'} "
active_tab_title_template " {fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab} {index}: {title.split()[0] if title.rfind(title.split()[0]) < 30 else title.split()[0][:15] + '…'} "
# Tab Separators
tab_separator " ┇ "
tab_fade 0.25 0.5 0.75 1
# Scrolling & Performance
scrollback_lines 10000
scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER
scrollback_pager_history_size 2048
wheel_scroll_multiplier 3.0
touch_scroll_multiplier 1.0
# URL Handling
detect_urls yes
url_color #0087bd
url_style curly
open_url_with default
copy_on_select no
strip_trailing_spaces never
# Selection
rectangle_select_modifiers ctrl+alt
terminal_select_modifiers shift
select_by_word_characters @-./_~?&=%+#
# Advanced Features
allow_hyperlinks yes
shell_integration enabled
term xterm-kitty
# Performance
repaint_delay 10
input_delay 3
sync_to_monitor yes
# Mouse
mouse_hide_wait 3.0
default_pointer_shape beam
pointer_shape_when_grabbed arrow
pointer_shape_when_dragging hand
# Clipboard
clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask
clipboard_max_size 64
# Notifications
enable_notifications yes
notify_on_cmd_finish invisible 30.0