about summary refs log tree commit diff
path: root/dotfiles
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2022-09-15 02:05:55 +0200
committerBaitinq <[email protected]>2022-09-15 02:05:55 +0200
commit27b5a1e7b71a8d15ae5fc0a1e7e14b0a4f1db192 (patch)
tree7b1be58f3766c160f3c752107a0039f0ec53d835 /dotfiles
parentAdd tmux program (diff)
downloadnixos-config-27b5a1e7b71a8d15ae5fc0a1e7e14b0a4f1db192.tar.gz
nixos-config-27b5a1e7b71a8d15ae5fc0a1e7e14b0a4f1db192.tar.bz2
nixos-config-27b5a1e7b71a8d15ae5fc0a1e7e14b0a4f1db192.zip
Add wayland idling/locking via sway(idle/lock)
Diffstat (limited to 'dotfiles')
-rwxr-xr-xdotfiles/river/init6
1 files changed, 6 insertions, 0 deletions
diff --git a/dotfiles/river/init b/dotfiles/river/init
index 106f6f1..0b29c0e 100755
--- a/dotfiles/river/init
+++ b/dotfiles/river/init
@@ -12,6 +12,12 @@
 
 xrdb ~/.Xresources &
 swaybg -i ~/Images/Wallpapers/Day/wave.jpg &
+swayidle -w \
+        timeout 300 'swaylock -f -F -c 000000' \
+	timeout 400 'wlr-randr --output $(wlr-randr | head -n1 | awk "{print $1;}") --off' \
+	resume 'wlr-randr --output $(wlr-randr | head -n1 | awk "{print $1;}") --on' \
+        before-sleep 'swaylock -f -F -c 000000' &
+
 
 riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
 riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"