60 lines
1.4 KiB
Nix
60 lines
1.4 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
enabled = config.mod.foot.enable;
|
|
|
|
hyprlandEnabled = config.mod.hyprland.enable;
|
|
|
|
colors = config.lib.colors.terminal;
|
|
indexed = prefix: list: lib.listToAttrs (lib.imap0 (i: c: lib.nameValuePair "${prefix}${toString i}" c) list);
|
|
in
|
|
{
|
|
options = {
|
|
mod.foot = {
|
|
enable = lib.mkEnableOption "enable foot module";
|
|
};
|
|
};
|
|
|
|
config = {
|
|
home-manager.users.alex = lib.mkIf enabled {
|
|
programs.foot = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
main = {
|
|
term = "xterm-256color";
|
|
font = "JetBrainsMono Nerd Font:size=17";
|
|
};
|
|
|
|
colors-dark = {
|
|
foreground = colors.foreground;
|
|
background = colors.background;
|
|
cursor = "${colors.background} ${colors.cursor}";
|
|
selection-foreground = colors.foreground;
|
|
selection-background = colors.selection;
|
|
}
|
|
// indexed "regular" colors.regular
|
|
// indexed "bright" colors.bright;
|
|
};
|
|
};
|
|
|
|
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
|
|
settings = {
|
|
bind = [
|
|
{
|
|
_args = [
|
|
"SUPER + RETURN"
|
|
(lib.generators.mkLuaInline ''hl.dsp.exec_cmd("${pkgs.foot}/bin/foot")'')
|
|
];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|