Compare commits

..

No commits in common. "b4d050a5f89ebd9e56c68a17368a43f0aae96a4f" and "70f5e46860136a5c8d8c8b9bdeeecb7763fec080" have entirely different histories.

7 changed files with 13 additions and 72 deletions

View file

@ -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;
};
}

View file

@ -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 {{{

View file

@ -22,5 +22,6 @@ in
file
mosh
ripgrep
termite.terminfo
] ++ cfg.additionalPackages);
}

View file

@ -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;
};
};
};
};
};
}

View file

@ -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";

View file

@ -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

View file

@ -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;
};