feat(desktop): use ghostty as terminal
This commit is contained in:
18
modules/desktop/apps/ghostty.nix
Normal file
18
modules/desktop/apps/ghostty.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
# Ghostty as the desktop terminal.
|
||||
let
|
||||
cfg = config.modules.desktop.apps.ghostty;
|
||||
user = config.user.name;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.apps.ghostty.enable = lib.mkEnableOption "Ghostty as the desktop terminal";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${user}.home.packages = [ pkgs.ghostty ];
|
||||
};
|
||||
}
|
||||
@@ -9,8 +9,8 @@ in
|
||||
# Each piece is turned on at default priority, so a host can still override
|
||||
# any one of them while the single flag above enables the whole desktop.
|
||||
config = lib.mkIf cfg.enable {
|
||||
modules.desktop.apps.alacritty.enable = lib.mkDefault true;
|
||||
modules.desktop.apps.firefox.enable = lib.mkDefault true;
|
||||
modules.desktop.apps.ghostty.enable = lib.mkDefault true;
|
||||
modules.desktop.session.hyprland.enable = lib.mkDefault true;
|
||||
modules.desktop.session.hyprland.hypridle.enable = lib.mkDefault true;
|
||||
modules.desktop.session.hyprland.hyprlock.enable = lib.mkDefault true;
|
||||
|
||||
@@ -61,7 +61,7 @@ in
|
||||
|
||||
settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$terminal" = "alacritty";
|
||||
"$terminal" = "ghostty";
|
||||
|
||||
# Session variables handed to the compositor directly.
|
||||
# UWSM launches the session without the shell profile that would carry
|
||||
|
||||
@@ -89,6 +89,7 @@ in
|
||||
window-rewrite-default = g "f2d0";
|
||||
window-rewrite = {
|
||||
"class<Alacritty>" = g "f120";
|
||||
"class<com.mitchellh.ghostty>" = g "f120";
|
||||
"class<.*[Ff]irefox.*>" = g "f269";
|
||||
"class<chromium.*>" = g "f268";
|
||||
"class<[Cc]ode>" = g "f121";
|
||||
|
||||
Reference in New Issue
Block a user