Kitty Terminal Emulator

183 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 1 year ago
MODERATORS
1
8
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/[email protected]
 
 

changelog: https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes

0.37.0 [2024-10-30]

  • A new optional text cursor movement animation that shows a “trail” following the movement of the cursor making it easy to follow large cursor jumps (#7970)
  • Custom kittens: Add a framework for easily and securely using remote control from within a kitten’s main() function
  • kitten icat: Fix the kitty +kitten icat --no-trailing-newline not working when using unicode placeholders (#7948)
  • tab_title_template allow using the 256 terminal colors for formatting (#7976)
  • Fix resizing window when alternate screen is active does not preserve trailing blank output line in the main screen (#7978)
  • Wayland: Fix background_opacity less than one causing flicker on startup when the Wayland compositor supports single pixel buffers (#7987)
  • Fix background image flashing when closing a tab (#7999)
  • When running a kitten that modifies the kitty config file if no config file exists create a commented out default config file and then modify it (#7991)
2
 
 

Changelog: https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes*

0.36.4 [2024-09-27]

  • Fix a regression in the previous release that caused window padding to be rendered opaque even when background_opacity is less than 1 (#7895)
  • Wayland GNOME: Fix a crash when using multiple monitors with different scales and starting on or moving to the monitor with lower scale (#7894)
  • macOS: Fix a regression in the previous release that caused junk to be rendered in font previews in the choose fonts kitten and crash on Intel macs (#7892)
3
 
 

Changelog: https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes

0.36.3 [2024-09-25]

  • The option second_transparent_bg has been removed and replaced by transparent_background_colors which allows setting up to seven additional colors that will be transparent, with individual opacities per color (#7646)
  • Fix a regression in the previous release that broke use of the cd command in session files (#7829)
  • macOS: Fix shortcuts that become entries in the global menubar being reported as removed shortcuts in the debug output
  • macOS: Fix macos_option_as_alt not working when caps lock is engaged (#7836)
  • Fix a regression when tinting of background images was introduced that caused window borders to have background_opacity applied to them (#7850)
  • Fix a regression that broke writing to the clipboard using the OSC 5522 protocol (#7858)
  • macOS: Fix a regression in the previous release that caused kitty to fail to run after an unclean shutdown/crash when using --single-instance (#7846)
  • kitten @ ls: Fix the --self flag not working (#7864)
  • Remote control: Fix --match state:self not working (#7886)
  • Splits layout: Allow setting the split_axis option to auto so that all new windows have their split axis chosen automatically unless explicitly specified in the launch command (#7887)
4
 
 

Changelog: https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes

0.36.2 [2024-09-06]

  • Linux: Fix a regression in 0.36.0 that caused font features defined via fontconfig to be ignored (#7773)
  • goto_tab: Allow numbers less than -1 to go to the Nth previously active tab
  • Wayland: Fix for upcoming explicit sync changes in Wayland compositors breaking kitty (#7767)
  • Remote control: When listening on a UNIX domain socket only allow connections from processes having the same user id (#7777)
  • kitten @: Fix a regression connecting to TCP sockets using plain IP addresses rather than hostnames (#7794)
  • diff kitten: Fix a regression that broke diffing against remote files (#7797)
5
1
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 
 

Changelog: https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes

0.36.1 [2024-08-17]

  • Allow specifying that the cursor shape for unfocused windows should remain unchanged (#7728)
  • MacOS Intel: Fix a crash in the choose-fonts kitten when displaying previews of variable fonts (#7734)
  • Remote control: Fix a regression causing an escape code to leak when using @ launch with --no-response over the TTY (#7752)
  • OSC 52: Fix a regression in the previous release that broke handling of invalid base64 encoded data in OSC 52 requests (#7757)
  • macOS: Fix a regression in the previous release that caused kitty --single-instance to not work when using macos-launch-services-cmdline
6
1
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 
 

Changelog: https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes

0.36.0 [2024-08-17]

  • Support OpenType Variable fonts (#3711)
  • A new choose-fonts kitten that provides a UI with font previews to ease selection of fonts. Also has support for font features and variable fonts
  • Allow animating the blinking of the cursor. See cursor_blink_interval for how to configure it
  • Add NERD fonts builtin so that users don’t have to install them to use NERD symbols in kitty. The builtin font is used only if the symbols are not available in some system font
  • launch command: A new launch --bias option to adjust the size of newly created windows declaratively (#7634)
  • A new option second_transparent_bg to make a second background color semi-transparent via background_opacity. Useful for things like cursor line highlight in editors (#7646)
  • A new notify kitten to show desktop notifications from the command line with support for icons, buttons and more.
  • Desktop notifications protocol: Add support for icons, buttons, closing of notifications, expiry of notifications, updating of notifications and querying if the terminal emulator supports the protocol (#7657, #7658, #7659)
  • A new option filter_notification to filter out or perform arbitrary actions on desktop notifications based on sophisticated criteria (#7670)
  • A new protocol to allow terminal applications to change colors in the terminal more robustly than with the legacy XTerm protocol (Setting and querying colors)
  • Sessions: A new command focus_matching_window to shift focus to a specific window, useful when creating complex layouts with splits (#7635)
  • Speed up loading of large background images by caching the decoded image data. Also allow using images in JPEG/WEBP/TIFF/GIF/BMP formats in addition to PNG
  • Wayland: Allow fractional scales less than one (#7549)
  • Wayland: Fix specifying the output name for the panel kitten not working (#7573)
  • icat kitten: Add an option kitty +kitten icat --no-trailing-newline to leave the cursor to the right of the image (#7574)
  • Speed up kitty --version and kitty --single-instance (for all subsequent instances). They are now the fastest of all terminal emulators with similar functionality
  • macOS: Fix rendering of the unicode hyphen (U+2010) character when using a font that does not include a glyph for it (#7525)
  • macOS 15: Handle Fn modifier when detecting global shortcuts (#7582)
  • Dispatch any clicks waiting for click_interval on key events (#7601)
  • kitten run-shell: Automatically add the directory containing the kitten binary to PATH if needed. Controlled via the --inject-self-onto-path option ~~(disc:7668`)~~ (#7668)
  • Wayland: Fix an issue with mouse selections not being stopped when there are multiple OS windows (#7381)
  • Splits layout: Fix the move_to_screen_edge action breaking when only a single window is present (#7621)
  • Add support for in-band window resize notifications (#7642)
  • Allow controlling the easing curves used for visual_bell_duration
  • New special rendering for font symbols useful in drawing commit graphs (#7681)
  • diff kitten: Add bindings to jump to next and previous file (#7683)
  • Wayland GNOME: Fix the font size in the OS Window title bar changing with the size of the text in the window (#7677)
  • Wayland GNOME: Fix a small rendering artifact when docking a window at a screen edge or maximizing it (#7701)
  • When shell is set to . respect the SHELL environment variable in the environment in which kitty is launched (#7714)
  • macOS: Bump the minimum required macOS version to Catalina released five years ago.
  • Fix a regression in notify_on_cmd_finish that caused notifications to appear for every command after the first (#7725)
7
 
 

Changelog: https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes

0.35.2 [2024-06-22]

  • A new option, window_logo_scale to specify how window logos are scaled with respect to the size of the window containing the logo (#7534)
  • A new option, cursor_shape_unfocused to specify the shape of the text cursor in unfocused OS windows (#7544)
  • Remote control: Fix empty password not working (#7538)
  • Wayland: Fix regression in 0.34.0 causing flickering on window resize on NVIDIA drivers (#7493)
  • Wayland labwc: Fix kitty timing out waiting for compositor to quit fucking around with scales on labwc (#7540)
  • Fix scrollback_indicator_opacity not actually controlling the opacity (#7557)
  • URL detection: Fix IPv6 hostnames breaking URL detection (#7565)
8
 
 

Changelog: https://sw.kovidgoyal.net/kitty/changelog/

0.35.1 [2024-05-31]

  • Wayland: Fix a regression in 0.34 that caused the tab bar to not render in second and subsequent OS Windows under Hyprland (#7413)
  • Fix a regression in the previous release that caused horizontal scrolling via touchpad in fullscreen applications to be reversed on non-Wayland platforms (#7475, #7481)
  • Fix a regression in the previous release causing an error when setting background_opacity to zero (#7483)
  • Image display: Fix cursor movement and image hit region incorrect for image placements that specify only a number of rows or columns to display in (#7479)
9
 
 

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

0.35.0 [2024-05-25]

  • kitten @ run: A new remote control command to run a process on the machine kitty is running on and get its output (#7429)
  • notify_on_cmd_finish: Show the actual command that was finished (#7420)
  • hints kitten: Allow clicking on matched text to select it in addition to typing the hint
  • Shell integration: Make the currently executing cmdline available as a window variable in kitty
  • paste_actions: Fix replace-newline not working with confirm (#7374)
  • Graphics: Fix aspect ratio of images not being preserved when only a single dimension of the destination rectangle is specified (#7380)
  • focus_visible_window: Fix selecting with mouse click leaving keyboard in unusable state (#7390)
  • Wayland: Fix infinite loop causing bad performance when using IME via fcitx5 due to a change in fcitx5 (#7396)
  • Desktop notifications protocol: Add support for specifying urgency
  • Improve rendering of Unicode shade character to avoid Moire patterns (#7401)
  • kitten @ send-key: Fix some keys being sent in kitty keyboard protocol encoding when not using socket for remote control
  • Dont clear selections on erase in screen commands unless the erased region intersects a selection (#7408)
  • Wayland: save energy by not rendering “suspended” windows on compositors that support that
  • Allow more types of alignment for placement_strategy (#7419)
  • Add some more box-drawing characters from the “Geometric shapes” Unicode block (#7433)
  • Linux: Run all child processes in their own systemd scope to prevent the OOM killer from harvesting kitty when a child process misbehaves (#7427)
  • Mouse reporting: Fix horizontal scroll events inverted (#7439)
  • Remote control: @ action: Fix some actions being performed on the active window instead of the matched window (#7438)
  • Scrolling with mouse wheel when a selection is active should update the selection (#7453)
  • Fix kitten @ set-background-opacity limited to min opacity of 0.1 instead of 0 (#7463)
  • launch --hold: Fix hold not working if kernel signals process group with SIGINT (#7466)
  • macOS: Fix --start-as=fullscreen not working when another window is already fullscreen (#7448)
  • Add option kitten @ detach-window --stay-in-tab to keep focus in the currently active tab when moving windows (#7468)
  • macOS: Fix changing window chrome/colors while in traditional fullscreen causing the titlebar to become visible (#7469)
10
14
submitted 5 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]
 
 

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

0.35.0 [2024-05-25]

testing collapsible sections

This is a test of markdown collapsible sections

  • kitten @ run: A new remote control command to run a process on the machine kitty is running on and get its output (#7429)
  • notify_on_cmd_finish: Show the actual command that was finished (#7420)
  • hints kitten: Allow clicking on matched text to select it in addition to typing the hint
  • Shell integration: Make the currently executing cmdline available as a window variable in kitty
  • paste_actions: Fix replace-newline not working with confirm (#7374)
  • Graphics: Fix aspect ratio of images not being preserved when only a single dimension of the destination rectangle is specified (#7380)
  • focus_visible_window: Fix selecting with mouse click leaving keyboard in unusable state (#7390)
  • Wayland: Fix infinite loop causing bad performance when using IME via fcitx5 due to a change in fcitx5 (#7396)
  • Desktop notifications protocol: Add support for specifying urgency
  • Improve rendering of Unicode shade character to avoid Moire patterns (#7401)
  • kitten @ send-key: Fix some keys being sent in kitty keyboard protocol encoding when not using socket for remote control
  • Dont clear selections on erase in screen commands unless the erased region intersects a selection (#7408)
  • Wayland: save energy by not rendering “suspended” windows on compositors that support that
  • Allow more types of alignment for placement_strategy (#7419)
  • Add some more box-drawing characters from the “Geometric shapes” Unicode block (#7433)
  • Linux: Run all child processes in their own systemd scope to prevent the OOM killer from harvesting kitty when a child process misbehaves (#7427)
  • Mouse reporting: Fix horizontal scroll events inverted (#7439)
  • Remote control: @ action: Fix some actions being performed on the active window instead of the matched window (#7438)
  • Scrolling with mouse wheel when a selection is active should update the selection (#7453)
  • Fix kitten @ set-background-opacity limited to min opacity of 0.1 instead of 0 (#7463)
  • launch --hold: Fix hold not working if kernel signals process group with SIGINT (#7466)
  • macOS: Fix --start-as=fullscreen not working when another window is already fullscreen (#7448)
  • Add option kitten @ detach-window --stay-in-tab to keep focus in the currently active tab when moving windows (#7468)
  • macOS: Fix changing window chrome/colors while in traditional fullscreen causing the titlebar to become visible (#7469)
11
6
submitted 5 months ago* (last edited 5 months ago) by [email protected] to c/[email protected]
 
 

Here's the official documentation on configuring kitty's modal mappings.

I made this to explore its uses but also because sometimes my fingers trigger the wrong reflex macro and I accidentally change my layout or alter the window size. This guards against that by literally guarding that behavior behind a key combo that puts me into the express context for altering my window/tab layout and arrangement.

To not clutter up your main config, I recommend saving this to its own file and using the include directive to bring it in.

EDIT: learned that you can map the combo that enters the mode to get out of the mode

kitty-mode-window-tab-arrangement (WTA):

map --new-mode WTA kitty_mod+space>kitty_mod+space 

map --mode WTA kitty_mod+space>kitty_mod+space pop_keyboard_mode
map --mode WTA esc    pop_keyboard_mode
map --mode WTA ctrl+c pop_keyboard_mode


# Windows

#navigation
map --mode WTA h    neighboring_window left
map --mode WTA a    neighboring_window left
map --mode WTA left neighboring_window left

map --mode WTA j    neighboring_window down
map --mode WTA s    neighboring_window down
map --mode WTA down neighboring_window down

map --mode WTA k  neighboring_window up
map --mode WTA w  neighboring_window up
map --mode WTA up neighboring_window up

map --mode WTA l     neighboring_window right
map --mode WTA d     neighboring_window right
map --mode WTA right neighboring_window right

map --mode WTA f focus_visible_window

#resize
map --mode WTA alt+h    resize_window narrower
map --mode WTA alt+a    resize_window narrower
map --mode WTA alt+left resize_window narrower

map --mode WTA alt+l     resize_window wider
map --mode WTA alt+d     resize_window wider
map --mode WTA alt+right resize_window wider

map --mode WTA alt+k  resize_window taller
map --mode WTA alt+w  resize_window taller
map --mode WTA alt+up resize_window taller

map --mode WTA alt+j    resize_window shorter
map --mode WTA alt+s    resize_window shorter
map --mode WTA alt+down resize_window shorter

map --mode WTA ctrl+home resize_window reset
map --mode WTA ctrl+r    resize_window reset

#arrange
map --mode WTA shift+h    move_window left
map --mode WTA shift+a    move_window left
map --mode WTA shift+left move_window left

map --mode WTA shift+l     move_window right
map --mode WTA shift+d     move_window right
map --mode WTA shift+right move_window right

map --mode WTA shift+j    move_window down
map --mode WTA shift+s    move_window down
map --mode WTA shift+down move_window down

map --mode WTA shift+k  move_window up
map --mode WTA shift+w  move_window up
map --mode WTA shift+up move_window up

map --mode WTA shift+m swap_with_window
# have to pop_keyboard_mode here to enable answering question
map --mode WTA shift+t combine : detach_window ask : pop_keyboard_mode
map --mode WTA shift+n combine : detach_tab ask    : pop_keyboard_mode


# Tabs

map --mode WTA shift+alt+]     move_tab_forward
map --mode WTA shift+alt+right move_tab_forward
map --mode WTA shift+alt+l     move_tab_forward
map --mode WTA shift+alt+d     move_tab_forward

map --mode WTA shift+alt+[    move_tab_backward
map --mode WTA shift+alt+left move_tab_backward
map --mode WTA shift+alt+h    move_tab_backward
map --mode WTA shift+alt+a    move_tab_backward


# Close others

map --mode WTA ctrl+x>w close_other_windows_in_tab
map --mode WTA ctrl+x>t close_other_tabs_in_os_window
map --mode WTA ctrl+x>o close_other_os_windows



# Layout actions

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

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

map --mode WTA ctrl+alt+, last_used_layout

# control number of main windows
action_alias increase_main layout_action increase_num_full_size_windows
map --mode WTA ctrl+]     increase_main
map --mode WTA ctrl+up    increase_main
map --mode WTA ctrl+right increase_main
map --mode WTA ctrl+l     increase_main
map --mode WTA ctrl+w     increase_main
map --mode WTA ctrl+d     increase_main

action_alias decrease_main layout_action decrease_num_full_size_windows
map --mode WTA ctrl+[    decrease_main
map --mode WTA ctrl+down decrease_main
map --mode WTA ctrl+left decrease_main
map --mode WTA ctrl+h    decrease_main
map --mode WTA ctrl+s    decrease_main
map --mode WTA ctrl+a    decrease_main

# increase main bias
action_alias increase_bias layout_action bias 50 66 75 90
map --mode WTA kitty_mod+]     increase_bias
map --mode WTA kitty_mod+up    increase_bias
map --mode WTA kitty_mod+right increase_bias
map --mode WTA kitty_mod+l     increase_bias
map --mode WTA kitty_mod+w     increase_bias
map --mode WTA kitty_mod+d     increase_bias

# decrease main bias
action_alias decrease_bias layout_action bias 50 33 25 10
map --mode WTA kitty_mod+[    decrease_bias
map --mode WTA kitty_mod+down decrease_bias
map --mode WTA kitty_mod+left decrease_bias
map --mode WTA kitty_mod+h    decrease_bias
map --mode WTA kitty_mod+s    decrease_bias
map --mode WTA kitty_mod+a    decrease_bias
12
 
 

https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes

0.34.1 [2024-04-19]

  • Wayland KDE: Fix window background blur not adapting when window is grown. Also fix turning it on and off not working. (#7351)
  • Wayland GNOME: Draw the titlebar buttons without using a font (#7349)
  • Fix a regression in the previous release that caused incorrect font selection when using variable fonts on Linux (#7361)
13
 
 

(Because of how kitty's documentation is generated (relative anchors, e.g. #1, #2, etc) makes linking to specific changelog entries problematic as new versions are released; old links will not point to the correct entry. Worse, since the URL is the same, new posts to that url will count as a cross-post.)

Changelog: https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes

0.34.0 [2024-04-15]

  • Wayland: panel kitten: Add support for drawing desktop background and bars using the panel kitten for all compositors that support the requisite Wayland protocol which is practically speaking all of them but GNOME (#2590)
  • Show a small scrollback indicator along the right window edge when viewing the scrollback to keep track of scroll position (#2502)
  • Wayland: Support fractional scales so that there is no wasted drawing at larger scale followed by resizing in the compositor
  • Wayland KDE: Support background_blur
  • Wayland GNOME: The window titlebar now has buttons to minimize/maximize/close the window
  • Wayland GNOME: The window titlebar color now follows the system light/dark color scheme preference, see wayland_titlebar_color
  • Wayland KDE: Fix mouse cursor hiding not working in Plasma 6 (#7265)
  • Wayland IME: Fix a bug with handling synthetic keypresses generated by ZMK keyboard + fcitx (#7283)
  • A new option terminfo_type to allow passing the terminfo database embedded into the TERMINFO env var directly instead of via a file
  • Mouse reporting: Fix drag release event outside the window not being reported in legacy mouse reporting modes (#7244)
  • macOS: Fix a regression in the previous release that broke rendering of some symbols on some systems (#7249)
  • Fix handling of tab character when cursor is at end of line and wrapping is enabled (#7250)
  • Splits layout: Fix move_window_forward not working (#7264)
  • macOS: Fix an abort due to an assertion when a program tries to set an invalid window title (#7271)
  • fish shell integration: Fix clicking at the prompt causing autosuggestions to be accepted, needs fish >= 3.8.0 (#7168)
  • Linux: Fix for a regression in 0.32.0 that caused some CJK fonts to not render glyphs (#7263)
  • Wayland: Support preferred integer scales
  • Wayland: A new option wayland_enable_ime to turn off Input Method Extensions which add latency and create bugs
  • Wayland: Fix hide_window_decorations not working on non GNOME desktops
  • When asking for quit confirmation because of a running program, mention the program name (#7331)
  • Fix flickering of prompt during window resize (#7324)
14
6
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]
 
 
  • Fix a regression in the previous release that caused requesting data from the clipboard via OSC 52 to instead return data from the primary selection (#7213)
  • Splits layout: Allow resizing until one of the halves in a split is minimally sized (#7220)
  • macOS: Fix text rendered with fallback fonts not respecting bold/italic styling (#7241)
  • macOS: When CoreText fails to find a fallback font for a character in the first Private Use Unicode Area, preferentially use the NERD font, if available, for it (#6043)
15
10
submitted 8 months ago* (last edited 8 months ago) by [email protected] to c/[email protected]
 
 
  • 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
16
 
 

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.

17
7
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/[email protected]
 
 
  • 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)
18
 
 
  • 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)
19
 
 
  • 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)

20
 
 

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.

21
 
 

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.

22
 
 
  • 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
23
 
 
# 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