{ pkgs, lib, config, ... }: let cfg = config.hm.shell.foot; footTheme = pkgs.runCommand "gruvbox-dark" { } '' sed -e 's/\[colors-dark\]/\[colors\]/g' ${ pkgs.fetchurl { url = "https://codeberg.org/dnkl/foot/raw/branch/master/themes/gruvbox-dark"; sha256 = "sha256-hlmLklG/vAEDy8I+k13+o4ZR6Cq6lTxOconjf9M75eo="; } } > $out ''; in { options.hm.shell.foot = { enable = lib.mkEnableOption "foot terminal emulator"; fontSize = lib.mkOption { type = lib.types.int; default = 13; description = "Font size for the foot terminal"; }; }; config = lib.mkIf cfg.enable { programs.foot = { enable = true; server.enable = true; settings = { main = { font = "JetBrainsMonoNFM-Regular:size=${toString cfg.fontSize}"; include = "${footTheme}"; word-delimiters = ",│`|:\"'()[]{}<>./"; selection-target = "both"; dpi-aware = "yes"; }; search-bindings = { find-prev = "Control+p"; find-next = "Control+n"; commit = "Return"; }; scrollback = { lines = 10000; multiplier = 3.0; indicator-position = "none"; }; security.osc52 = "enabled"; url.osc8-underline = "always"; }; }; }; }