summaryrefslogtreecommitdiff
path: root/bin/extra
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-01-21 23:05:03 +0100
committerRaymaekers Luca <luca@spacehb.net>2025-01-21 23:05:03 +0100
commita5d21a49ccdc6141790085d4bd26b667b8d5618d (patch)
treec952cf834458da4938dfca837abe6323283d2bb8 /bin/extra
parentefcd2b7cdb03a354bd4311bac75953738ec34e4f (diff)
checkpoint
Diffstat (limited to 'bin/extra')
-rwxr-xr-xbin/extra/2020204
-rwxr-xr-xbin/extra/gdbcore4
-rwxr-xr-xbin/extra/muz-sync25
-rwxr-xr-xbin/extra/rek16
4 files changed, 27 insertions, 22 deletions
diff --git a/bin/extra/202020 b/bin/extra/202020
index 35ce1c9..9833e48 100755
--- a/bin/extra/202020
+++ b/bin/extra/202020
@@ -5,10 +5,10 @@ sounds="$HOME/sync/share/sounds"
if [ "$1" ]; then
$mpvCommand "$sounds"/avert1.ogg &
- herbe '202020' 'avert!' &
+ notify-send '_202020' '*avert!' &
sleep 20s
$mpvCommand "$sounds"/avert2.ogg &
- herbe '202020' 'stop averting' &
+ notify-send '_202020' '*stop averting' &
exit
fi
diff --git a/bin/extra/gdbcore b/bin/extra/gdbcore
index 6daafa8..f44a020 100755
--- a/bin/extra/gdbcore
+++ b/bin/extra/gdbcore
@@ -11,8 +11,9 @@
cache="$HOME/.cache/gdbcore_prog"
-if [ "$#" -lt 1 ]; then
+if [ "$1" = "-h" ]; then
>&2 printf 'usage: gdbcore [-r] <program>\n'
+ exit 1
fi
if [ "$1" = "-r" ]; then
@@ -64,6 +65,7 @@ else
line="$(sed -n "${nr}p" "$tmp")"
corefile="$coredir"/"${line%% *}"
fi
+>&2 printf 'corefile: %s\n' "$corefile"
if [ ! -f "$corefile" ]; then
rm -f "$tmp"
diff --git a/bin/extra/muz-sync b/bin/extra/muz-sync
index 3a5c5f1..0c2dba2 100755
--- a/bin/extra/muz-sync
+++ b/bin/extra/muz-sync
@@ -1,9 +1,28 @@
#!/bin/sh
trap "exit 1" INT
-music="$(xdg-user-dir MUSIC)"
->&2 printf "music: %s\n" "$music"
+[ "$1" ] && path="$1" || path="/media/basilisk/music/sorted/"
+[ "$2" ] && music="$2" || music="$(xdg-user-dir MUSIC)"
+[ "$3" ] && host="$3" || host="autumn"
-while ! rsync --recursive --verbose --partial --progress --ignore-existing --size-only db:/media/basilisk/music/sorted/ "$music"
+>&2 printf '%s:%s -> %s\n' "$host" "$path" "$music"
+
+>&2 printf 'Confirm? [y/N] '
+answer="$(head -n 1)"
+[ "$answer" ] || exit 1
+
+if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
+ exit 1
+fi
+
+# retry until failure
+while ! rsync \
+ --recursive \
+ --verbose \
+ --partial \
+ --progress \
+ --ignore-existing \
+ --size-only \
+ "$host":"$path" "$music"
do :
done
diff --git a/bin/extra/rek b/bin/extra/rek
deleted file mode 100755
index b5baac7..0000000
--- a/bin/extra/rek
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-# Record desktop with ffmpeg, strip metadata and use mp4 for relative small file size
-# copy the path of the output file to the system clipboard for sharing
-out="out.mp4"
-
-# with audio
-if [ "$1" = "-a" ]
-then
- ffmpeg -y -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0+0,0 -f pulse -ac 2 -i default -map 0:v -map 0:a? -map_metadata -1 -map_metadata:s:v -1 -map_metadata:s:a -1 -map_chapters -1 -disposition 0 "$out"
-else
- ffmpeg -y -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0+0,0 -map 0:v -map 0:a? -map_metadata -1 -map_metadata:s:v -1 -map_metadata:s:a -1 -map_chapters -1 -disposition 0 "$out"
-fi
-
-# copy output path
-readlink -f "$out" | clipp