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 | |
| parent | 0b1f94508454788b6ae151dbbe1243520f83dc0a (diff) | |
Squashed commit of the following: urlview fix and exit
Diffstat (limited to 'env')
| -rwxr-xr-x | env/.local/bin/scripts/urlview.sh | 6 | ||||
| -rwxr-xr-x | env/.urlview | 29 |
2 files changed, 4 insertions, 31 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 diff --git a/env/.urlview b/env/.urlview deleted file mode 100755 index 33c9b47..0000000 --- a/env/.urlview +++ /dev/null @@ -1,29 +0,0 @@ -############################################################################### -# Urlview configuration file. -# man urlview <Man page> -# -# Put this file in: $HOME/.urlview -# Put url_handler.sh in: /usr/bin -# -# You can call 'urlview' while in 'mutt' by pressing the Ctrl b keys. -# Put these macros in your $HOME/.muttrc file. -# -# macro index \cb |urlview\n -# macro pager \cb |urlview\n -# -# You can call 'urlview' while in 'tin' by pressing | then a for article, -# put urlview as the pipe command. -# -# Regular expression to use to match URLs. - -#REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):] -REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):] - -# Command to invoke for selected URL. Use lynx, netscape, or url_handler.sh -# shell script. Alternatively, you can leave COMMAND unset and set the BROWSER -# environment variable instead. - -#COMMAND lynx %s -#COMMAND netscape -remote 'openURL(%s)' -#COMMAND url_handler.sh -COMMAND ~/.local/bin/system/url-handler.sh |
