aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local')
-rwxr-xr-xdotfiles/.local/bin/lock-color10
1 files changed, 8 insertions, 2 deletions
diff --git a/dotfiles/.local/bin/lock-color b/dotfiles/.local/bin/lock-color
index 0611c29..fbf678f 100755
--- a/dotfiles/.local/bin/lock-color
+++ b/dotfiles/.local/bin/lock-color
@@ -1,10 +1,16 @@
#!/bin/sh
-if [ -n "$SWAYSOCK"]; then
+if [ -n "$SWAYSOCK" ]; then
swaymsg input type:keyboard xkb_switch_layout 0
if [ "$1" != "screenon" ]; then
- swayidle timeout 30 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
+ echo idling
+ swayidle timeout 30 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
+ fi
+elif [ -n "$NIRI_SOCKET" ]; then
+ if [ "$1" != "screenon" ]; then
+ echo idling
+ swayidle timeout 3 'niri msg action power-off-monitors' resume 'niri msg action power-on-monitors' &
fi
fi