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

11 lines
416 B
Bash
Executable file

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