diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-11-22 13:49:32 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-11-22 13:49:32 +0100 |
commit | 0a84c3d984349e96ddd8077cf2bdd9e08ccb4300 (patch) | |
tree | f04e127a4c6f98645ee3076f2031f5fc6e1b9f43 /bin | |
parent | 7f2e035fcec31435fb93cd9d8258a6034b8caa7a (diff) | |
parent | 1024bf9cb8f38ff9cdd6e58a7614d1de8a5bbb29 (diff) |
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/guiscripts/torque | 4 | ||||
-rwxr-xr-x | bin/menuscripts/mmpv | 8 | ||||
-rwxr-xr-x | bin/menuscripts/mpass-otp | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/bin/guiscripts/torque b/bin/guiscripts/torque index 51e2806..8f939e1 100755 --- a/bin/guiscripts/torque +++ b/bin/guiscripts/torque @@ -47,8 +47,8 @@ prompt() { r) read -rp "remove torrent: #"; send -t "$REPLY" -r; k=0 ;; o) read -rp "load magnet: "; send -a "$REPLY"; k=0 ;; m) - read -rp "move torrent: " torrent - read -rp "destination folder: " + read -rp "move torrent: #" torrent + read -rp "destination folder: /downloads/" send -t "$torrent" --move "/downloads/$REPLY" ;; j) ((j==${#t[@]}))||((k=k>=j?k:++k,j=j<${#t[@]}?++j:j)) ;; diff --git a/bin/menuscripts/mmpv b/bin/menuscripts/mmpv new file mode 100755 index 0000000..76c0d6a --- /dev/null +++ b/bin/menuscripts/mmpv @@ -0,0 +1,8 @@ +#!/bin/sh +# Have an mpv instance that works with a socket somewhat globally +socket="/tmp/mpvsocket" +# Start mpv in idle if socket is not getting listened to +nc -zvU "$socket" || setsid mpv --input-ipc-server=/tmp/mpvsocket --idle & +file="$(PLAYER='echo' mmedia video)" +[ "$file" ] || exit 1 +echo '{ "command": ["loadfile", "'"$file"'", "append-play"] }' | nc -U /tmp/mpvsocket diff --git a/bin/menuscripts/mpass-otp b/bin/menuscripts/mpass-otp new file mode 100755 index 0000000..b60f953 --- /dev/null +++ b/bin/menuscripts/mpass-otp @@ -0,0 +1,6 @@ +#!/bin/sh +pass="$(find "$PASSWORD_STORE_DIR"/keys/otp -name "*.gpg" -printf '%f\n' | + sed 's/\.gpg$//' | + commander -c)" +[ "$pass" ] || exit 1 +pass otp -c keys/otp/"$pass" |