aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-05-19 01:07:22 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2022-05-19 01:08:21 +0300
commitc28510ac087f85738ee2e716b346eb1bbc8baba5 (patch)
tree15ec2c98a5cb44df6d3b0761451f9afda221cc47 /dotfiles/.local/bin
parenta36aadab60c09bff3a055b0442971aa5e8a87a27 (diff)
downloadswayrice-c28510ac087f85738ee2e716b346eb1bbc8baba5.tar.gz
swayrice-c28510ac087f85738ee2e716b346eb1bbc8baba5.zip
WIP: rofi
Fix websurf menu.
Diffstat (limited to 'dotfiles/.local/bin')
-rwxr-xr-xdotfiles/.local/bin/rofiwebsurf3
1 files changed, 2 insertions, 1 deletions
diff --git a/dotfiles/.local/bin/rofiwebsurf b/dotfiles/.local/bin/rofiwebsurf
index b6f6e87..bcba65f 100755
--- a/dotfiles/.local/bin/rofiwebsurf
+++ b/dotfiles/.local/bin/rofiwebsurf
@@ -3,7 +3,8 @@
if [ "$ROFI_RETV" != 0 ]; then
choice="$1"
if echo "$choice" | egrep ".*://.*" >/dev/null 2>&1; then
- choice="$(echo "$choice" | sed -E 's/(.*:\/\/([^[:space:]])*).*/\1/g' |
+ choice="$(echo "$choice" | grep -Eo "[^[:space:]]*:\/\/[^[:space:]]*" |
+ head -n1 |
grep -E "https?:" || echo "$choice")"
mimeo "$choice" > /dev/null
else