Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2023-01-19 16:55:23 -05:00
parent 6817ebf658
commit 27b7055d21
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
2 changed files with 10 additions and 8 deletions

View File

@ -45,7 +45,7 @@ cpusage() {
}
# Update and upgrade system
update() { sh -c "$UPDATE"; }
update() { $PRIV sh -c "$UPDATE"; }
# Im too lazy to type
copy() {

View File

@ -1,9 +1,11 @@
#!/usr/bin/env bash
if [[ $(playerctl status) != "Playing" ]]; then
swayidle -w timeout 600 'sudo ~/.local/bin/__suspend' &
SUSPEND=$!
if ! ps aux | grep -v grep | grep swaylock; then
if [[ $(playerctl status) != "Playing" ]]; then
swayidle -w timeout 600 'sudo ~/.local/bin/__suspend' &
SUSPEND=$!
fi
swayidle -w timeout 15 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
SCREENOFF=$!
swaylock -eFKL -i ~/.config/sway/background.png --font "Fira Code"
kill $SUSPEND $SCREENOFF
fi
swayidle -w timeout 15 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
SCREENOFF=$!
swaylock -eFKL -i ~/.config/sway/background.png --font "Fira Code"
kill $SUSPEND $SCREENOFF