dotfiles/scripts/dmenu-output
tavo-wasd fd69ecbbe6 init
2023-05-08 20:39:39 -06:00

11 lines
397 B
Bash
Executable file

#!/bin/sh
# Set default output device
# Get proper name from sinks
output=$(pactl list short sinks | cut -f 2 | dmenu -i -p "Output:")
# Set audio device, notify command success
pactl set-default-sink "$output" && notify-send "󰕾 Default Output" "Set to '$output'" || notify-send "󰕾 Default Output" "Didn't change"
# Reload statusbar module (dwm & dwmblocks)
kill -44 "$(pidof dwmblocks)"