diff --git a/programs/alacritty.nix b/programs/alacritty.nix deleted file mode 100644 index 66ec546..0000000 --- a/programs/alacritty.nix +++ /dev/null @@ -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; - }; - }; - }; - }; - }; -} diff --git a/programs/default.nix b/programs/default.nix index ac45df5..a20675e 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -1,10 +1,10 @@ _: { imports = [ - ./alacritty.nix ./bash.nix ./borg.nix ./cargo.nix ./firefox.nix + ./foot.nix ./git.nix ./gpg.nix ./lsd.nix diff --git a/programs/foot.nix b/programs/foot.nix new file mode 100644 index 0000000..cf762b8 --- /dev/null +++ b/programs/foot.nix @@ -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; + }; + }; + }; + }; +} diff --git a/programs/sway.nix b/programs/sway.nix index 4e7c8fa..c9fb071 100644 --- a/programs/sway.nix +++ b/programs/sway.nix @@ -14,7 +14,7 @@ config = let browser = "firefox"; mod = "Mod4"; - terminal = "alacritty"; + terminal = "foot"; theme = import ../theme.nix; makeWorkspaceBinds = num: let