diff options
author | epoch <epoch@hack.thebackupbox.net> | 2022-01-21 19:35:58 +0000 |
---|---|---|
committer | epoch <epoch@hack.thebackupbox.net> | 2022-01-21 19:35:58 +0000 |
commit | 88420679464dad29916838b6468cca68d06a9b67 (patch) | |
tree | 5a8a1bf15e830507eb5d110ba24b40b645f7ad70 | |
parent | 9ae383cdf96656e03fdfdfe4d38ba6ee40c4512d (diff) | |
parent | 1d6837e369fe1d29f302311837573562ca05d870 (diff) | |
download | uritools-88420679464dad29916838b6468cca68d06a9b67.tar.gz uritools-88420679464dad29916838b6468cca68d06a9b67.zip |
Merge branch 'master' of ssh://git.thebackupbox.net/uritools
-rwxr-xr-x | copy_start_nevermind.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/copy_start_nevermind.sh b/copy_start_nevermind.sh index 1869dff..947d1b0 100755 --- a/copy_start_nevermind.sh +++ b/copy_start_nevermind.sh @@ -22,7 +22,7 @@ if [ "$with" != "$(urigetline -a "$uri" < <(uristart.conf))" ];then with="[multiple matches]" fi -selection="$(printf "start with: %s\nremote_csn\ncopy\nshorten\nunshorten\ntitle\nverbose\nforget\nQR\n%s\n" "${with}" "$(printf "%s\n" "$uri" | uricut | grep -v '^whole')" \ +selection="$(printf "start with: %s\nremote_csn\ncopy\nshorten\nunshorten\ntitle\nverbose\nforget\nQR-image\nQR\n%s\n" "${with}" "$(printf "%s\n" "$uri" | uricut | grep -v '^whole')" \ | choose "${prompt}")" # | choose "$(printf "uri: '%s'\nwill be ran with: %s\n" "$uri" "$(urigetline "$uri")" )" -default start )" echo "$selection" @@ -59,6 +59,7 @@ forget) start*) scheme="$(printf "%s\n" "$uri" | uricut -s)" + ### might make sense to use xwindowURI for this value if [ "$(xdotool getwindowfocus)" != 0 ];then refering_window_title="$(xdotool getwindowfocus getwindowname)" else @@ -70,7 +71,7 @@ start*) shorten) escaped="$(uriescape "$uri")" - gemini-get "gemini://epo.k.vu/submit?$escaped" | tr -d '\r' | tail -n+2 | head -n2 | tr '\n' '\0' | xargs -n1 -0 copy_start_nevermind.sh + gemini-handler "gemini://epo.k.vu/submit?$escaped" exit 0 ;; @@ -79,8 +80,15 @@ unshorten) exit 0 ;; +QR-image) + escaped="$(uriescape "$uri")" + file=~/Pictures/qr-codes/"${escaped}".png + qr "$uri" > "$file" + copy_start_nevermind.sh "file://$file" + ;; + QR) - x-terminal-emulator -hold -e qr "$uri" + x-terminal-emulator -hold -e bash -c "qr '$uri';echo 'uri: $uri'" ;; *) |