diff options
Diffstat (limited to 'bin/extra')
-rwxr-xr-x | bin/extra/202020 | 4 | ||||
-rwxr-xr-x | bin/extra/gdbcore | 4 | ||||
-rwxr-xr-x | bin/extra/muz-sync | 25 | ||||
-rwxr-xr-x | bin/extra/rek | 16 |
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 |