| src | ||
| .gitignore | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
oil
Search-as-you-type cli frontend for the buku bookmarks manager using peco. It runs on Linux and inside your favourite terminal emulator.
features
- View a list of your (buku managed) bookmarks and their tags and titles in your terminal
- While typing, have the list instantaneously filtered accordingly
- After selecting one (hit Enter) or multiple bookmarks (read below), have them opened in your browser
- Tag-Mode: After selecting the bookmarks, get prompted for a tag and have it applied to all of them
- Title-Mode: After selecting the bookmarks, get prompted for a new title for each one
- Delete-Mode: After selecting the bookmarks, delete each one
- Add a URL from clipboard to your bookmarks
basic usage
usage: oil [OPTIONS]
by default, selected bookmarks get openend using the default browser
options:
-t, --tag
run in tag-mode (see features)
-T, --title
run in title-mode (see features)
-d, --delete
run in delete-mode (see features)
-a, --add
add a bookmark from clipboard
-p, --no-peco-reconfiguration
do not overwrite the users peco configuration (see section about multiline selection)
Note: Mind that the four modes are mutually exclusive. If more than one is specified it could
cause all sorts of mayhem, who knows (the last one applies, but please don't).
installation
After cloning this repository, make sure the listed dependencies are installed, navigate to it's directory and run make install. After that, your terminal should respond very kindly to the command oil and as soon as that one gets going you are free as a bird to just start typing away and hit enter when you found what you were looking for (the latter being great life advice, too).
Note: Packages for specific linux distributions are not published as of yet since this makes sense only after the user base is of order "3 people or more". However, if you are using Arch-Linux and want this package to be tracked by its package manager you can build and install a package manually. For this purpose a file named PKGBUILD resides in the misc/ directory. If you run makepkg inside a direcory where this file is located, a proper Arch-Linux package will be assembled there. The generated package file can then be installed using sudo pacman -U <generated-package-file>.
Feel free, though, to write me an issue requesting a package for your distro. And if you know what you are doing, I hereby grant you permission to take matters into your own hands and publish one yourself. Godspeed.
multiline selection
This is a feature of peco that is not enabled by default. Anticipating that most users will not already be using peco but will want to use the feature and not drudge through a bunch of configuration options, oil enables it by default by passing a custom configuration file to peco. This leads to the users configuration being overruled. Should you want to use your own peco config, disable this behaviour via the flags
oil -p or, equivalently, oil --no-peco-reconfiguration
In case you choose to do this but do not have multiline selection enabled in your peco config, read up on the configuration section of peco and amend your config with something like
{
...
"StickySelection": true,
"Action": {
"selectAndMoveDown": [
"peco.ToggleSelection",
"peco.SelectDown"
]
},
"Keymap": {
"C-Space": "selectAndMoveDown",
"ArrowLeft": "peco.ScrollLeft",
"ArrowRight": "peco.ScrollRight"
}
...
}
This makes it so you can hit Ctrl+Space a bunch of times and select a number of bookmarks quickly and, additionally, use the left and right arrows to scroll to the left and right. Note: Selections persist through changes in the search term.