From 3e9486099d8f3e86d2d684d261ca4f2062b58439 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Tue, 26 Aug 2025 19:01:54 -0600 Subject: [PATCH] config: replace kitty with foot --- home/modules/default.nix | 2 +- home/modules/gui/default.nix | 2 +- home/modules/gui/sway.nix | 2 +- home/modules/terminal.nix | 117 +++++++++++++++++++++++++++ home/modules/terminal/default.nix | 55 ------------- home/modules/terminal/kitty.conf.nix | 87 -------------------- home/platforms/chem@yuki/default.nix | 1 + 7 files changed, 121 insertions(+), 145 deletions(-) create mode 100644 home/modules/terminal.nix delete mode 100644 home/modules/terminal/default.nix delete mode 100644 home/modules/terminal/kitty.conf.nix diff --git a/home/modules/default.nix b/home/modules/default.nix index 646a3f6..3453cf7 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -5,7 +5,7 @@ ... }: { imports = [ - ./terminal + ./terminal.nix ./neovim.nix ./baseline.nix ./gaming.nix diff --git a/home/modules/gui/default.nix b/home/modules/gui/default.nix index 3b505a5..110a835 100644 --- a/home/modules/gui/default.nix +++ b/home/modules/gui/default.nix @@ -62,7 +62,7 @@ in { enable = true; defaultApplications = { "application/pdf" = with pkgs; ["qpdfview"]; - "x-scheme-handler/file" = with pkgs; ["kitty"]; + "x-scheme-handler/file" = with pkgs; ["foot"]; }; }; }; diff --git a/home/modules/gui/sway.nix b/home/modules/gui/sway.nix index 11a6334..90e0109 100644 --- a/home/modules/gui/sway.nix +++ b/home/modules/gui/sway.nix @@ -143,7 +143,7 @@ in { "${mod}+c" = "focus child"; "${mod}+d" = "exec ${bemenuCommand}"; "${mod}+l" = "exec ${getExe pkgs.gtklock} -d"; - "${mod}+Return" = "exec ${lib.getExe pkgs.kitty} ${lib.getExe pkgs.tmux}"; + "${mod}+Return" = "exec ${lib.getExe pkgs.foot} ${lib.getExe pkgs.tmux}"; "${mod}+Shift+s" = "exec ${grimshot} copy area"; "${mod}+Shift+a" = "exec ${grimshot} copy output"; "${mod}+Tab" = "focus right"; diff --git a/home/modules/terminal.nix b/home/modules/terminal.nix new file mode 100644 index 0000000..bc6b553 --- /dev/null +++ b/home/modules/terminal.nix @@ -0,0 +1,117 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.apps.terminal; +in { + options.local.apps.terminal.enable = mkEnableOption "terminal emulator settings"; + config = mkIf cfg.enable { + programs = { + foot = { + enable = true; + settings = { + main = { + term = "xterm-256color"; + font = "JetBrains Mono:style=Medium:size=15"; + font-bold = "JetBrains Mono:style=Bold:size=15"; + font-italic = "JetBrains Mono:style=Italic:size=15"; + font-bold-italic = "JetBrains Mono:style=Bold Italic:size=15"; + dpi-aware = "yes"; + initial-window-size-pixels = "1200x600"; + }; + + cursor = { + style = "block"; + blink = "yes"; + }; + + colors = { + background = "000000"; + regular0 = "616161"; + regular1 = "ff4d51"; + regular2 = "35d450"; + regular3 = "e9e836"; + regular4 = "5dc5f8"; + regular5 = "feabf2"; + regular6 = "24dfc4"; + regular7 = "ffffff"; + }; + + bell = { + system = "no"; + urgent = "no"; + notify = "no"; + visual = "no"; + command-focused = "no"; + }; + + mouse = { + hide-when-typing = "no"; + }; + + key-bindings = { + clipboard-copy = "Control+Shift+c"; + clipboard-paste = "Control+Shift+v"; + font-increase = "Control+Shift+equal"; + font-decrease = "Control+Shift+minus"; + font-reset = "Control+Shift+BackSpace"; + }; + + mouse-bindings = { + scrollback-up-mouse = "BTN_WHEEL_BACK"; + scrollback-down-mouse = "BTN_WHEEL_FORWARD"; + font-increase = "Control+BTN_WHEEL_BACK"; + font-decrease = "Control+BTN_WHEEL_FORWARD"; + select-begin = "BTN_LEFT"; + select-begin-block = "Control+BTN_LEFT"; + select-extend = "BTN_RIGHT"; + select-extend-character-wise = "Control+BTN_RIGHT"; + select-word = "BTN_LEFT-2"; + select-word-whitespace = "Control+BTN_LEFT-2"; + select-quote = " BTN_LEFT-3"; + select-row = "BTN_LEFT-4"; + }; + }; + }; + + tmux = { + enable = true; + aggressiveResize = true; + clock24 = true; + escapeTime = 10; + terminal = "xterm-256color"; + keyMode = "emacs"; + mouse = true; + + extraConfig = '' + set -ga update-environment " LIFT_PID" + set -g set-titles on + set -g renumber-windows on + set -sa terminal-overrides ',xterm-termite:RGB' + + set -g status-style bg=default,fg=colour250 + set -g pane-border-style fg=colour236 + set -g pane-active-border-style fg=colour240 + set -g window-status-format " #I:#W " + set -g window-status-style bg=default,fg=colour244 + set -g window-status-current-format " #I:#W " + set -g window-status-current-style bg=colour236,fg=white,bold + set -g status-position bottom + set -g status-left-length 20 + set -g status-right-length 60 + set -g status-left "" + set -g window-status-separator "" + set -g status-justify left + ''; + }; + }; + home = { + sessionVariables = { + "TERMINAL" = "foot"; + }; + }; + }; +} diff --git a/home/modules/terminal/default.nix b/home/modules/terminal/default.nix deleted file mode 100644 index adc9b93..0000000 --- a/home/modules/terminal/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.local.apps.terminal; -in { - options.local.apps.terminal.enable = mkEnableOption "terminal emulator settings"; - config = mkIf cfg.enable { - programs = { - kitty = { - enable = true; - extraConfig = import ./kitty.conf.nix; - }; - - tmux = { - enable = true; - aggressiveResize = true; - clock24 = true; - escapeTime = 10; - terminal = "xterm-256color"; - keyMode = "emacs"; - mouse = true; - - extraConfig = '' - set -ga update-environment " LIFT_PID" - set -g set-titles on - set -g renumber-windows on - set -sa terminal-overrides ',xterm-termite:RGB' - - set -g status-style bg=default,fg=colour250 - set -g pane-border-style fg=colour236 - set -g pane-active-border-style fg=colour240 - set -g window-status-format " #I:#W " - set -g window-status-style bg=default,fg=colour244 - set -g window-status-current-format " #I:#W " - set -g window-status-current-style bg=colour236,fg=white,bold - set -g status-position bottom - set -g status-left-length 20 - set -g status-right-length 60 - set -g status-left "" - set -g window-status-separator "" - set -g status-justify left - ''; - }; - }; - home = { - sessionVariables = { - "TERMINAL" = "kitty"; - }; - }; - }; -} diff --git a/home/modules/terminal/kitty.conf.nix b/home/modules/terminal/kitty.conf.nix deleted file mode 100644 index 21f5a60..0000000 --- a/home/modules/terminal/kitty.conf.nix +++ /dev/null @@ -1,87 +0,0 @@ -'' - # Fonts - font_family JetBrains Mono Medium - bold_font JetBrains Mono Bold - italic_font JetBrains Mono Italic - bold_italic_font JetBrains Mono Bold Italic - - font_size 10 - disable_ligatures cursor - - initial_window_width 1200 - initial_window_height 600 - - # Cursor - cursor_shape beam - cursor_beam_thickness 1.9 - cursor_stop_blinking_after 0 - - # Audio - enable_audio_bell no - - # Tabs - tab_bar_style separator - tab_separator " | " - tab_title_template "{index}: {title}" - - # Color - # special - foreground #ffffff - foreground_bold #ffffff - cursor #ffffff - background #000000 - background_opacity 1 - - # Shortcuts - map ctrl+shift+c copy_to_clipboard - map ctrl+shift+v paste_from_clipboard - map ctrl+shift+s paste_from_selection - map shift+insert paste_from_selection - - map ctrl+shift+up scroll_line_up - map ctrl+shift+down scroll_line_down - map ctrl+shift+page_up scroll_page_up - map ctrl+shift+page_down scroll_page_down - map ctrl+shift+home scroll_home - map ctrl+shift+end scroll_end - - map ctrl+shift+enter new_window - map ctrl+alt+enter launch --cwd=current - map ctrl+shift+w close_window - map ctrl+shift+] next_window - map ctrl+shift+[ previous_window - map ctrl+shift+1 first_window - map ctrl+shift+2 second_window - map ctrl+shift+3 third_window - map ctrl+shift+4 fourth_window - map ctrl+shift+5 fifth_window - map ctrl+shift+6 sixth_window - map ctrl+shift+7 seventh_window - map ctrl+shift+8 eighth_window - map ctrl+shift+9 ninth_window - map ctrl+shift+0 tenth_window - - map ctrl+shift+right next_tab - map ctrl+shift+left previous_tab - map ctrl+shift+t new_tab - map ctrl+shift+q close_tab - map ctrl+shift+. move_tab_forward - map ctrl+shift+, move_tab_backward - map ctrl+shift+alt+t set_tab_title - map ctrl+alt+1 goto_tab 1 - map ctrl+alt+2 goto_tab 2 - map ctrl+alt+3 goto_tab 3 - map ctrl+alt+4 goto_tab 4 - map ctrl+alt+5 goto_tab 5 - map ctrl+alt+6 goto_tab 6 - map ctrl+alt+7 goto_tab 7 - map ctrl+alt+8 goto_tab 8 - map ctrl+alt+9 goto_tab 9 - map ctrl+alt+0 goto_tab 10 - - map ctrl+shift+equal change_font_size all +1.0 - map ctrl+shift+minus change_font_size all -1.0 - map ctrl+shift+backspace change_font_size all 0 - - map ctrl+shift+delete clear_terminal reset active -'' diff --git a/home/platforms/chem@yuki/default.nix b/home/platforms/chem@yuki/default.nix index 5c9c372..92cd527 100644 --- a/home/platforms/chem@yuki/default.nix +++ b/home/platforms/chem@yuki/default.nix @@ -31,6 +31,7 @@ }; apps = { + #todo move some of this to defaultDesktop pack? terminal.enable = true; neovim.enable = true; gaming.enable = true;