Extract omarchy-swayosd-client

So we don't have to manually compose it every time
This commit is contained in:
David Heinemeier Hansson
2026-04-22 13:04:30 +02:00
parent ed9ecccb21
commit edf7067797
8 changed files with 20 additions and 27 deletions
+2 -7
View File
@@ -2,15 +2,11 @@
# Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute.
focused_monitor=$(omarchy-hyprland-monitor-focused)
sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]')
sinks_count=$(echo "$sinks" | jq '. | length')
if (( sinks_count == 0 )); then
swayosd-client \
--monitor "$focused_monitor" \
--custom-message "No audio devices found"
omarchy-swayosd-client --custom-message "No audio devices found"
exit 1
fi
@@ -60,7 +56,6 @@ if [[ $next_sink_name != $current_sink_name ]]; then
pactl set-default-sink "$next_sink_name"
fi
swayosd-client \
--monitor "$focused_monitor" \
omarchy-swayosd-client \
--custom-message "$next_sink_description" \
--custom-icon "$next_sink_volume_icon"