This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/scripts/_sway_idle

11 lines
271 B
Bash
Executable File

#!/bin/sh
pkill -9 swayidle
exec swayidle -w \
before-sleep 'swaylock -f' \
timeout 360 'swaylock -f' \
timeout 1800 'mpc status | grep "^\[playing\]" > /dev/null ||
swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \