From 5adce8c287aa13a145f0752684c8ac6453bbca3d Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Sat, 13 Feb 2021 20:02:41 +0100 Subject: [PATCH] feat: remove alsa-utils amixer -> pulsemixer --- .config/paru/pkglist.txt | 1 - .config/sxhkd/sxhkdrc | 6 ++++-- .local/bin/audio_notify | 6 +++--- .xprofile | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.config/paru/pkglist.txt b/.config/paru/pkglist.txt index 4a4e12b..bef13f9 100644 --- a/.config/paru/pkglist.txt +++ b/.config/paru/pkglist.txt @@ -2,7 +2,6 @@ abcde adobe-source-han-sans-cn-fonts adobe-source-han-sans-jp-fonts alsa-plugins -alsa-utils android-tools android-udev arandr diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 4c7f360..9c23600 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -2,8 +2,10 @@ # System stuff -super + {F1, F2, F3} - amixer --quiet set Master {toggle, 5%-, 5%+}; refbar; audio_notify +super + F1 + pulsemixer --toggle-mute; audio_notify +super + {F2, F3} + pulsemixer --change-volume {-5, +5}; audio_notify super + {F5, F6} sbacklight {dec,inc} diff --git a/.local/bin/audio_notify b/.local/bin/audio_notify index 905ee20..1ce428e 100755 --- a/.local/bin/audio_notify +++ b/.local/bin/audio_notify @@ -10,10 +10,10 @@ ###################################################################### -level="$(amixer sget Master | awk -F "[][]" ' { printf "%s", $2 }' | awk -F "%" '{printf $1}')" -muted="$(amixer sget Master | awk -F "[][]" '/%/ { printf "%4s", $4 }' | awk '{printf $1}')" +level="$(pulsemixer --get-volume | awk -F " " '{ printf "%d", $1 }')" +muted="$(pulsemixer --get-mute)" -if [ "$muted" = "off" ]; then +if [ "1" = "$muted" ]; then dunstify -r 100002 "Sound muted" "$level%" else case "$level" in diff --git a/.xprofile b/.xprofile index 3dac138..2c4a0b9 100644 --- a/.xprofile +++ b/.xprofile @@ -9,7 +9,7 @@ redshift & dunst -follow mouse &> /dev/null & #temp fix # MPD daemon start (if no other user instance exists) [ ! -s ~/.config/mpd/pid ] && mpd -amixer set Master 50% +pulsemixer --set-volume 50 sbacklight set 3 & bat_notify & AC_notify &