aboutsummaryrefslogtreecommitdiff
path: root/.shenanigans.sh
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2025-02-12 07:15:36 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2025-02-12 07:15:36 +0100
commitab26783d64b186d414bcc1ee085e59f16b71d528 (patch)
treeb6c9fee7f996cc3bc8d31e05a314f6f7e65940a9 /.shenanigans.sh
parentaea39b153e72b4df07506b7de42b6a4232d12c61 (diff)
downloaddotfiles-ab26783d64b186d414bcc1ee085e59f16b71d528.tar.gz
Update
Diffstat (limited to '.shenanigans.sh')
-rwxr-xr-x.shenanigans.sh24
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.
106togglesink() {
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