diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-02-12 07:15:36 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-02-12 07:15:36 +0100 |
| commit | ab26783d64b186d414bcc1ee085e59f16b71d528 (patch) | |
| tree | b6c9fee7f996cc3bc8d31e05a314f6f7e65940a9 | |
| parent | aea39b153e72b4df07506b7de42b6a4232d12c61 (diff) | |
| download | dotfiles-ab26783d64b186d414bcc1ee085e59f16b71d528.tar.gz | |
Update
| -rwxr-xr-x | .shenanigans.sh | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/.shenanigans.sh b/.shenanigans.sh index e65d498..935c1b3 100755 --- a/.shenanigans.sh +++ b/.shenanigans.sh | |||
| @@ -90,7 +90,6 @@ backup() { | |||
| 90 | --exclude '.godot/' \ | 90 | --exclude '.godot/' \ |
| 91 | --exclude '.zig-cache/' \ | 91 | --exclude '.zig-cache/' \ |
| 92 | --exclude 'node_modules/' \ | 92 | --exclude 'node_modules/' \ |
| 93 | --exclude 'digg-v5/' \ | ||
| 94 | --delete \ | 93 | --delete \ |
| 95 | $VHOME/ /media/Void/Backup/$ME/ | 94 | $VHOME/ /media/Void/Backup/$ME/ |
| 96 | 95 | ||
| @@ -102,26 +101,3 @@ backup() { | |||
| 102 | cd $CWD | 101 | cd $CWD |
| 103 | } | 102 | } |
| 104 | 103 | ||
| 105 | # Toggles between pulseaudio sinks in round-robin. | ||
| 106 | togglesink() { | ||
| 107 | sinks=($(pactl list short sinks | awk '{print $2}')) | ||
| 108 | current_sink=$(pactl get-default-sink) | ||
| 109 | current_index=-1 | ||
| 110 | |||
| 111 | for i in "${!sinks[@]}"; do | ||
| 112 | if [[ "${sinks[$i]}" == "$current_sink" ]]; then | ||
| 113 | current_index=$i | ||
| 114 | break | ||
| 115 | fi | ||
| 116 | done | ||
| 117 | |||
| 118 | if [[ $current_index -eq -1 ]]; then | ||
| 119 | next_index=0 | ||
| 120 | else | ||
| 121 | next_index=$(( (current_index + 1) % ${#sinks[@]} )) | ||
| 122 | fi | ||
| 123 | |||
| 124 | pactl set-default-sink "${sinks[$next_index]}" | ||
| 125 | notify-send "Switched to sink: ${sinks[$next_index]}" | ||
| 126 | } | ||
| 127 | |||
