about summary refs log tree commit diff
path: root/dotfiles
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-15 02:05:55 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-15 02:05:55 +0200
commit38d25e2f6edca0c0fcb32c1340bafac7c9f4739c (patch)
tree74f8340f8409595cae20ddde9fe1ed109fb59562 /dotfiles
parentAdd tmux program (diff)
downloadnixos-config-38d25e2f6edca0c0fcb32c1340bafac7c9f4739c.tar.gz
nixos-config-38d25e2f6edca0c0fcb32c1340bafac7c9f4739c.tar.bz2
nixos-config-38d25e2f6edca0c0fcb32c1340bafac7c9f4739c.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"