aboutsummaryrefslogtreecommitdiff
path: root/env/.local
diff options
context:
space:
mode:
Diffstat (limited to 'env/.local')
-rwxr-xr-xenv/.local/bin/scripts/urlview.sh (renamed from env/.local/bin/system/url-handler.sh)11
1 files changed, 4 insertions, 7 deletions
diff --git a/env/.local/bin/system/url-handler.sh b/env/.local/bin/scripts/urlview.sh
index 5d0e893..c4c38d7 100755
--- a/env/.local/bin/system/url-handler.sh
+++ b/env/.local/bin/scripts/urlview.sh
@@ -1,15 +1,12 @@
#!/bin/sh
-url=$@
-prompt_message="Open with:"
-echo "$url"
+url="$(grep -o -e 'http://[^"]*' -e 'https://[^"]*' <&0 | fzf)"
-choices="
+choices="\
clipboard
-browser/xdg-open
-"
+browser/xdg-open"
-choice=$(echo "$choices" | sed /^$/d | rofi -dmenu "$prompt_message")
+choice=$(echo "$choices" | fzf)
choice=$(echo "$choice" | sed -e 's/browser\/xdg-open/xdg-open/')
if [ "$choice" = "clipboard" ]; then