From 735b92dbcfe2f8f85047110bdd17f48900b12b8e Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Wed, 24 Jun 2026 15:08:33 -0500 Subject: Squashed commit of the following: urlview fix and exit --- env/.local/bin/scripts/urlview.sh | 6 ++++-- env/.urlview | 29 ----------------------------- 2 files changed, 4 insertions(+), 31 deletions(-) delete mode 100755 env/.urlview (limited to 'env') 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 -# -# 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 -- cgit v1.3