Add kitty terminal to alpheratz

This commit is contained in:
Ethan Simmons
2024-11-13 12:36:34 -06:00
parent 04696bfd6d
commit 5fb099f6fa
8 changed files with 58 additions and 8 deletions

View File

@@ -162,6 +162,8 @@
networking = { networking = {
wireguard.enable = true; wireguard.enable = true;
}; };
term.terminal = "kitty";
}; };
} }
{ {

View File

@@ -12,5 +12,6 @@
./qt.nix ./qt.nix
./sway.nix ./sway.nix
./gtk.nix ./gtk.nix
./term.nix
]; ];
} }

View File

@@ -8,6 +8,7 @@
with lib; let with lib; let
gui = config.simmer.gui; gui = config.simmer.gui;
term = config.simmer.term;
laptop = config.simmer.laptop; laptop = config.simmer.laptop;
modifier = "Mod4"; modifier = "Mod4";
in in
@@ -56,7 +57,7 @@ in
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle"; "XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"${modifier}+space" = "exec \"kickoff-dot-desktop | ${pkgs.kickoff}/bin/kickoff --from-stdin --stdout | xargs -d '\\n' ${pkgs.sway}/bin/swaymsg exec\""; "${modifier}+space" = "exec \"kickoff-dot-desktop | ${pkgs.kickoff}/bin/kickoff --from-stdin --stdout | xargs -d '\\n' ${pkgs.sway}/bin/swaymsg exec\"";
"${modifier}+Return" = "exec alacritty "; "${modifier}+Return" = "exec ${term.terminal}";
"${modifier}+Control+f" = "exec MOZ_ENABLE_WAYLAND=1 firefox"; "${modifier}+Control+f" = "exec MOZ_ENABLE_WAYLAND=1 firefox";
"${modifier}+Control+t" = "exec thunar"; "${modifier}+Control+t" = "exec thunar";
"${modifier}+Control+h" = "exec helvum"; "${modifier}+Control+h" = "exec helvum";
@@ -209,6 +210,7 @@ in
commands = [ commands = [
{ criteria = { class = "vesktop"; }; command = "opacity 0.9"; } { criteria = { class = "vesktop"; }; command = "opacity 0.9"; }
{ criteria = { app_id = "Alacritty"; }; command = "opacity 0.9"; } { criteria = { app_id = "Alacritty"; }; command = "opacity 0.9"; }
{ criteria = { app_id = "kitty"; }; command = "opacity 0.9"; }
{ criteria = { class = "feishin"; }; command = "opacity 0.9"; } { criteria = { class = "feishin"; }; command = "opacity 0.9"; }
{ criteria = { class = "gamescope"; }; command = "fullscreen"; } { criteria = { class = "gamescope"; }; command = "fullscreen"; }
{ criteria = { app_id = "gamescope"; }; command = "fullscreen"; } { criteria = { app_id = "gamescope"; }; command = "fullscreen"; }

25
modules/home/term.nix Normal file
View File

@@ -0,0 +1,25 @@
{ lib
, pkgs
, config
, ...
}:
with lib; let
cfg = config.simmer.term;
in
{
config = {
programs.kitty = mkIf (cfg.terminal == "kitty") {
enable = true;
settings = {
confirm_os_window_close = 0;
};
};
programs.alacritty = mkIf (cfg.terminal == "alacritty") {
enable = true;
};
};
}

View File

@@ -24,7 +24,6 @@ in
mpv mpv
feh feh
] ]
++ [ cfg.terminal ]
++ optional cfg.matrix cinny-desktop ++ optional cfg.matrix cinny-desktop
++ optional cfg.secrets libsecret ++ optional cfg.secrets libsecret
++ optionals cfg.protonmail [ thunderbird protonmail-bridge ]; ++ optionals cfg.protonmail [ thunderbird protonmail-bridge ];

View File

@@ -16,5 +16,6 @@
./system.nix ./system.nix
./laptop.nix ./laptop.nix
./school.nix ./school.nix
./term.nix
]; ];
} }

View File

@@ -33,12 +33,6 @@ in
}; };
terminal = mkOption {
description = "Which terminal to install (alacritty)";
type = types.enum [ pkgs.alacritty ];
default = pkgs.alacritty;
};
gtk = mkOption { gtk = mkOption {
description = "Whether to configure gtk"; description = "Whether to configure gtk";
type = types.bool; type = types.bool;

26
modules/options/term.nix Normal file
View File

@@ -0,0 +1,26 @@
{ lib
, pkgs
, config
, ...
}:
with lib; let
cfg = config.simmer.term;
gui = config.simmer.gui;
in
{
options.simmer.term = {
enable = mkOption {
description = "Whether to install and configure a terminal";
type = types.bool;
default = gui.enable;
};
terminal = mkOption {
description = "Which terminal to install (alcritty, kitty)";
type = types.enum [ "alacritty" "kitty" ];
default = "alacritty";
};
};
}