Add do-not-disturb module
This commit is contained in:
8
bin/dnd
Executable file
8
bin/dnd
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
# Copied from https://github.com/Alexays/Waybar/wiki/Module:-Custom#dunst
|
||||||
|
|
||||||
|
COUNT=$(dunstctl count waiting)
|
||||||
|
ENABLED=
|
||||||
|
DISABLED=
|
||||||
|
if [ $COUNT != 0 ]; then DISABLED=" $COUNT"; fi
|
||||||
|
if dunstctl is-paused | grep -q "false" ; then echo $ENABLED; else echo $DISABLED; fi
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
"modules-right": [
|
"modules-right": [
|
||||||
"custom/weather",
|
"custom/weather",
|
||||||
"custom/pacman-updates",
|
"custom/pacman-updates",
|
||||||
|
"custom/dnd",
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
"sway/language",
|
"sway/language",
|
||||||
"network",
|
"network",
|
||||||
@@ -43,6 +44,12 @@
|
|||||||
"on-click": "alacritty -e sudo pacman -Syu",
|
"on-click": "alacritty -e sudo pacman -Syu",
|
||||||
"tooltip": false
|
"tooltip": false
|
||||||
},
|
},
|
||||||
|
"custom/dnd": {
|
||||||
|
"exec": "$HOME/dotfiles/bin/dnd",
|
||||||
|
"on-click": "dunstctl set-paused toggle",
|
||||||
|
"restart-interval": 0,
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"format-muted": "MUTE"
|
"format-muted": "MUTE"
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ window#waybar {
|
|||||||
color: @primary;
|
color: @primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-dnd,
|
||||||
#custom-player,
|
#custom-player,
|
||||||
#custom-weather,
|
#custom-weather,
|
||||||
#custom-pacman-updates,
|
#custom-pacman-updates,
|
||||||
|
|||||||
Reference in New Issue
Block a user