aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-08-06 00:42:47 +0200
committerlonkaars <loek@pipeframe.xyz>2023-08-06 00:42:47 +0200
commit5b6064be7d0787c55fcc163e68debb2d17e8b5f6 (patch)
tree02884f561ce002d680f5c5e44d497495e02409e2
parent4a6f77636f2f723218818e95c899f0b2a998ef0d (diff)
update custom scripts
-rwxr-xr-x.local/share/bin/nodisconnect13
-rwxr-xr-x.local/share/bin/rwall4
2 files changed, 15 insertions, 2 deletions
diff --git a/.local/share/bin/nodisconnect b/.local/share/bin/nodisconnect
index 31664f2..0c65d13 100755
--- a/.local/share/bin/nodisconnect
+++ b/.local/share/bin/nodisconnect
@@ -1,2 +1,13 @@
#!/bin/sh
-play -q -n synth whitenoise band -n 650 1300 vol 0.01 & disown
+# use sox to play very quiet noise for keeping bluetooth headphones connected
+
+# arguments used:
+# -q quiet mode (don't output progress bar)
+# -n null input filename (because synth is used as input)
+# -r 44100 sample rate (44.1 KHz)
+# -b 32 -e signed signed 32-bit
+# -c 2 create two channels (ouput stereo)
+# synth whitenoise start with white noise
+# band -n 650 1300 bandpass filter between 650-1300 Hz
+# vol 0.01 very quiet
+play -q -n -r 44100 -b 32 -e signed -c 2 synth whitenoise band -n 650 1300 vol 0.01 & disown
diff --git a/.local/share/bin/rwall b/.local/share/bin/rwall
index 48c305d..070ed65 100755
--- a/.local/share/bin/rwall
+++ b/.local/share/bin/rwall
@@ -1,2 +1,4 @@
#!/bin/sh
-ls -d ~/.local/walls/current | sort -R | head -n1 | xargs feh --bg-fill -z
+FOLDER="$HOME/.local/walls/current"
+[ -n "$1" ] && FOLDER="$1"
+ls -d "$FOLDER" | sort -R | head -n1 | xargs feh --bg-fill -z