chardskarth / choose-from-chrome-bookmarks

A helper script to easily open bookmarked urls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Open Chrome Bookmarks using Choose

What does this do?

TODO: Create gif screen recording

Limitation

I might as well start with this... This coded very minimally, and its not yet battle tested. Right now it just works for my use case, but feel free to submit an MR.

Some gotchas:

  1. Install script is very simple. You just need to add the script in your path.
  2. There's no confiration file.
    1. Chrome bookmarks path is hardcoded here
    2. Logging is can be found at ~/.logs/
  3. You can add other source for completion by sourcing a zsh script that contains functions _choose_from_bookmarks__add_* from lib path.

Dependencies

The following tools are required to be installes

  1. kscript
  2. choose-gui

Installation

# First, install the dependencies. (kscript, zsh and choose-gui)
git clone git@github.com:chardskarth/choose-from-chrome-bookmarks.git
# add `bin` directory in exported path
echo "PATH=\$PATH:<location of this repo>/bin" >> ~/.profile

Usage

usage: choose-from-chrome-bookmarks <command>
  These are the available commands:

  refreshlist    Refresh a cached list of bookmarks
  triggerchoose	 Trigger choose

Other improvements

Adding a hotkey for this script... I use skhd.

This is optional.

brew install skhd
echo "ctrl - return : choose-from-chrome-bookmarks triggerchoose &>> ~/.logs/choose_from_bookmarks.log" >> ~/.config/skhd/skhdrc

Adding other source to search

I also use gdrive cli to automatically search folders and files from specific gdrive folders.

  1. Add a .zsh file in the /libs. These are sourced upon invoking the refreshlist command.
  2. Create functions that starts with _choose_from_bookmarks__add_. These functions are invoked and their response is put in the cached text thats displayed in "choose".

Uninstalling

You can just remove this repository from $PATH

About

A helper script to easily open bookmarked urls

License:MIT License


Languages

Language:Shell 100.0%