fix copying urls.

This commit is contained in:
Bartek Stalewski 2021-09-24 23:58:57 +02:00
parent 049e37255e
commit 4193dd857a

View file

@ -14,6 +14,6 @@ while getopts "hoc" o; do case "${o}" in
h) printf "Optional arguments for custom use:\\n -c: copy\\n -o: xdg-open\\n -h: Show this message\\n" && exit 1 ;;
o) chosen="$(echo "$urls" | dmenu -l 20 -i -p 'open')"
setsid xdg-open "$chosen" >/dev/null 2>&1 & ;;
c) echo "$urls" | dmenu -i -p 'copy' -l 10 | tr -d '\n' | xclip -selection clipboard ;;
c) echo "$urls" | dmenu -i -p 'copy' -l 10 | tr -d '\n' | xsel -l /dev/null ;;
*) printf "Invalid option: -%s\\n" "$OPTARG" && exit 1 ;;
esac done