Browse Source

[cliplumber] Add rot13 feature

v2
lhark 6 years ago
parent
commit
747f5d1feb
  1. 9
      bin/cliplumber

9
bin/cliplumber

@ -29,7 +29,7 @@ fi
urls="$(echo $clip | grep -o 'https\?://[a-zA-Z0-9~#%&_+=,.?/-]\+')"
# Check the requirements for every option
opts=""
opts="rot13"
check_exists "$TERM_EMU" "mpv" "youtube-dl" &&
opts="$(printf "audio-search\n%s" "$opts")"
check_exists "dragon" &&
@ -67,6 +67,13 @@ case "$choice" in
"audio-search")
"$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'
;;

Loading…
Cancel
Save