Skip to content

devgioele/universal-bookmark-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal Bookmark Manager

A suckless bookmark manager that is minimalistic, works offline and can store whatever URI you want.

Configuration

Copy the bookmark script and configure the variables in the config section. You may use a different menu than tofi, like dmenu.

Bind the bookmark script to some key combination. With i3 or sway it is done like this:

# Pick bookmark
bindsym $mod+i exec bookmark pick
# Add bookmark
bindsym $mod+Shift+i exec bookmark add
# Remove bookmark
bindsym $mod+Control+Shift+i exec bookmark remove

Usage

When you add a bookmark, the content of the primary clipboard is used (the selected text, not the copied one). The menu then asks you for tags that you may want to bind to the new bookmark. A list of already existing tags is shown, so that you avoid creating tags that are conceptually the same but spelled in a slightly different way. To stop adding tags, close the menu (usually with the ESC key).

Picking a bookmark is straightforward. The URI of the selected bookmark is copied to the secondary clipboard (as if you copied it with Ctrl+C). The URI is not written out using some automation tool like ydotools, because of security concerns arising from giving access to /dev/uinput.

Notifications

Notifications are sent using the notify-send command. If you do not receive any, make sure to have a notification server like dunst installed.

Importing bookmarks from your browser

This repo contains a simple conversion software to import the bookmarks from a browser. Consult its readme for further instructions.

Design

Storing bookmarks

Bookmarks are saved in a single plain text file and are organized with tags instead of directories. This allows bookmarks to be bound to multiple keywords, better suiting the network-like architecture of the human brain. With directories, a bookmark would not be able to have multiple parent directories.

Example bookmark file:

https://github.com #github #programming
https://example.com #Something #example-tag #programming

Organizing bookmarks

Humans tend to organize ideas in a network-like fashion. Tags can represent networks, while directories cannot, because a file cannot have multiple parent directories. This is why bookmarks are organized with tags rather than with directories.

Known issues

Overlapping tags

When adding a new bookmark and choosing a new tag whose content is matched by the beginning of an existing tag, the existing tag is used instead of the new shorter one. E.g. if the tag cooking already exists and the tag cook is added, the tag cooking is used instead of cook. This is caused by the menu software you use. You may create a fork of the menu software of your choice so that when you press a dedicated key, the shorter written tag is chosen over the closest matching tag. Better solutions to this are welcome!