Merge branch 'master' of git.breizh.pm:Breizh/dotfiles into master
This commit is contained in:
commit
cd33c51a91
1 changed files with 6 additions and 17 deletions
|
@ -1,28 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
runtime="${XDG_RUNTIME_DIR}/i3blocks"
|
||||
[[ ! -d "$runtime" ]] && mkdir -p "$runtime"
|
||||
|
||||
active=$(systemctl --user show -p ActiveState --value dunst.service)
|
||||
|
||||
if [[ -n "$button" ]]
|
||||
then
|
||||
pid=$(systemctl --user show -p MainPID --value dunst.service)
|
||||
if [[ -f "$runtime/dunst" ]]
|
||||
then
|
||||
kill -SIGUSR2 $pid
|
||||
rm "$runtime/dunst"
|
||||
else
|
||||
kill -SIGUSR1 $pid
|
||||
touch "$runtime/dunst"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "dunst "
|
||||
|
||||
if [[ "$active" == "active" ]]
|
||||
then
|
||||
if [[ -f "$runtime/dunst" ]]
|
||||
if [[ -n "$button" ]]
|
||||
then
|
||||
dunstctl set-paused toggle
|
||||
fi
|
||||
|
||||
if [[ "$(dunstctl is-paused)" == "true" ]]
|
||||
then
|
||||
echo "<span foreground=\"#FFCC66\">█</span>"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue