diff options
Diffstat (limited to 'env/.local/bin/system/url-handler.sh')
| -rwxr-xr-x | env/.local/bin/system/url-handler.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/env/.local/bin/system/url-handler.sh b/env/.local/bin/system/url-handler.sh index d7be722..5d0e893 100755 --- a/env/.local/bin/system/url-handler.sh +++ b/env/.local/bin/system/url-handler.sh @@ -2,7 +2,7 @@ url=$@ prompt_message="Open with:" -echo $url +echo "$url" choices=" clipboard @@ -12,11 +12,11 @@ browser/xdg-open choice=$(echo "$choices" | sed /^$/d | rofi -dmenu "$prompt_message") choice=$(echo "$choice" | sed -e 's/browser\/xdg-open/xdg-open/') -if [ "$choice" == "clipboard" ]; then - if [ -z $WAYLAND_DISPLAY ]; then - printf "$url" | xclip -selection clipboard +if [ "$choice" = "clipboard" ]; then + if [ -z "$WAYLAND_DISPLAY" ]; then + printf -- "%s" "$url" | xclip -selection clipboard else - printf "$url" | wl-copy + printf -- "%s" "$url" | wl-copy fi else $choice "$url" & disown |
