From 74e6f417cde8d9f2eb23f5870358505630851a8f Mon Sep 17 00:00:00 2001 From: matt1432 Date: Mon, 15 Jan 2024 00:19:17 -0500 Subject: [PATCH] feat: switch term to foot --- devices/wim/config/kdeglobals | 2 +- home/alacritty.nix | 101 ---------------------------------- home/foot.nix | 92 +++++++++++++++++++++++++++++++ modules/hyprland/default.nix | 4 +- 4 files changed, 95 insertions(+), 104 deletions(-) delete mode 100644 home/alacritty.nix create mode 100644 home/foot.nix diff --git a/devices/wim/config/kdeglobals b/devices/wim/config/kdeglobals index e3b20276..b379a13f 100644 --- a/devices/wim/config/kdeglobals +++ b/devices/wim/config/kdeglobals @@ -1,5 +1,5 @@ [General] -TerminalApplication=alacritty +TerminalApplication=foot [KFileDialog Settings] Allow Expansion=false diff --git a/home/alacritty.nix b/home/alacritty.nix deleted file mode 100644 index 8d9a800c..00000000 --- a/home/alacritty.nix +++ /dev/null @@ -1,101 +0,0 @@ -{config, ...}: let - inherit (config.vars) fontSize; -in { - programs.alacritty = { - enable = true; - settings = { - env = { - # fix wrong colors in tmux - TERM = "xterm-256color"; - }; - - keyboard.bindings = [ - { - key = "Return"; - mods = "Control|Shift"; - action = "SpawnNewInstance"; - } - ]; - - window = { - padding = { - x = 0; - y = 10; - }; - - opacity = 0.8; - }; - - font = { - normal = { - family = "JetBrainsMono Nerd Font"; - style = "Regular"; - }; - bold = { - family = "JetBrainsMono Nerd Font"; - style = "Bold"; - }; - italic = { - family = "JetBrainsMono Nerd Font"; - style = "Italic"; - }; - size = fontSize; - }; - - # https://github.com/dracula/alacritty/blob/05faff15c0158712be87d200081633d9f4850a7d/dracula.yml - colors = { - primary = { - background = "#282a36"; - foreground = "#f8f8f2"; - bright_foreground = "#ffffff"; - }; - cursor = { - text = "CellBackground"; - cursor = "CellForeground"; - }; - vi_mode_cursor = { - text = "CellBackground"; - cursor = "CellForeground"; - }; - search = { - matches = { - foreground = "#44475a"; - background = "#50fa7b"; - }; - focused_match = { - foreground = "#44475a"; - background = "#ffb86c"; - }; - }; - hints = { - start = { - foreground = "#282a36"; - background = "#f1fa8c"; - }; - end = { - foreground = "#f1fa8c"; - background = "#282a36"; - }; - }; - line_indicator = { - foreground = "None"; - background = "None"; - }; - selection = { - text = "CellForeground"; - background = "#44475a"; - }; - normal = { - black = "#21222c"; - red = "#ff5555"; - green = "#50fa7b"; - yellow = "#f1fa8c"; - blue = "#bd93f9"; - magenta = "#ff79c6"; - cyan = "#8be9fd"; - white = "#f8f8f2"; - }; - }; - }; - }; -} diff --git a/home/foot.nix b/home/foot.nix new file mode 100644 index 00000000..67477dc8 --- /dev/null +++ b/home/foot.nix @@ -0,0 +1,92 @@ +{ + config, + lib, + ... +}: let + inherit (config.vars) fontSize; +in { + programs = { + # https://codeberg.org/dnkl/foot/wiki#spawning-new-terminal-instances-in-the-current-working-directory + bash.bashrcExtra = + /* + bash + */ + '' + osc7_cwd() { + local strlen=''${#PWD} + local encoded="" + local pos c o + for (( pos=0; pos