From f09dc0b0b066c8e415171b27dba3bcb7ce903f4f Mon Sep 17 00:00:00 2001 From: celso Date: Mon, 6 Mar 2023 18:38:54 -0300 Subject: [PATCH] made script a bit more browser agnostic --- openbookmark.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbookmark.sh b/openbookmark.sh index ae205bc..88f721d 100755 --- a/openbookmark.sh +++ b/openbookmark.sh @@ -3,7 +3,7 @@ raws="$(grep -v "Recent\(ly\)\? \(Bookmarked\|Tags\)" bookmarks.html | grep -o "$" | grep -n ".*")" titles="$(grep -on "\">.*$" <<< "${raws}" | sed 's/"\?>//;s/<\/A>$//')" - selection=$(dmenu -c -l 10 -bw 3 <<< "${titles}" | grep -o "^[0-9]*:") +url="$(grep "^${selection}" <<< "${raws}" | grep -o "HREF=\".*\" ADD_DATE" | sed 's/^HREF="//;s/" ADD_DATE$//')" -palemoon "$(grep "^${selection}" <<< "${raws}" | grep -o "HREF=\".*\" ADD_DATE" | sed 's/^HREF="//;s/" ADD_DATE$//')" +palemoon "${url}" || firefox "${url}" || chromium "${url}"