Hyprland: Customize Hyprlock

This commit is contained in:
GHOSCHT 2025-01-13 17:40:59 +01:00
parent b79ffba8e8
commit 52aa60db5e
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
4 changed files with 35 additions and 14 deletions

View file

@ -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"

View file

@ -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 "<b> "$(date +'%A, %-d. %B %Y')" </b>"'';
font_size = 35;
color = "rgb(${textColor})";
position = "0, -150";
halign = "center";
valign = "top";
shadow_passes = 3;
}
# Time
{
text = ''cmd[update:3600000] echo -e "<b><big> $(date +"%H:%M") </big></b>"'';
font_size = 94;
color = "rgb(${textColor})";
position = "0, -210";
halign = "center";
valign = "top";
shadow_passes = 3;
}
];
};
};
}

View file

@ -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
'';
}

View file

@ -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 = {