diff --git a/home/features/desktop/hyprland/config.nix b/home/features/desktop/hyprland/config.nix index fbdfcd7..4fdfdca 100644 --- a/home/features/desktop/hyprland/config.nix +++ b/home/features/desktop/hyprland/config.nix @@ -121,6 +121,7 @@ "$mainMod SHIFT, F, fullscreen, 1" ", Print, exec, hyprshade off && grim -g \"$(slurp -w 0 -d -b 00000080)\" - | wl-copy && hyprshade on bluelight" "$mainMod, L, exec, hyprlock" # lockscreen + "$mainMod SHIFT, L, exec, hyprlock & disown && systemctl suspend" # hibernation with lockscreen # Move focus with mainMod + arrow keys "$mainMod, left, movefocus, l" diff --git a/home/features/desktop/hyprland/hyprlock.nix b/home/features/desktop/hyprland/hyprlock.nix index 4a3b184..b654843 100644 --- a/home/features/desktop/hyprland/hyprlock.nix +++ b/home/features/desktop/hyprland/hyprlock.nix @@ -1,5 +1,36 @@ +{ config, ... }: +let + textColor = config.lib.stylix.colors.base05; +in { - programs.hyprlock = { enable = true; - settings={}; + programs.hyprlock = { + enable = true; + settings = { + # background = { + # blur_passes = 1; + # }; + label = [ + # Date + { + text = ''cmd[update:3600000] echo -e " "$(date +'%A, %-d. %B %Y')" "''; + font_size = 35; + color = "rgb(${textColor})"; + position = "0, -150"; + halign = "center"; + valign = "top"; + shadow_passes = 3; + } + # Time + { + text = ''cmd[update:3600000] echo -e " $(date +"%H:%M") "''; + font_size = 94; + color = "rgb(${textColor})"; + position = "0, -210"; + halign = "center"; + valign = "top"; + shadow_passes = 3; + } + ]; + }; }; } diff --git a/hosts/common/optional/desktop/hyprland.nix b/hosts/common/optional/desktop/hyprland.nix index f2e288d..e56dd6d 100644 --- a/hosts/common/optional/desktop/hyprland.nix +++ b/hosts/common/optional/desktop/hyprland.nix @@ -2,6 +2,7 @@ imports = [ ./global.nix ./x11.nix ./wayland.nix ]; programs.hyprland.enable = true; + security.pam.services.hyprlock = { }; # Enable Hyprlock PAM support xdg.portal = { enable = true; @@ -12,14 +13,4 @@ pkgs.xdg-desktop-portal-gtk ]; }; - - environment.etc."systemd/system-sleep/post-hibernate-bluelight.sh".source = pkgs.writeShellScript "post-hibernate-bluelight.sh" '' - if [ "$1-$SYSTEMD_SLEEP_ACTION" = "post-hibernate" ]; then - ${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000 - ${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 6000 - ${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000 - ${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000 - ${pkgs.systemd}/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4000 - fi - ''; } diff --git a/hosts/ludwig/default.nix b/hosts/ludwig/default.nix index 4294461..6f5ef49 100644 --- a/hosts/ludwig/default.nix +++ b/hosts/ludwig/default.nix @@ -71,8 +71,6 @@ services.udev.packages = [pkgs.segger-jlink]; - security.pam.services.hyprlock = { }; - # environment.sessionVariables.QT_QPA_PLATFORM = "wayland"; services.xserver.displayManager.gdm.enable = true; programs = {