diff options
Diffstat (limited to 'copy_start_nevermind.sh')
-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'" ;; *) |