Search-as-you-type cli frontend for the buku bookmarks manager using peco. It runs on Linux and inside your favourite terminal emulator.
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).
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.
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.
Set up an alias for your shell. Refer to your shell's manual on how to do that. If you do not know off of the top of your cat which one you are using, try entering ps -p $$
into your terminal and hit enter. The end of the second line, for instance "zsh" or "csh", should tell you what term to throw in the general direction of google to get you on track.
Or, quicker to access yet, set up a hotkey using your window manager. I can only outline a solution for one particular setup (mine) because of the diversity of desktop environments. Using the window manager "awesome wm" I register a hotkey to execute something like
urxvt -e "oil"
Or even
urxvt -name bookmarkViewer -e "oil"
in which case the 'instance' property of it's window is set to 'bookmarkViewer' and can now be referred to in the 'rules' section of your awesome wm config to have it opened in any special way you like. In my case it starts fullscreen as seen in the demo motion picture.
printf
near the end. Fuck around with them and the variables specifying the column widths until the result pleases you. Good luck, my friend.I am currently in the process of porting this project to haskell in order to learn the language, enjoy a better testing environment (although testing IO code has turned out to be a potentially hairy subject as well) and, hopefully, up my shell scripting game. Not particularily trying to bash any language, but haskell should actually manage to scale past two hundred lines of code (and would the crowd please go mild now). Watch me squirm as I do it, have a laugh. Drop funny issues to help keeping me engaged in my abusive relationship with the glaskow haskell compiler. See you there - probably not, but what can you do.
Lore is permanently disabled now. He loves his brother, though, so that's a plus.