From c28510ac087f85738ee2e716b346eb1bbc8baba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Thu, 19 May 2022 01:07:22 +0300 Subject: WIP: rofi Fix websurf menu. --- dotfiles/.local/bin/rofiwebsurf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dotfiles/.local') 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 -- cgit v1.2.3