summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-12-24 16:29:43 -0700
committerDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-12-24 16:29:43 -0700
commit61a81bbd67e7e109cd1370dcb4c24d81f3baab14 (patch)
tree9a19d075c68c949a41f6d78f9eac246c81f708d7
parentd719f804bab62b0525f6f44cc8c6820ddd4b42d0 (diff)
Add dunst muting
-rw-r--r--.config/polybar/common.ini2
-rw-r--r--.config/polybar/config1
-rw-r--r--.config/polybar/dunst.ini14
-rw-r--r--.config/polybar/main.ini2
4 files changed, 18 insertions, 1 deletions
diff --git a/.config/polybar/common.ini b/.config/polybar/common.ini
index 19634c6..4bcf3eb 100644
--- a/.config/polybar/common.ini
+++ b/.config/polybar/common.ini
@@ -6,6 +6,8 @@ offset-y = 0%
radius = 0.0
fixed-center = false
+enable-ipc = true
+
font-0 = Noto Sans Mono:pixelsize=10;1
font-1 = Noto Color Emoji:scale=10;1
font-2 = Font Awesome 5 Free:pixelsize=10;1
diff --git a/.config/polybar/config b/.config/polybar/config
index 4af1275..2c33cad 100644
--- a/.config/polybar/config
+++ b/.config/polybar/config
@@ -31,6 +31,7 @@ include-file = $XDG_CONFIG_HOME/polybar/xkeyboard.ini
include-file = $XDG_CONFIG_HOME/polybar/filesystem.ini
include-file = $XDG_CONFIG_HOME/polybar/eth.ini
include-file = $XDG_CONFIG_HOME/polybar/wlan.ini
+include-file = $XDG_CONFIG_HOME/polybar/dunst.ini
# Other modules that came by default on the example config.
diff --git a/.config/polybar/dunst.ini b/.config/polybar/dunst.ini
new file mode 100644
index 0000000..202eba0
--- /dev/null
+++ b/.config/polybar/dunst.ini
@@ -0,0 +1,14 @@
+[module/dunst]
+type = custom/ipc
+initial = 1
+
+format = <output>
+format-underline = ${colors.purple}
+
+# For a single button to toggle use the %{An} tag on the hook variable
+# where the command would be that of click-x.
+hook-0 = echo "%{F$(xresource color2)}%{F-}"
+hook-1 = echo "%{F$(xresource color1)}%{F-}"
+
+click-left = notify-send "DUNST_COMMAND_RESUME" && polybar-msg -p %pid% hook dunst 1
+click-right = notify-send "DUNST_COMMAND_PAUSE" && polybar-msg -p %pid% hook dunst 2
diff --git a/.config/polybar/main.ini b/.config/polybar/main.ini
index 5c7c8f1..0fbabb8 100644
--- a/.config/polybar/main.ini
+++ b/.config/polybar/main.ini
@@ -4,7 +4,7 @@ monitor = ${env:MAINMON:HDMI-0}
modules-left=bspwm xwindow
modules-center=
-modules-right=xkeyboard cpu memory pulseaudio date powermenu
+modules-right=xkeyboard cpu memory pulseaudio date dunst powermenu
# tray-position = right
# tray-padding = 2