dotfiles/scripts/menu/menu-input
2024-03-03 11:24:00 -06:00

11 lines
421 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 | menu "Input:")
# Set audio device, notify command success
pactl set-default-source "$input" && notify-send -r 11 "󰕾 Default Input" "Set to '$input'" || notify-send -r 11 "󰕾 Default Input" "Didn't change"
# Reload statusbar volume module (dwm & dwmblocks)
kill -45 "$(pidof dwmblocks)"