dotfiles/.local/bin/scripts/black

16 lines
305 B
Text
Raw Normal View History

2024-06-28 22:34:35 +03:00
#!/bin/sh -e
2025-02-04 11:52:56 +01:00
# Suspend screen until enter is pressed or interrupted
2025-06-08 12:15:07 +02:00
$(which timer || sleep) "${1:-3}"
2024-06-28 22:34:35 +03:00
dpms() {
if test $XDG_SESSION_TYPE = wayland
then swaymsg "output * dpms $*"
else xset dpms force "$@"
fi
}
dpms off
trap 'dpms on' INT
2025-06-08 12:15:07 +02:00
test $# -gt 1 && shift && save "$@"
2025-02-04 11:52:56 +01:00
sleep 3
read _
2024-06-28 22:34:35 +03:00
dpms on