31 lines
1.0 KiB
Bash
Executable File
31 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
dunst() {
|
|
pkill -0 --exact dunst || return 0
|
|
|
|
case ${1:-} in
|
|
stop)
|
|
pkill -USR1 --euid "$(id -u)" --exact dunst
|
|
;;
|
|
resume)
|
|
pkill -USR2 --euid "$(id -u)" --exact dunst
|
|
;;
|
|
*)
|
|
echo "dunst argument required: stop or resume"
|
|
return 1
|
|
;;
|
|
esac
|
|
}
|
|
|
|
dunst stop
|
|
|
|
# Fork both i3lock and its monitor to avoid blocking xautolock.
|
|
i3lock --modsize=18 --radius=120 --timepos="x+400:y+10" --datepos="x+550:y+10" --image=/home/deadguy/Pictures/upzibgR.png -k --timestr="%H:%M" --datestr="%F" --timesize=16 --datesize=16 --timefont="Iosevka" --datefont="Iosevka" --insidevercolor=26c6da99 --insidewrongcolor=e5737399 --insidecolor=00000000 --ringvercolor=95b9deff --ringwrongcolor=ff6c5fff --ringcolor=ffffffff --textcolor=ffffffff --timecolor=ffffffff --datecolor=ffffffff --separatorcolor=121212df --keyhlcolor=29b6f6ff --bshlcolor=ffb300ff -B --ignore-empty-password --beep --nofork &
|
|
|
|
pid="$!"
|
|
while 2>/dev/null kill -0 "$pid"; do
|
|
sleep 1
|
|
done
|
|
|
|
dunst resume
|