added hyprland wm module

This commit is contained in:
Bryan Ramos 2024-06-03 05:52:52 -04:00
parent 89ea429204
commit 50482446d4
Signed by: bryan
GPG key ID: 6ABDCD144D6643C8
17 changed files with 741 additions and 46 deletions

View file

@ -0,0 +1,37 @@
{ lib, config, ... }:
with lib;
let
tmux = config.modules.user.tmux;
gui = config.modules.user.gui.wm;
sway = config.modules.user.gui.wm.sway;
hyprland = config.modules.user.gui.wm.hyprland;
wm = {
enable = builtins.any (mod: mod.enable or false) (builtins.attrValues gui);
};
in
''
case $- in
*i*)
${optionalString wm.enable ''
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
${optionalString sway.enable ''
exec sway
''
}
${optionalString hyprland.enable ''
exec Hyprland
''
}
fi
''}
${optionalString tmux.enable ''
if [ -z "$DISPLAY" ] && [ -z "$TMUX" ]; then
exec tmux
fi
''}
;;
esac
''