aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-02-23 18:11:25 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-02-23 18:11:25 +0100
commit33788846e2662d0bf792401fd770fe5d738e60af (patch)
tree9d37b1572e04a1221a24c4d0c16057c0e8a97e34
parent8728e9e370100b56afed1e618e4c61c403e1228d (diff)
downloaddotfiles-33788846e2662d0bf792401fd770fe5d738e60af.tar.gz
dotfiles-33788846e2662d0bf792401fd770fe5d738e60af.tar.bz2
dotfiles-33788846e2662d0bf792401fd770fe5d738e60af.zip
Updated volume notification done directly by pulseaudio-ctl, with dunst configured to stack them (like regular volume notification), Removed volume-ctl script
-rwxr-xr-xbin/volume-ctl12
-rw-r--r--dunst/dunstrc12
-rwxr-xr-xinstall1
-rw-r--r--pulseaudio-ctl/config25
-rw-r--r--xmonad.hs11
5 files changed, 36 insertions, 25 deletions
diff --git a/bin/volume-ctl b/bin/volume-ctl
deleted file mode 100755
index 7e3ec83..0000000
--- a/bin/volume-ctl
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-[ "$#" -ne 1 ] && exit 1;
-
-case "$1" in
- "up") pulseaudio-ctl up ;;
- "down") pulseaudio-ctl down ;;
- "mute") pulseaudio-ctl mute ;;
- *) exit 1 ;;
-esac
-
-notify-send "volume $(pulseaudio-ctl full-status | cut -d ' ' -f 1)"
diff --git a/dunst/dunstrc b/dunst/dunstrc
index a9eba7f..3e10f2e 100644
--- a/dunst/dunstrc
+++ b/dunst/dunstrc
@@ -126,7 +126,7 @@
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
- format = "<b>%s</b>\n%b"
+ format = "<b>%s</b>\n%b%p"
# Alignment of message text.
# Possible values are "left", "center" and "right".
@@ -406,9 +406,9 @@
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
-#
-#[stack-volumes]
-# appname = "some_volume_notifiers"
-# set_stack_tag = "volume"
-#
+
+[stack-volumes]
+ appname = "pulseaudio-ctl"
+ set_stack_tag = "volume"
+
# vim: ft=cfg
diff --git a/install b/install
index 8d639da..5b12db2 100755
--- a/install
+++ b/install
@@ -45,6 +45,7 @@ create_dotfile_link applications/zathura.desktop .data/applications/zathura.des
create_dotfile_link applications/newsboat.desktop .data/applications/newsboat.desktop
create_dotfile_link dunst/dunstrc .config/dunst/dunstrc
+create_dotfile_link pulseaudio-ctl/config .config/pulseaudio-ctl/config
create_dotfile_link_same .newsboat/config
#create_dotfile_link_same .newsboat/urls
diff --git a/pulseaudio-ctl/config b/pulseaudio-ctl/config
new file mode 100644
index 0000000..51d65b4
--- /dev/null
+++ b/pulseaudio-ctl/config
@@ -0,0 +1,25 @@
+#
+# $HOME/.config/pulseaudio-ctl/config
+#
+
+# The default setting is for pulseaudio-ctl to NOT increase to volume level
+# above 100 % but Some users may wish exceed this level. If this describes
+# your use case, uncomment the UPPER_THRESHOLD variable below setting it to
+# the new upper threshold.
+#
+#UPPER_THRESHOLD=150
+
+# Push output through libnotify. Set to any value to enable this feature
+# and note that you must have /usr/bin/notify-send to use this. On Arch
+# libnotify provides this. Other distros may not name it as such.
+#
+NOTIFY=yes
+
+# Show a graphical progress-bar type visualization of the volume level in
+# libnotify. No setting or commented out will show a simply percentage but
+# a setting will convert the percentage to a progress-bar in libnotify.
+#
+BARCHART=yes
+
+# Use KDE OSD notification. Set to any value to enable this feature.
+#KDE_OSD=yes
diff --git a/xmonad.hs b/xmonad.hs
index d165011..b18951e 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -39,14 +39,11 @@ myLayouts = tiledBigMaster -- bigger master for code and smaller slave fo
myManageHook = insertPosition End Newer -- insert new window at the end of the current layout
-volumeUpCmd = "pulseaudio-ctl up"
-volumeDownCmd = "pulseaudio-ctl down"
-
-myKeys = [ ("<XF86AudioLowerVolume>", spawn volumeDownCmd)
- , ("<XF86AudioRaiseVolume>", spawn volumeUpCmd)
+myKeys = [ ("<XF86AudioLowerVolume>", spawn "pulseaudio-ctl down")
+ , ("<XF86AudioRaiseVolume>", spawn "pulseaudio-ctl up")
, ("<XF86AudioMute>", spawn "pulseaudio-ctl mute")
- , ("M-<F11>", spawn volumeDownCmd)
- , ("M-<F12>", spawn volumeUpCmd)
+ , ("M-<F11>", spawn "pulseaudio-ctl down")
+ , ("M-<F12>", spawn "pulseaudio-ctl up")
, ("<XF86MonBrightnessUp>", spawn "~/bin/backlight-ctl up")
, ("<XF86MonBrightnessDown>", spawn "~/bin/backlight-ctl down")