From a3383269365eb3a493a7c9540d4bdd1cd2330cb2 Mon Sep 17 00:00:00 2001 From: Emmet Date: Mon, 14 Aug 2023 20:09:18 -0500 Subject: [PATCH] Initial setup for swaylock and swayidle --- user/style/stylix.nix | 10 ++++++++++ user/wm/hyprland/hyprland.nix | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/user/style/stylix.nix b/user/style/stylix.nix index 8b6ed9e..9abde9c 100644 --- a/user/style/stylix.nix +++ b/user/style/stylix.nix @@ -57,6 +57,16 @@ in swaybg -m fill -i ''+config.stylix.image+''; ''; home.file.".swaybg-stylix".executable = true; + # TODO add stylix colors to swaylock cmd + home.file.".swayidle-stylix".text = '' + #!/bin/sh + swaylock_cmd='swaylock --indicator-radius 200 --grace 5 --fade-in 0.5 --screenshots --effect-blur 10x10' + swayidle -w timeout 300 "$swaylock_cmd" \ + timeout 600 'hyprctl dispatch dpms off' \ + resume 'hyprctl dispatch dpms on' \ + before-sleep "$swaylock_cmd" + ''; + home.file.".swayidle-stylix".executable = true; home.file = { ".config/qt5ct/colors/oomox-current.conf".source = config.lib.stylix.colors { template = builtins.readFile ./oomox-current.conf.mustache; diff --git a/user/wm/hyprland/hyprland.nix b/user/wm/hyprland/hyprland.nix index 52520db..a7d2e39 100644 --- a/user/wm/hyprland/hyprland.nix +++ b/user/wm/hyprland/hyprland.nix @@ -19,6 +19,7 @@ exec-once = gnome-keyring-daemon --daemonize --login exec-once = gnome-keyring-daemon --start --components=secrets + exec-once = ~/.swayidle-stylix exec = ~/.swaybg-stylix general { @@ -138,7 +139,7 @@ hyprland-protocols hyprpicker swayidle - swaylock + swaylock-effects swaybg #hyprpaper #wofi