|
|
@ -29,7 +29,7 @@ fi |
|
|
urls="$(echo $clip | grep -o 'https\?://[a-zA-Z0-9~#%&_+=,.?/-]\+')" |
|
|
urls="$(echo $clip | grep -o 'https\?://[a-zA-Z0-9~#%&_+=,.?/-]\+')" |
|
|
|
|
|
|
|
|
# Check the requirements for every option |
|
|
# Check the requirements for every option |
|
|
opts="" |
|
|
opts="rot13" |
|
|
check_exists "$TERM_EMU" "mpv" "youtube-dl" && |
|
|
check_exists "$TERM_EMU" "mpv" "youtube-dl" && |
|
|
opts="$(printf "audio-search\n%s" "$opts")" |
|
|
opts="$(printf "audio-search\n%s" "$opts")" |
|
|
check_exists "dragon" && |
|
|
check_exists "dragon" && |
|
|
@ -67,6 +67,13 @@ case "$choice" in |
|
|
"audio-search") |
|
|
"audio-search") |
|
|
"$TERM_EMU" --single-instance mpv --ytdl-format=bestaudio ytdl://ytsearch:"$clip" |
|
|
"$TERM_EMU" --single-instance mpv --ytdl-format=bestaudio ytdl://ytsearch:"$clip" |
|
|
;; |
|
|
;; |
|
|
|
|
|
"rot13") |
|
|
|
|
|
if [ -z "$WAYLAND_DISPLAY" ]; then |
|
|
|
|
|
xsel -b -o | tr 'A-Za-z' 'N-ZA-Mn-za-m' | xsel -b -i |
|
|
|
|
|
else |
|
|
|
|
|
wl-copy -n "$(wl-paste | tr 'A-Za-z' 'N-ZA-Mn-za-m')" |
|
|
|
|
|
fi |
|
|
|
|
|
;; |
|
|
*) |
|
|
*) |
|
|
printf 'Nope\n' |
|
|
printf 'Nope\n' |
|
|
;; |
|
|
;; |
|
|
|