From 8ff35ec45d889bf0b625490a9ad276e5cf4fa185 Mon Sep 17 00:00:00 2001 From: Logan G Date: Sun, 24 Sep 2023 02:33:59 -0600 Subject: [PATCH] Added swayidle to Hyprland --- .config/hypr/conf.d/vars.conf.example | 3 +++ .config/hypr/hyprland.conf | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/hypr/conf.d/vars.conf.example b/.config/hypr/conf.d/vars.conf.example index 4f44064..7153631 100644 --- a/.config/hypr/conf.d/vars.conf.example +++ b/.config/hypr/conf.d/vars.conf.example @@ -1 +1,4 @@ $lockBG = ~/Pictures/orion-nebula-5120x2880-hubble-space-telescope-nasa-hd-5k-1933.jpg +$idleLockTime = 600 +$idleScreenTime = 605 +$idleScreenTimeLocked = 10 diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 3a093a9..5a9823d 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -80,6 +80,7 @@ misc { #windowrule=pseudo,abc #windowrule=monitor 0,xyz +$lockCMD = swaylock -e -F -f -i $lockBG # ------------------- BINDS ----------------------- # # some nice mouse binds @@ -91,7 +92,7 @@ bind=SUPER,Return,exec,footclient bind=SUPERCTRL,Q,exec,hyprctl kill bind=SUPERSHIFT,c,exec,pkill waybar && waybar -c ~/.config/waybar/hyprland bind=SUPERSHIFT,r,exec,hyprctl reload -bind=CTRLALT,l,exec,swaylock -e -F -f -i $lockBG +bind=CTRLALT,l,exec,$lockCMD bind=SUPER,D,exec,wofi --show drun --allow-images -G -i --define=drun-print_command=true | sed -e 's/%[A-Za-z0-9]*/ /g' | xargs hyprctl dispatch exec bind=,Print,exec,grim -g "$(slurp)" - | swappy -f - bind=SUPERSHIFT,E,exec,zenity --question --text='Do you wish to exit Hyprland?' --default-cancel && hyprctl dispatch exit @@ -183,5 +184,6 @@ exec-once = wl-paste --type text --watch cliphist store #Stores only text data exec-once = wl-paste --type image --watch cliphist store #Stores only image data exec-once = lxqt-policykit-agent exec-once = hyprpaper +exec-once = swayidle -w timeout $idleLockTime '$lockCMD' timeout $idleScreenTime 'hyprctl dispatch dpms off' timeout $idleScreenTimeLocked 'pgrep -x swaylock && hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep '$lockCMD' before-sleep 'playerctl -a pause' source = ~/.config/hypr/conf.d/override.conf