diff --git a/hosts/home.nix b/hosts/home.nix index f9f5156..5affe64 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -128,6 +128,7 @@ #obs-studio # Recording/Live Streaming ]; file.".config/wall".source = ../modules/themes/wall.jpg; + file.".config/lockwall".source = ../modules/themes/lockwall.jpg; pointerCursor = { # This will set cursor systemwide so applications can not choose their own name = "Dracula-cursors"; package = pkgs.dracula-theme; diff --git a/modules/desktop/hyprland/home.nix b/modules/desktop/hyprland/home.nix index 5171d2e..afb8082 100644 --- a/modules/desktop/hyprland/home.nix +++ b/modules/desktop/hyprland/home.nix @@ -115,4 +115,21 @@ exec-once=${pkgs.blueman}/bin/blueman-applet ''; }; + programs.swaylock.settings = { + color = "000000"; + image = "$HOME/.config/wall"; + }; + + services.swayidle = { + enable = true; + events = [ + { event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; } + { event = "lock"; command = "${pkgs.swaylock}/bin/swaylock -fF"; } + { event = "after-resume"; command = "${pkgs.hyprland}/bin/hyprctl dispatcher dpms on"; } + ]; + timeouts = [ + { timeout = 300; command = "${pkgs.swaylock}/bin/swaylock -fF"; } + { timeout = 600; command = "${pkgs.hyprland}/bin/hyprctl dispatcher dpms off"; } + ]; + }; } diff --git a/modules/themes/lockwall.jpg b/modules/themes/lockwall.jpg new file mode 100644 index 0000000..864935c Binary files /dev/null and b/modules/themes/lockwall.jpg differ