diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2023-06-18 19:27:02 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2023-06-18 19:27:02 +0530 |
commit | 291b855c6cd32393c32a52daf1782e1864000fdf (patch) | |
tree | 80ce9979cdeafb0a7ad8e822a9ab6ef7358b66b8 | |
parent | 2a7a8ac64e9589e051f1ca647f8a0f620b4862ad (diff) |
fixing suspend
-rw-r--r-- | .config/hypr/hyprland.conf | 2 | ||||
-rwxr-xr-x | .scripts/suspend.sh | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index f745b2e..706ec8a 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -5,7 +5,7 @@ monitor=eDP-1,1920x1080@60,0x0,1.00,transform,0 # Execute your favorite apps at launch # exec-once = waybar & hyprpaper & firefox -exec-once = waybar & dunst & wpaperd +exec-once = waybar & dunst & wpaperd & suspend.sh exec-once = exec-once=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY # Source a file (multi-file configs) diff --git a/.scripts/suspend.sh b/.scripts/suspend.sh new file mode 100755 index 0000000..3e5a260 --- /dev/null +++ b/.scripts/suspend.sh @@ -0,0 +1,6 @@ +#!/bin/bash +swayidle -w \ + timeout 240 ' swaylock ' \ + timeout 400 ' hyprctl dispatch dpms off' \ + resume ' hyprctl dispatch dpms on' \ + before-sleep 'swaylock' |