Giter Club home page Giter Club logo

bookmarksman's Introduction

bookmarksman

bookmarksman is a bookmark manager written in POSIX shell using jq and dmenu. It separates bookmarks in sections, making it easy to organize your bookmarks.

You are not limited to only storing websites. Since bookmarksman only outputs the saved string related to a bookmark, it can integrate with any program as you wish.

Usage

Saving a bookmark:

~ $ bookmarksman add 'suckless.org' # a dmenu prompt will apear asking for
                                    # title/section of the bookmark

Outputting a bookmark

~ $ bookmarksman open # dmenu will ask for the section/title, and output the
                      # bookmark to stdout

Deleting a bookmark

~ $ bookmarksman del # dmenu will ask for the section/title, and delete it

It's possible to pass a window xid as the last argument, to embed dmenu on that xid.

Example one-liners

~ $ bookmarksman open | xargs -r firefox # will open bookmark inside firefox
# Or another version that handles links or file paths
~ $ bookmarksman open | xargs -r xdg-open # will open bookmark with xdg-open

Using it on vimb

I made this script primarily to use it with vimb.

nnoremap ba :sh! /bin/sh -c 'bookmarksman add "$VIMB_URI" "$VIMB_WIN_ID"'<CR>
nnoremap bo :sh! /bin/sh -c 'bookmarksman open "$VIMB_WIN_ID" | xargs -r vimb -e "$VIMB_XID"'<CR>

With that you can type ba to add the current page to the bookmarks, or bo to open the bookmark menu, and if you have the latest vimb from the repos, dmenu will be embedded to the vimb window.

Installing

clone and cd into the directory

~ $ git clone https://github.com/toniz4/bookmarksman
~ $ cd bookmarksman 

Install system wide:

~ # make install

Or if you want to install as normal user:

~ $ make install PREFIX="" DESTDIR=~/.local

That will install bookmarksman to ~/.local/bin, you may need to add that directory to your PATH.

You can just copy it too.

~ $ cp bookmarksman ~/.local/bin

Dependences

  • jq (for manipulating the bookmark file)
  • dmenu (for the menu)
  • any POSIX compatible shell (bash, ash, ksh, dash, etc...)
  • any coreutils implementation

bookmarksman's People

Contributors

toniz4 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.