aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2022-12-11 20:56:27 -0700
committerkatherine <ageha@airen-no-jikken.icu>2022-12-11 20:56:27 -0700
commitdfdc8e86b27197ea874929537a8129cc552ff599 (patch)
tree2b78d3fdaabb5ffa8bfffc9b9006b49b195fa48f /.config/herbstluftwm
parent60aac881c76bfa94eb58224c907adcfdccdb91cf (diff)
downloaddotfiles-dfdc8e86b27197ea874929537a8129cc552ff599.tar.gz
update to latest dunst
remove forked version and make necessary relevant adjustments
Diffstat (limited to '.config/herbstluftwm')
-rwxr-xr-x.config/herbstluftwm/autostart9
-rwxr-xr-x.config/herbstluftwm/mpc-status.sh15
-rwxr-xr-x.config/herbstluftwm/pvol.sh17
3 files changed, 21 insertions, 20 deletions
diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart
index 89b7ff8..f0305c9 100755
--- a/.config/herbstluftwm/autostart
+++ b/.config/herbstluftwm/autostart
@@ -107,6 +107,9 @@ hc keybind Mod4-w jumpto last-minimized
## launchers
+#dunst
+hc keybind Mod4-minus spawn dunstctl close-all
+
#pass
hc keybind Mod4-x spawn ~/.config/herbstluftwm/pass.sh
hc keybind Mod4-Shift-x spawn ~/.config/herbstluftwm/pass.sh -f
@@ -225,8 +228,4 @@ done
# run dunst with theme colours
pkill dunst
-dunst -lb $bar_bg -nb $bar_bg -cb $bg_focus \
- -lf $bar_fg -nf $bar_fg -cf $fg_focus \
- -frame_color $bg_focus -geom "0x3-4+$(($bheight + 4))" \
- -fn "$mfont $mfont_size" \
- -max_icon_size 0
+dunst &
diff --git a/.config/herbstluftwm/mpc-status.sh b/.config/herbstluftwm/mpc-status.sh
index 6f3f699..31c13f4 100755
--- a/.config/herbstluftwm/mpc-status.sh
+++ b/.config/herbstluftwm/mpc-status.sh
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env zsh
source $HOME/.config/init/vars
-case "$1" in
+case $1 in
next)
mpc next
;;
@@ -15,23 +15,20 @@ esac
mpc status >/dev/null 2>&1
if [[ $? -ne 0 ]]; then
- notify-send -a closeme "mpd disconnected"
+ dunstify -r 109112100 "mpd disconnected"
exit
fi
-if [[ -z "$(mpc status | grep -E '\[(playing|paused)\]')" ]]; then
- notify-send -a closeme "mpd stopped"
+if [[ -z $(mpc status | grep -E '\[(playing|paused)\]') ]]; then
+ dunstify -r 109112100 "mpd stopped"
exit
fi
cd ~/music/
dir=$(dirname "$(mpc current -f %file%)")
-# linking is necessary because notify-send can't into icon paths containing commas
-cd $tmpdir
-ln -sf "$HOME/music/$dir/cover-small.png" mpd-icon.png
message="$(mpc current -f '##%track% %title% (%date%)\n%artist% - %album%')
$(mpc status | tail -n -2 | sed -re 's/volume.*repeat/\nrepeat/' -e 's/( ){3,4}/\n/g' -e '/volume: /d')"
-notify-send -t 4000 -a closeme --icon=$tmpdir/mpd-icon.png "$message"
+dunstify -t 4000 -r 109112100 --icon="$HOME/music/$dir/cover-small.png" $message
diff --git a/.config/herbstluftwm/pvol.sh b/.config/herbstluftwm/pvol.sh
index 820d890..8d5984e 100755
--- a/.config/herbstluftwm/pvol.sh
+++ b/.config/herbstluftwm/pvol.sh
@@ -2,15 +2,20 @@
case "$1" in
down)
- pavolume voldown --quiet 2
+ pactl set-sink-volume @DEFAULT_SINK@ -2%
;;
up)
- pavolume volup --quiet 2
+ pactl set-sink-volume @DEFAULT_SINK@ +2%
;;
mute)
- pavolume mutetoggle --quiet
- ;;
- *)
- pavolume show
+ pactl set-sink-mute @DEFAULT_SINK@ toggle
;;
esac
+
+{
+ [[ $(pactl get-sink-mute @DEFAULT_SINK@) =~ "yes" ]] && printf "Muted: " || printf "Volume: "
+
+ pactl get-sink-volume @DEFAULT_SINK@ | sed -e N -e 's/\n//g' -e 's/.* \([0-9]\{1,2\}%\).*/\1/'
+} | read body
+
+dunstify -r 118111108 $body