moonarch/defaults/bin/moonarch-sink-switcher
nevaforget eaf30724aa fix missing packages, remove dead code, replace ponymix with pactl
- Add wl-clipboard, libnotify, upower, bluez, bluez-utils to official.txt
- Remove stow (installed but never used)
- Remove dead moonlock.service cp block from post-install.sh
- Rewrite moonarch-sink-switcher and moonarch-volume to use pactl
  instead of ponymix (already available via libpulse)
2026-03-29 14:00:51 +02:00

14 lines
584 B
Bash
Executable File

#!/usr/bin/bash
# ABOUTME: Rofi-based PulseAudio sink switcher using pactl.
# ABOUTME: Changes the default sink and moves all active streams to it.
# choose audio sink via rofi
# changes default sink and moves all streams to that sink
sink=$(pactl list sinks short | awk '{print $1, $2}' | rofi -dmenu -theme '/etc/xdg/rofi/themes/volume.rasi' -mesg '󱡫 Sink Switcher' -p 'audio sink:' -location 6 -width 100 | awk '{print $1}') &&
pactl set-default-sink "$sink" &&
for input in $(pactl list sink-inputs short | awk '{print $1}'); do
pactl move-sink-input "$input" "$sink"
done