feat(terminal): switch to foot

This commit is contained in:
buffet 2022-12-02 13:58:25 +00:00
parent 426ea264f3
commit 9675234d6e
4 changed files with 50 additions and 55 deletions

View file

@ -1,53 +0,0 @@
_: {
home-manager.users.buffet = {
programs.alacritty = {
enable = true;
settings = {
window.padding = {
x = 8;
y = 8;
};
font = with import ../theme.nix; {
inherit (font) size;
normal = {
inherit (font) family;
style = "Regular";
};
bold = {
inherit (font) family;
style = "Bold";
};
italic = {
inherit (font) family;
style = "Italic";
};
bold_italic = {
inherit (font) family;
style = "Bold Italic";
};
};
colors = with import ../theme.nix; {
primary = {
inherit (primary) background foreground;
};
cursor = {
cursor = cursor.background;
text = cursor.foreground;
};
normal = {
inherit (normal) black red green yellow blue magenta cyan white;
};
bright = {
inherit (bright) black red green yellow blue magenta cyan white;
};
};
};
};
};
}

View file

@ -1,10 +1,10 @@
_: { _: {
imports = [ imports = [
./alacritty.nix
./bash.nix ./bash.nix
./borg.nix ./borg.nix
./cargo.nix ./cargo.nix
./firefox.nix ./firefox.nix
./foot.nix
./git.nix ./git.nix
./gpg.nix ./gpg.nix
./lsd.nix ./lsd.nix

48
programs/foot.nix Normal file
View file

@ -0,0 +1,48 @@
{lib, ...}: {
home-manager.users.buffet = {
programs.foot = {
enable = true;
server.enable = true;
settings =
let
theme = import ../theme.nix;
dehash = lib.attrsets.mapAttrs (_: v: lib.strings.removePrefix "#" v);
normal = dehash theme.normal;
bright = dehash theme.bright;
in {
main = {
font = "${theme.font.family}:size=${toString (theme.font.size - 2)}";
pad = "${toString theme.font.size}x${toString theme.font.size}";
};
url = {
launch = ''firefox ''${url}'';
};
colors = {
foreground = lib.strings.removePrefix "#" theme.primary.foreground;
background = lib.strings.removePrefix "#" theme.primary.background;
regular0 = normal.black;
regular1 = normal.red;
regular2 = normal.green;
regular3 = normal.yellow;
regular4 = normal.blue;
regular5 = normal.magenta;
regular6 = normal.cyan;
regular7 = normal.white;
bright0 = bright.black;
bright1 = bright.red;
bright2 = bright.green;
bright3 = bright.yellow;
bright4 = bright.blue;
bright5 = bright.magenta;
bright6 = bright.cyan;
bright7 = bright.white;
};
};
};
};
}

View file

@ -14,7 +14,7 @@
config = let config = let
browser = "firefox"; browser = "firefox";
mod = "Mod4"; mod = "Mod4";
terminal = "alacritty"; terminal = "foot";
theme = import ../theme.nix; theme = import ../theme.nix;
makeWorkspaceBinds = num: let makeWorkspaceBinds = num: let