aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/dunst/dunstrc2
-rw-r--r--.config/waybar/config4
-rwxr-xr-x.local/bin/statusbar/sb-microphone50
-rwxr-xr-x.local/bin/statusbar/sb-volume54
4 files changed, 55 insertions, 55 deletions
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc
index 11d2488..d698cd2 100644
--- a/.config/dunst/dunstrc
+++ b/.config/dunst/dunstrc
@@ -7,7 +7,7 @@
padding = 2
horizontal_padding = 2
transparency = 25
- font = JetBrainsMono Nerd Font Mono 12
+ font = JetBrainsMono Nerd Font 12
format = "<b>%s</b>\n%b"
[urgency_low]
diff --git a/.config/waybar/config b/.config/waybar/config
index 4c0b071..8ff3c7a 100644
--- a/.config/waybar/config
+++ b/.config/waybar/config
@@ -71,10 +71,12 @@
"format": "{}",
"signal": 8,
"exec" : "sb-microphone",
+ "on-click": "sb-microphone 1",
"on-click-middle": "wpctl set-mute @DEFAULT_SOURCE@ toggle; pkill -RTMIN+8 waybar",
"on-scroll-up": "wpctl set-volume @DEFAULT_SOURCE@ 0.01+; pkill -RTMIN+8 waybar",
"on-scroll-down": "wpctl set-volume @DEFAULT_SOURCE@ 0.01-; pkill -RTMIN+8 waybar",
"on-click-right": "sb-microphone 3",
+ "on-click-backward": "sb-microphone 6"
},
"custom/volume" : {
@@ -82,10 +84,12 @@
"format": "{}",
"signal": 10,
"exec" : "sb-volume",
+ "on-click": "sb-volume 1",
"on-click-middle": "wpctl set-mute @DEFAULT_SINK@ toggle; pkill -RTMIN+10 waybar",
"on-scroll-up": "wpctl set-volume @DEFAULT_SINK@ 0.01+; pkill -RTMIN+10 waybar",
"on-scroll-down": "wpctl set-volume @DEFAULT_SINK@ 0.01-; pkill -RTMIN+10 waybar",
"on-click-right": "sb-volume 3",
+ "on-click-backward": "sb-volume 6"
},
"custom/clock" : {
diff --git a/.local/bin/statusbar/sb-microphone b/.local/bin/statusbar/sb-microphone
index 01a44cf..339fb78 100755
--- a/.local/bin/statusbar/sb-microphone
+++ b/.local/bin/statusbar/sb-microphone
@@ -1,6 +1,21 @@
#!/bin/sh
-var=$1
-mic="$(wpctl get-volume @DEFAULT_SOURCE@)"
+
+# Prints the current microphone volume or  if muted.
+
+case $1 in
+ 1) kitty -e pulsemixer ;;
+ 3) notify-send "🎤 Microphone volume module" "\- Shows volume 🎙️,  if muted.
+- Middle click to mute.
+- Scroll to change." ;;
+ 6) kitty -e "$EDITOR" "$0" ;;
+esac
+
+vol="$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)"
+
+# If muted, print  and exit.
+[ "$vol" != "${vol%\[MUTED\]}" ] && echo  && exit
+
+vol="${vol#Volume: }"
split() {
# For ommiting the . without calling and external program.
@@ -9,28 +24,11 @@ split() {
printf '%s' "$@"
}
-sig() {
- if [ ! -n "$var" ]; then
- if [ -n "$flag" ] ; then
- echo "$icon"
- else
- case 1 in
- $((mic >= 1)) ) icon="🎙️" ;;
- * ) echo  && exit ;;
- esac
- echo "$icon $mic%"
- fi
- else
- if [ "$var" -eq 3 ]; then
- notify-send "🎤 Microphone module" "\- Shows volume 🎙️,  if muted.
-- Middle click to mute.
-- Scroll to change."
- fi
- fi
- exit
-}
+vol="$(printf "%.0f" "$(split "$vol" ".")")"
+
+case 1 in
+ $((vol >= 1)) ) icon="🎙️" ;;
+ * ) echo  && exit ;;
+esac
-[ "$mic" != "${mic%\[MUTED\]}" ] && icon="" && flag=1 && sig
-mic="${mic#Volume: }"
-mic="$(printf "%.0f" "$(split "$mic" ".")")"
-sig
+echo "$icon $vol%"
diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume
index 06dd23a..ceaface 100755
--- a/.local/bin/statusbar/sb-volume
+++ b/.local/bin/statusbar/sb-volume
@@ -1,6 +1,21 @@
#!/bin/sh
-var=$1
-vol="$(wpctl get-volume @DEFAULT_SINK@)"
+
+# Prints the current volume or 🔇 if muted.
+
+case $1 in
+ 1) kitty -e pulsemixer ;;
+ 3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted.
+- Middle click to mute.
+- Scroll to change." ;;
+ 6) kitty -e "$EDITOR" "$0" ;;
+esac
+
+vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
+
+# If muted, print 🔇 and exit.
+[ "$vol" != "${vol%\[MUTED\]}" ] && echo 🔇 && exit
+
+vol="${vol#Volume: }"
split() {
# For ommiting the . without calling and external program.
@@ -9,30 +24,13 @@ split() {
printf '%s' "$@"
}
-sig() {
- if [ ! -n "$var" ]; then
- if [ -n "$flag" ] ; then
- echo "$icon"
- else
- case 1 in
- $((vol >= 70)) ) icon="🔊" ;;
- $((vol >= 30)) ) icon="🔉" ;;
- $((vol >= 1)) ) icon="🔈" ;;
- * ) echo 🔇 && exit ;;
- esac
- echo "$icon $vol%"
- fi
- else
- if [ "$var" -eq 3 ]; then
- notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted.
-- Middle click to mute.
-- Scroll to change."
- fi
- fi
- exit
-}
-
-[ "$vol" != "${vol%\[MUTED\]}" ] && icon="🔇" && flag=1 && sig
-vol="${vol#Volume: }"
vol="$(printf "%.0f" "$(split "$vol" ".")")"
-sig
+
+case 1 in
+ $((vol >= 70)) ) icon="🔊" ;;
+ $((vol >= 30)) ) icon="🔉" ;;
+ $((vol >= 1)) ) icon="🔈" ;;
+ * ) echo 🔇 && exit ;;
+esac
+
+echo "$icon $vol%"