Kitty Terminal Emulator

217 readers
1 users here now

"The fast, feature-rich, GPU based terminal emulator"

A place for discussion and questions about the kitty terminal emulator.

kitty feature overview:

Rules:

Links:

Supported OS:

founded 2 years ago
MODERATORS
26
10
submitted 1 year ago* (last edited 1 year ago) by SmokeInFog@midwest.social to c/kittyterminal@midwest.social
 
 
  • Cheetah speed with a redesigned render loop and a 2x faster escape code parser that uses SIMD CPU vector instruction to parse data in parallel (#7005)
  • A new benchmark kitten (kitten __benchmark__) to measure terminal throughput performance
  • Graphics protocol: Add a new delete mode for deleting images whose ids fall within a range. Useful for bulk deletion (#7080)
  • Keyboard protocol: Fix the Enter, Tab and Backspace keys generating spurious release events even when report all keys as escape codes is not set (#7136)
  • macOS: The command line args from macos-launch-services-cmdline are now prefixed to any args from open --args rather than overwriting them (#7135)
  • Allow specifying where the new tab is created for detach_window (#7134)
  • hints kitten: The option to set the text color for hints now allows arbitrary colors (#7150)
  • icat kitten: Add a command line argument to override terminal window size detection (#7165)
  • A new action toggle_tab to easily switch to and back from a tab with a single shortcut (#7203)
  • When clearing terminal add a new type to_cursor_scroll which can be used to clear to prompt while moving cleared lines into the scrollback
  • Fix a performance bottleneck when dealing with thousands of small images (#7080)
  • kitten @ ls: Return the timestamp at which the window was created (#7178)
  • hints kitten: Use default editor rather than hardcoding vim to open file at specific line (#7186)
  • Remote control: Fix --match argument not working for @ls, @send-key, @set-background-image (#7192)
  • Keyboard protocol: Do not deliver a fake key release events on OS window focus out for engaged modifiers (#7196)
  • Ignore startup_session when kitty is invoked with command line options specifying a command to run (#7198)
  • Box drawing: Specialize rendering for the Fira Code progress bar/spinner glyphs
27
 
 

cross-posted from: https://lemmy.world/post/12108185

https://gitlab.com/christosangel/basht

This tui file manager bash script, provides image preview, theme selection, smooth directory navigation, opening files with default and other programs and easy configuring of keybindings. It uses fzf to navigate to and select files and directories. Image rendering can be done with the use of ueberzug, kitty terminal or chafa.

basht_img_3.png

The script also provides content preview for directories, and text files:

basht_text.png

As one can see in the screenshots, thanks to Nerd Fonts, each type of selection (directory, text file, office document, image file etc) is represented with the respective symbol.

Configuring of preferences can be done through editing a psv file.

Any feedback / suggestion will be appreciated.

28
1
submitted 1 year ago* (last edited 1 year ago) by SmokeInFog@midwest.social to c/kittyterminal@midwest.social
 
 
  • kitten @ load-config: Allow (re)loading kitty.conf via remote control
  • Remote control: Allow running mappable actions via remote control (kitten @ action)
  • kitten @ send-text: Add a new option to automatically wrap the sent text in bracketed paste escape codes if the program in the destination window has turned on bracketed paste.
  • Fix a single key mapping not overriding a previously defined multi-key mapping
  • macOS: Fix kitten @ select-window leaving the keyboard in a partially functional state (#7074)
  • Graphics protocol: Improve display of images using Unicode placeholders or row/column boxes by resizing them using linear instead of nearest neighbor interpolation on the GPU (#7070)
  • When matching URLs use the definition of legal characters in URLs from the WHATWG spec rather than older standards (#7095)
  • hints kitten: Respect the kitty url_excluded_characters option (#7075)
  • macOS: Fix an abort when changing OS window chrome for a full screen window via remote control or the themes kitten (#7106)
  • Special case rendering of some more box drawing characters using shades from the block of symbols for legacy computing (#7110)
  • A new close_other_os_windows to close non active OS windows (#7113)
29
 
 
  • macOS: Fix a regression in the previous release that broke overriding keyboard shortcuts for actions present in the global menu bar (#7016)
  • Fix a regression in the previous release that caused multi-key sequences to not abort when pressing an unknown key (#7022)
  • Fix a regression in the previous release that caused kitten @ launch --cwd=current to fail over SSH (#7028)
  • Fix a regression in the previous release that caused kitten @ send-text with a match tab parameter to send text twice to the active window (#7027)
  • Fix a regression in the previous release that caused overriding of existing multi-key mappings to fail (#7044, #7058)
  • Wayland+NVIDIA: Do not request an sRGB output buffer as a bug in Wayland causes kitty to not start (#7021)
30
 
 
  • Conditional mappings depending on the state of the focused window

  • Support for Modal mappings such as in modal editors like vim

  • A new option notify_on_cmd_finish to show a desktop notification when a long running command finishes (#6817)

  • A new action send_key to simplify mapping key presses to other keys without needing send_text

  • Allow focusing previously active OS windows via nth_os_window (#7009)

  • Wayland: Fix a regression in the previous release that broke copying to clipboard under wl-roots based compositors in some circumstances (#6890)

  • macOS: Fix some combining characters not being rendered (#6898)

  • macOS: Fix returning from full screen via the button when the titlebar is hidden not hiding the buttons (#6883)

  • macOS: Fix newly created OS windows not always appearing on the “active” monitor (#6932)

  • Font fallback: Fix the font used to render a character sometimes dependent on the order in which characters appear on screen (#6865)

  • panel kitten: Fix rendering with non-zero margin/padding in kitty.conf (#6923)

  • kitty keyboard protocol: Specify the behavior of the modifier bits during modifier key events (#6913)

  • Wayland: Enable support for the new cursor-shape protocol so that the mouse cursor is always rendered at the correct size in compositors that support this protocol (#6914)

  • GNOME Wayland: Fix remembered window size smaller than actual size (#6946)

  • Mouse reporting: Fix incorrect position reported for windows with padding (#6950)

  • Fix focus_visible_window not switching to other window in stack layout when only two windows are present (#6970)

31
 
 

Magic-tape is an image supporting fuzzy finder command line interface YouTube client.

https://gitlab.com/christosangel/magic-tape

Image support is achieved either with kitty terminal, ueberzug or chafa.

With magic-tape, through the main menu, the user can:

  • Browse videos from subscriptions.

  • Browse through trending video feed.

  • make a video search, using keywords or phrases.

  • Watch a previously watched video (watch history).

  • Browse videos from a subcsribed channel.

  • Watch a liked video.

  • Repeat the previous selection.

  • Repeat a previous search (search history).

  • Watch/download video/audio content, in various formats.

Through the miscellaneous menu the user can

  • Set up Preferences (configuration).

  • Like / Unlike a video.

  • Synchronize the above actions with their YouTube account.

  • Import subscriptions from YouTube.

  • Subscribe to/ Unsubscribe from a channel.

  • Clear their watch/search history, liked videos, thumbnail cache.

32
 
 

Kitty overlays are new window sessions that can be brought up over existing sessions. When the overlay is closed, the window session it overlayed is returned to where you can continue your work in its context.

In the linked gif I have three windows open in the tall layout. I then open my htop overlay in each in turn; after which I toggle to the stack layout and open my btop overlay. I end by closing the overlay and toggling off stack and back to tall layout.

You'll see near the top of my config that I have several overlays besides these two. It's actually a feature that could keep me on kitty for a while as I've grown so used to it my terminal experience would feel incomplete without them now.

33
 
 
  • top left: ranger using kitty image protocol
  • top right: lsd -l with jetbrains nerd font mono for icon characters
  • bottom left: neofetch using kitty image protocol
  • bottom right: zsh output of kitty version
34
 
 
# vim:fileencoding=utf-8:foldmethod=marker

update_check_interval 6


# Unmapped

map kitty_mod+t no_op
map kitty_mod+r no_op


# Aliases

action_alias overlay launch --type overlay-main

action_alias copy_to copy_to_buffer
action_alias paste_from paste_from_buffer

action_alias path_hints kitten hints --type path --ascending --hints-foreground-color black --hints-background-color white --hints-text-color blue
action_alias link_hints kitten hints --type hyperlink --ascending --hints-foreground-color black --hints-background-color white --hints-text-color blue

# Overlays

map alt+f1 overlay --title "scrollback overlay" --stdin-source=@screen_scrollback most +1000000
map alt+f2 overlay --title "pandora overlay" screen -d -RR pianobar pianobar

map alt+f4 overlay --title "scratch overlay" screen -d -RR scratch nano /tmp/scratch
map alt+f5 show_kitty_doc ~/.config/kitty/docs/conf
map alt+f6 overlay --title "cwd overlay" --cwd current
map alt+f7 overlay --title "TODO overlay" screen -d -RR todo nano $HOME/Documents/.notes/to_do
map alt+f8 overlay --title "nudoku overlay" screen -d -RR nudoku /usr/games/nudoku -d hard
map alt+shift+f8 overlay --title "mazter overlay" screen -d -RR mazter $HOME/.cargo/bin/mazter
map kitty_mod+f8 overlay --title "debug" cmatrix -ab -C blue -u 2
map alt+f9 overlay --title "w3m overlay" screen -d -RR w3m w3m -B
map alt+f10 overlay --title "htop overlay" screen -d -RR htop htop
map alt+shift+f10 overlay --title "btop overlay" screen -d -RR btop btop
map alt+f11 overlay --title "ssh:gamerboxloc overlay" kitty +kitten ssh christopher@gamerboxloc
map alt+shift+f11 overlay --title "ssh:gamerboxint overlay" kitty +kitten ssh -p 42317 christopher@gamerboxint
map alt+f12 overlay --title "customizations overlay" most -v $HOME/.config/kitty/personalizations-help

map kitty_mod+f2 overlay --title "kitty.conf overlay" screen -d -RR kitty.conf nano $HOME/.config/kitty/kitty.conf $HOME/.config/kitty/personalizations-help


# Program quick launch

#video
map ctrl+p>f1 send_text normal,application celluloid *.*\r

#audio
map ctrl+p>f2 send_text normal,application mpg123 *\r

#file mangers
map ctrl+p>p  send_text normal,application clifm\r
map ctrl+p>r send_text normal,application ranger\r

#ssh
map ctrl+p>g>l send_text normal,application kitty +kitten ssh christopher@gamerboxloc\r
map ctrl+p>g>i send_text normal,application kitty +kitten ssh -p $GAMERBOX_INT_PORT christopher@gamerboxint\r

# Under the hood

editor nano
#editor micro

detect_urls yes
open_url_with ranger

allow_remote_control yes

scrollback_lines 2500
strip_trailing_spaces smart

enable_audio_bell no
window_alert_on_bell no

mouse_hide_wait 3.0
cursor_stop_blinking_after 3
shell_integration no-cursor


# Look and feel

#theme
include Night Lion V1.conf

remember_window_size  no
hide_window_decorations yes

initial_window_width  1280
initial_window_height 720

dynamic_background_opacity yes
background_opacity 1.0

cursor #88ffbb
cursor_text_color #115533
cursor_shape block
disable_ligatures cursor

font_size 11.0

#borders
#draw_minimal_borders yes
window_margin_width 1.0
single_window_margin_width 1.0
window_border_width 1.0
window_padding_width 2.0

#active_border_color #CCFFEE
active_border_color #a8c8ff
inactive_border_color #505050
inactive_text_alpha 0.5

#tab bar
tab_bar_min_tabs 1
#tab_bar_background #191919
tab_bar_align center
tab_title_max_length 25

#fade slant separator powerline hidden
tab_bar_style fade

tab_fade 0.5 0.75

#angled round slanted
tab_powerline_style angled

tab_separator " | "

tab_activity_symbol ⁂

tab_title_template {title} [{index}]{fmt.bold}{activity_symbol}{fmt.nobold}
active_tab_title_template " {title} "

active_tab_font_style   bold

inactive_tab_foreground #fff
inactive_tab_background #337598
inactive_tab_font_style italic

#background
#background_image $HOME/Pictures/backgrounds/black-and-white-mountain-scape.png
#background_image_layout scaled
#background_tint 0.55

#logo
window_logo_path $HOME/Pictures/backgrounds/kittymint-black-white.png
window_logo_position center
window_logo_alpha 0.005

#font
font_family      JetBrainsMonoNL Nerd Font
italic_font	 JetBrains Mono Bold Italic Nerd Font Complete
bold_font        JetBrains Mono ExtraBold Nerd Font Complete Mono
bold_italic_font JetBrains Mono ExtraBold Italic Nerd Font Complete Mono


# Layouts

enabled_layouts tall,fat,splits:split_axis=horizontal,splits:split_axis=vertical,grid,horizontal,vertical,stack,tall:mirrored=true,fat:mirrored=true

map ctrl+alt+7 goto_layout tall
map kitty_mod+alt+7 toggle_layout tall:mirrored=true
map ctrl+alt+g goto_layout grid
map ctrl+alt+w goto_layout fat
map kitty_mod+alt+w toggle_layout fat:mirrored=true
map ctrl+alt+v goto_layout vertical
map ctrl+alt+h goto_layout horizontal
map ctrl+alt+z toggle_layout stack
map ctrl+alt+y toggle_layout splits:split_axis=horizontal
map kitty_mod+alt+y toggle_layout splits:split_axis=vertical
map ctrl+alt+, last_used_layout

map ctrl+] layout_action increase_num_full_size_windows
map ctrl+[ layout_action decrease_num_full_size_windows


# Kitten customizations

#hints
map kitty_mod+p>f path_hints --program -
map kitty_mod+p>x link_hints --program xed
map kitty_mod+p>r link_hints --program -
map kitty_mod+p>y link_hints --program default


# Windows

#resize
map kitty_mod+left resize_window narrower
map kitty_mod+right resize_window wider
map kitty_mod+up resize_window taller
map kitty_mod+down resize_window shorter
map kitty_mod+home resize_window reset

#scroll
map shift+alt+k scroll_line_up
map shift+alt+j scroll_line_down
map shift+alt+page_up scroll_page_up
map shift+alt+page_down scroll_page_down
map shift+alt+\ scroll_home
map shift+alt+/ scroll_end

#new
map ctrl+alt+enter launch --cwd current
map kitty_mod+alt+f11 launch kitty +kitten ssh christopher@gamerboxloc

#arrange
map kitty_mod+h move_window left
map kitty_mod+j move_window down
map kitty_mod+k move_window up
map kitty_mod+l move_window right

#navigation
map alt+h neighboring_window left
map alt+j neighboring_window down
map alt+k neighboring_window up
map alt+l neighboring_window right
map alt+f focus_visible_window

#splits
map kitty_mod+o launch --location=hsplit
#map kitty_mod+e launch --location=vsplit
map kitty_mod+alt+= layout_action rotate


# Tabs

#navigation
map alt+shift+1 goto_tab 1
map alt+shift+2 goto_tab 2
map alt+shift+3 goto_tab 3
map alt+shift+4 goto_tab 4
map alt+shift+5 goto_tab 5
map alt+shift+6 goto_tab 6
map alt+shift+7 goto_tab 7
map alt+shift+8 goto_tab 8
map alt+shift+9 goto_tab 9
map alt+shift+0 goto_tab 10

map shift+alt+[ previous_tab
map shift+alt+] next_tab

map shift+alt+s select_tab

#new
map alt+shift+enter launch --type tab
map alt+shift+. launch --type tab --cwd current


# Advanced rearrangement

map kitty_mod+m>s swap_with_window
map kitty_mod+m>t detach_window ask
map kitty_mod+m>a detach_tab ask

# Clearing terminal

    # TODO

# Close others

map kitty_mod+x>w close_other_windows_in_tab
map kitty_mod+x>t close_other_tabs_in_os_window


# Copy

map ctrl+alt+c>1 copy_to 1first
map ctrl+alt+c>2 copy_to 2second
map ctrl+alt+c>3 copy_to 3third
map ctrl+alt+c>4 copy_to 4fourth
map ctrl+alt+c>5 copy_to 5fifth
map ctrl+alt+c>6 copy_to 6sixth
map ctrl+alt+c>7 copy_to 7seventh
map ctrl+alt+c>8 copy_to 8eighth
map ctrl+alt+c>9 copy_to 9ninth
map ctrl+alt+c>0 copy_to 0tenth

copy_on_select selectionCopy


# Paste

map shift+alt+v>1 paste_from 1first
map shift+alt+v>2 paste_from 2second
map shift+alt+v>3 paste_from 3third
map shift+alt+v>4 paste_from 4fourth
map shift+alt+v>5 paste_from 5fifth
map shift+alt+v>6 paste_from 6sixth
map shift+alt+v>7 paste_from 7seventh
map shift+alt+v>8 paste_from 8eighth
map shift+alt+v>9 paste_from 9ninth
map shift+alt+v>0 paste_from 0tenth

map shift+alt+v>s paste_from selectionCopy


# Opacity

map kitty_mod+alt+o>1 set_background_opacity 0.1
map kitty_mod+alt+o>2 set_background_opacity 0.2
map kitty_mod+alt+o>3 set_background_opacity 0.3
map kitty_mod+alt+o>4 set_background_opacity 0.4
map kitty_mod+alt+o>5 set_background_opacity 0.5
map kitty_mod+alt+o>6 set_background_opacity 0.6
map kitty_mod+alt+o>7 set_background_opacity 0.7
map kitty_mod+alt+o>8 set_background_opacity 0.8
map kitty_mod+alt+o>9 set_background_opacity 0.9
map kitty_mod+alt+o>0 set_background_opacity 1.0

map kitty_mod+[ set_background_opacity -0.05
map kitty_mod+] set_background_opacity +0.05

map ctrl+alt+- change_font_size current -1.0
map ctrl+alt+= change_font_size current +1.0

map kitty_mod+alt+o>d set_background_opacity default


# Misc

map kitty_mod+alt+home kitty_shell window