diff options
| author | iceyrazor <iceyrazor@mailfence.com> | 2026-06-24 15:08:33 -0500 |
|---|---|---|
| committer | iceyrazor <iceyrazor@mailfence.com> | 2026-06-24 15:08:33 -0500 |
| commit | 735b92dbcfe2f8f85047110bdd17f48900b12b8e (patch) | |
| tree | c5091999901d194181eaf8e300b8b2245839f945 /env/.local/bin/scripts | |
| parent | 0b1f94508454788b6ae151dbbe1243520f83dc0a (diff) | |
Squashed commit of the following: urlview fix and exit
Diffstat (limited to 'env/.local/bin/scripts')
| -rwxr-xr-x | env/.local/bin/scripts/urlview.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/env/.local/bin/scripts/urlview.sh b/env/.local/bin/scripts/urlview.sh index c4c38d7..797f40f 100755 --- a/env/.local/bin/scripts/urlview.sh +++ b/env/.local/bin/scripts/urlview.sh @@ -1,13 +1,15 @@ #!/bin/sh -url="$(grep -o -e 'http://[^"]*' -e 'https://[^"]*' <&0 | fzf)" +url="$(grep -o -e 'http://[^"]*' -e 'https://[^"]*' <&0 | tr ' ' '\n' | fzf)" +[ "$url" = "" ] && exit choices="\ clipboard browser/xdg-open" choice=$(echo "$choices" | fzf) -choice=$(echo "$choice" | sed -e 's/browser\/xdg-open/xdg-open/') +[ "$choice" = "" ] && exit +choice=$(echo "$choice" | sed -e 's/browser\/xdg-open/xdg-open/') # browser/xdg-open should just run xdg-open if [ "$choice" = "clipboard" ]; then if [ -z "$WAYLAND_DISPLAY" ]; then |
