Compare commits

..

7 commits

Author SHA1 Message Date
Bruno BELANYI b4d050a5f8 machines: aramis: home: migrate to 'alacritty'
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-12 17:35:14 +00:00
Bruno BELANYI e8a46ae248 home: firefox: tridactyl: use preferred terminal
Thankfully, alacritty and termite both use the same command line
arguments for this. If I ever want to use another one, I might have to
make the logic a bit more robust.
2023-02-12 17:33:45 +00:00
Bruno BELANYI 4f883b0198 home: terminal: remove DPI workaround
And instead change the font size to be *about* right.
2023-02-12 17:32:48 +00:00
Bruno BELANYI f89e10fdca home: terminal: add alacritty 2023-02-12 16:57:54 +00:00
Bruno BELANYI b6bbe5a01e home: firefox: tridactyl: move cursor in editor
This means that the cursor in vim will be in the same position as the
one in the input form.
2023-02-12 16:57:54 +00:00
Bruno BELANYI d25922ef15 home: packages: remove 'termite.terminfo' 2023-02-12 16:46:18 +00:00
Bruno BELANYI c1c3146311 home: zsh: always enable VTE integration 2023-02-12 16:43:55 +00:00
7 changed files with 72 additions and 13 deletions

View file

@ -1,9 +1,20 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.firefox.tridactyl;
in
{
config = lib.mkIf cfg.enable {
xdg.configFile."tridactyl/tridactylrc".source = ./tridactylrc;
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|'"''
];
};
};
}

View file

@ -5,8 +5,7 @@
colorscheme dark
" Make tridactyl open Vim in my prefered terminal
" FIXME: make it follow my prefered terminal
set editorcmd termite --class tridactyl_editor -e 'vim %f'
set editorcmd @editorcmd@
" }}}
" Binds {{{

View file

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

View file

@ -0,0 +1,52 @@
{ 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,13 +10,14 @@ let
in
{
imports = [
./alacritty
./termite
];
options.my.home = with lib; {
terminal = {
program = mkOption {
type = with types; nullOr (enum [ "termite" ]);
type = with types; nullOr (enum [ "alacritty" "termite" ]);
default = null;
example = "termite";
description = "Which terminal to use for home session";

View file

@ -84,11 +84,8 @@ in
reset-agent = "gpg-connect-agent updatestartuptty /bye";
};
# Enable VTE integration when using one of the affected shells
enableVteIntegration =
builtins.any (name: config.my.home.terminal.program == name) [
"termite"
];
# Enable VTE integration
enableVteIntegration = true;
};
# Fuzzy-wuzzy

View file

@ -23,8 +23,8 @@
mpv.enable = true;
# Network-Manager applet
nm-applet.enable = true;
# Termite terminal
terminal.program = "termite";
# Terminal
terminal.program = "alacritty";
# Zathura document viewer
zathura.enable = true;
};