dotfiles/scripts/menu/menu-input
2025-09-03 16:20:41 -06:00

13 lines
351 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 "dmenu" "Input:")
# Set audio device, notify command success
pactl set-default-source "$input"
# Reload statusbar volume module (dwm & dwmblocks)
if pidof dwmblocks >/dev/null; then
kill -45 "$(pidof dwmblocks)"
fi