Created
February 26, 2020 09:00
-
-
Save intrntbrn/896df62238c1e9b72e417eb9479c8fb2 to your computer and use it in GitHub Desktop.
chromium bookmark menu (dmenu, rofi, fzf)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# menu (dmenu, rofi, fzf, etc.) | |
menu_cmd='dmenu -i -p Bookmark' | |
# browser | |
browser_cmd='chromium' | |
# bookmarks json file | |
bookmarks=~/.config/chromium/Default/Bookmarks | |
# parse bookmarks, show menu and open selected bookmark in browser | |
jq -r '.roots.bookmark_bar.children[], .roots.synced.children[] | .name, .url' $bookmarks \ | |
| paste - - | $menu_cmd \ | |
| grep -Eo '(http|https)://.*' | xargs -r -I {} $browser_cmd {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment