z_mirror/dotfiles
git clone https://git.raiguard.me/z_mirror/dotfiles
c2104b5
trunk
1#!/bin/sh 2# Blank screen after 10 minutes 3# Lock after 10 minutes and 10 seconds 4 5case "$XDG_CURRENT_DESKTOP" in 6 sway) 7 exec /usr/bin/swayidle -w \ 8 timeout 600 'chayang && swaymsg "output * power off"' \ 9 timeout 610 'swaylock -f' \ 10 resume 'swaymsg "output * power on"' \ 11 before-sleep 'swaylock -f' \ 12 after-resume 'swaymsg "output * power on"' 13 ;; 14 niri) 15 # niri doesn't yet support single-pixel-buffers, so chayang won't work 16 exec /usr/bin/swayidle -w \ 17 timeout 600 'niri msg action power-off-monitors' \ 18 timeout 610 'swaylock -f' \ 19 before-sleep 'swaylock -f' 20 ;; 21esac