A web browser-independent bookmark manager that uses rofi as an interface to save, open or type out URL bookmarks.
git clone https://mcol.xyz/code/bkmkfi
Log | Files | Refs | README | LICENSE

commit 565cf89cf668f8b49d65b5f6062b26c7bf59e144
parent 56e664c133e77edf93cfb71b673dfce26a8d473d
Author: mcol <mcol@posteo.net>
Date:   Sat, 29 Jun 2019 17:51:00 +0100

rofi prompt will inform of action

Diffstat:
Mbkmkfi/bookmarks.py | 17+++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/bkmkfi/bookmarks.py b/bkmkfi/bookmarks.py @@ -47,11 +47,11 @@ def get_url(string): if www_url: return www_url.group("url") - co_url = search("(?P<url>\.co[^\s]+)", string) + co_url = search("(?P<url>\s.*\.co[^\s]+)", string) if co_url: return co_url.group("url") - net_url = search("(?P<url>\.net[^\s]+)", string) + net_url = search("(?P<url>\s.*\.net[^\s]+)", string) if net_url: return net_url.group("url") @@ -104,10 +104,15 @@ class Bookmarks(object): print("Making a new database") bookmarks = [] - if bookmarks: - prompt = 'Select or add new bookmark' - else: - prompt = 'Add a new bookmark' + # determine prompt + if p.open[0]: + prompt = 'Add new bookmark or open with: \'%s\'' % p.open[0] + elif p.delete: + prompt = 'Select a bookmark to delete, or add a new bookmark' + elif p.copy: + prompt = 'Copy a bookmark to clipboard' + elif p.type or p.type_cr: + prompt = 'Type out a bookmark''s URL' selected = rofi( stdin='\n'.join(bookmarks),