aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/system/url-handler.sh
diff options
context:
space:
mode:
authoriceyrazor <iceyrazor@mailfence.com>2026-06-10 00:48:19 -0500
committericeyrazor <iceyrazor@mailfence.com>2026-06-10 00:48:19 -0500
commit2097b0ebfdd07ae7a8295c26703d8d88ee7a5f8f (patch)
tree97edcae29f2817f045e0fda462609679935a6fb1 /env/.local/bin/system/url-handler.sh
parent09156e6cea71093079af580acdd6d4a8594e14b9 (diff)
Squashed commit of the following:
made all scripts mostly posix moved from gajim to dino
Diffstat (limited to 'env/.local/bin/system/url-handler.sh')
-rwxr-xr-xenv/.local/bin/system/url-handler.sh10
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