add scripts

This commit is contained in:
2026-03-04 11:15:34 +00:00
parent cc43b56c9a
commit 3dc65b612e
11 changed files with 261 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
# Get the list of sinks and format for Rofi (index and name)
sinks=$(pactl list sinks short | awk '{print $2}')
# Use Rofi to select a sink (case-insensitive search)
selected_sink_name=$(echo "$sinks" | rofi -i -dmenu -p "Select audio output:")
# If a sink was selected
if [ -n "$selected_sink_name" ]; then
# Get the index of the selected sink
selected_sink_index=$(pactl list sinks short | grep -F "$selected_sink_name" | awk '{print $1}' | head -n 1)
# Set the default sink
pactl set-default-sink "$selected_sink_index"
fi