waybar: extract _sway_idle_toggle script

This commit is contained in:
Leonardo Eugênio 2023-05-04 19:32:12 -03:00
parent 8d980ed634
commit 517086541e
4 changed files with 14 additions and 10 deletions

11
scripts/_sway_idle_toggle Normal file
View file

@ -0,0 +1,11 @@
#!/bin/sh
swayidlectl() {
systemctl --user $1 swayidle.service
}
if swayidlectl status > /dev/null; then
swayidlectl stop
else
swayidlectl start
fi