diff --git a/home/firefox/tridactyl/default.nix b/home/firefox/tridactyl/default.nix index 2a37d26..fd8e3fb 100644 --- a/home/firefox/tridactyl/default.nix +++ b/home/firefox/tridactyl/default.nix @@ -1,20 +1,9 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.my.home.firefox.tridactyl; in { config = lib.mkIf cfg.enable { - xdg.configFile."tridactyl/tridactylrc".source = pkgs.substituteAll { - src = ./tridactylrc; - - editorcmd = lib.concatStringsSep " " [ - # Use my configured terminal - config.my.home.terminal.program - # Make it easy to pick out with a window class name - "--class tridactyl_editor" - # Open vim with the cursor in the correct position - ''-e "vim %f '+normal!%lGzv%c|'"'' - ]; - }; + xdg.configFile."tridactyl/tridactylrc".source = ./tridactylrc; }; } diff --git a/home/firefox/tridactyl/tridactylrc b/home/firefox/tridactyl/tridactylrc index 200b74e..711bf6f 100644 --- a/home/firefox/tridactyl/tridactylrc +++ b/home/firefox/tridactyl/tridactylrc @@ -5,7 +5,8 @@ colorscheme dark " Make tridactyl open Vim in my prefered terminal -set editorcmd @editorcmd@ +" FIXME: make it follow my prefered terminal +set editorcmd termite --class tridactyl_editor -e 'vim %f' " }}} " Binds {{{ diff --git a/home/packages/default.nix b/home/packages/default.nix index 0cfa3b3..84c1253 100644 --- a/home/packages/default.nix +++ b/home/packages/default.nix @@ -22,5 +22,6 @@ in file mosh ripgrep + termite.terminfo ] ++ cfg.additionalPackages); } diff --git a/home/terminal/alacritty/default.nix b/home/terminal/alacritty/default.nix deleted file mode 100644 index 760162a..0000000 --- a/home/terminal/alacritty/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.my.home.terminal; -in -{ - config = lib.mkIf (cfg.program == "alacritty") { - programs.alacritty = { - enable = true; - - settings = { - font = { - size = 5.5; - }; - - colors = { - primary = { - background = cfg.colors.background; - foreground = cfg.colors.foreground; - - bright_foreground = cfg.colors.foregroundBold; - }; - - cursor = { - cursor = cfg.colors.cursor; - }; - - normal = { - black = cfg.colors.black; - red = cfg.colors.red; - green = cfg.colors.green; - yellow = cfg.colors.yellow; - blue = cfg.colors.blue; - magenta = cfg.colors.magenta; - cyan = cfg.colors.cyan; - white = cfg.colors.white; - }; - - bright = { - black = cfg.colors.blackBold; - red = cfg.colors.redBold; - green = cfg.colors.greenBold; - yellow = cfg.colors.yellowBold; - blue = cfg.colors.blueBold; - magenta = cfg.colors.magentaBold; - cyan = cfg.colors.cyanBold; - white = cfg.colors.whiteBold; - }; - }; - }; - }; - }; -} diff --git a/home/terminal/default.nix b/home/terminal/default.nix index 20f36b5..68ff44e 100644 --- a/home/terminal/default.nix +++ b/home/terminal/default.nix @@ -10,14 +10,13 @@ let in { imports = [ - ./alacritty ./termite ]; options.my.home = with lib; { terminal = { program = mkOption { - type = with types; nullOr (enum [ "alacritty" "termite" ]); + type = with types; nullOr (enum [ "termite" ]); default = null; example = "termite"; description = "Which terminal to use for home session"; diff --git a/home/zsh/default.nix b/home/zsh/default.nix index 646b6e3..bd26903 100644 --- a/home/zsh/default.nix +++ b/home/zsh/default.nix @@ -84,8 +84,11 @@ in reset-agent = "gpg-connect-agent updatestartuptty /bye"; }; - # Enable VTE integration - enableVteIntegration = true; + # Enable VTE integration when using one of the affected shells + enableVteIntegration = + builtins.any (name: config.my.home.terminal.program == name) [ + "termite" + ]; }; # Fuzzy-wuzzy diff --git a/machines/aramis/home.nix b/machines/aramis/home.nix index cdacf04..bac77f4 100644 --- a/machines/aramis/home.nix +++ b/machines/aramis/home.nix @@ -23,8 +23,8 @@ mpv.enable = true; # Network-Manager applet nm-applet.enable = true; - # Terminal - terminal.program = "alacritty"; + # Termite terminal + terminal.program = "termite"; # Zathura document viewer zathura.enable = true; };