diff --git a/flake.nix b/flake.nix index 3d9160a..e2dd5ef 100644 --- a/flake.nix +++ b/flake.nix @@ -141,6 +141,7 @@ imports = [ ./home-manager/browser.nix ./home-manager/gauntlet.nix + ./home-manager/kitty.nix ./home-manager/mangohud.nix ./home-manager/plasma.nix ./home-manager/tpm.nix diff --git a/home-manager/kitty.nix b/home-manager/kitty.nix new file mode 100644 index 0000000..f5f7350 --- /dev/null +++ b/home-manager/kitty.nix @@ -0,0 +1,47 @@ +{ + programs.kitty = { + enable = true; + themeFile = "Catppuccin-Mocha"; + settings = { + # tab bar styling + tab_bar_min_tabs = 1; + tab_bar_edge = "bottom"; + tab_bar_style = "powerline"; + tab_powerline_style = "angled"; + active_tab_foreground = "#1e1e2e"; + active_tab_background = "#89b4fa"; + active_tab_font_style = "bold-italic"; + inactive_tab_foreground = "#1e1e2e"; + inactive_tab_background = "#b4befe"; + inactive_tab_font_style = "normal"; + tab_title_template = "{title.removeprefix('/run/current-system/sw/bin/nix-shell-info | ')}{' ({})'.format(num_windows) if num_windows > 1 else ''}"; + + enabled_layouts = "grid, tall, stack"; + + # mappings + "map ctrl+p" = "nth_window -1"; + "map ctrl+up" = "neighboring_window up"; + "map ctrl+down" = "neighboring_window down"; + "map ctrl+left" = "neighboring_window left"; + "map ctrl+right" = "neighboring_window right"; + "map shift+up" = "move_window up"; + "map shift+down" = "move_window down"; + "map shift+left" = "move_window left"; + "map shift+right" = "move_window right"; + }; + }; + + home.file = { + ".config/kitty/open-actions.conf".text = '' + # Open any image in the full kitty window by clicking on it + protocol file + mime image/* + action launch --type=overlay kitten icat --hold -- ''${FILE_PATH} + + # Open text/* files with edit + protocol file + mime text/* + action launch edit ''${FILE_PATH} + ''; + }; +}