|0.1.5||Sep 6, 2023|
|0.1.4||Apr 10, 2023|
#151 in Command line utilities
50 downloads per month
Have you ever opened a terminal, just to spend the next few seconds navigating to the right folder? No more! Introducing
bmark, the local bookmark manager. Search through your local bookmarks with a dmenu-like fuzzy finder, and open a terminal right in that directory!
- Quickly add and manage local bookmarks from the terminal
- Open a terminal emulator directly in a bookmarked location, picked with a dmenu-like fuzzy-finder.
- Navigate to bookmarked locations with shell aliases (see aliases).
This tool has been tested on fedora linux and nixos, and should work on all linux distros. MacOs and Windows are currently not supported, but may be implemented in the future.
For this tool to work out of the box, you will need the following installed on your system:
Even though these programs are the default, they are not strictly required as they can be swapped out for similar ones using the configuration file.
From zero to
Install cargo and the default programs.
sudo dnf install cargo rofi kitty neovim
cargo install bmark
If you have not already, add the
~/.cargo/bin folder to your
$PATH. This can be done by adding this line to your
You should now be able to run
bmark in your terminal!
To enable bmark's navigation aliases, you also need to source the aliases.sh file. The command for doing this can be automatically added to your shell config like this:
# For bash: bmark config source-cmd >> ~/.bashrc && bash # For zsh: bmark config source-cmd >> ~/.zshrc && zsh
Get a quick overview by running with no arguments:
Optional arguments: -h, --help print help message -v, --verbose be verbose Subcommands: add add a bookmark to the current working directory edit edit bookmarks in a text editor list list all stored bookmarks open open a new terminal in a bookmarked location rm remove a bookmark with a given name config commands for managing bmark configuration update update shell aliases file
Add a bookmark to the current working directory. By default this bookmark will be named the same as to the current directory (ex: "foo/bar" -> "bar"), but you can specify a different name by providing it.
bookmarks.toml file directly in your editor. The editor is determined by the
editor_cmd option (default is 'nvim').
List the current bookmarks in the terminal.
Launch dmenu-like program, search through bookmarks and open a terminal in the selected location. The terminal and dmenu-like program is determined by the user configuration (default is 'kitty' and 'rofi').
Remove a bookmark by its name.
Commands for managing configuration.
Update the aliases file (see aliases). This is done automatically whenever you alter your bookmarks file through. This command is only usefull if you manually open and the
bookmarks.toml file without using
bmark edit. The command for doing this can be generated like this:
bmark config source-cmd
bmark automatically created a file called
aliases.sh in the data directory. This file defines shell aliases, that navigate to all your bookmarks.
If you you have a bookmark called "myMark" you can navigate to it like this:
All the bookmark aliases are prefixed with '_' by default. This can be changed with the
To enable this in your shell, you need to source the alias file from your shell configuration file (ex:
bmark configuration is done using the configuration file. This file is located in the configuration directory (ex:
~/.config/bmark/config.toml). To create a config file with the default values run the following command:
bmark config create
Edit the configuration file easily with this command:
bmark config edit
To show the current config, run this command:
bmark config show
List of Configuration Values
|dmenu_cmd||"rofi -matching fuzzy -dmenu"|
|display_sep||" : "|
Description of Values
The directory where the
aliases.sh file is stored.
The dmenu-like command is used for fuzzy-finding through bookmarks. This program should (like dmenu) take input from a pipe, and output the selected line to stdout. To check if a program is suitable for this you can run the following:
seq 20 | <dmenu_cmd>
This should give you a menu with the numbers from 1 to 20, when you pick one, it should be output in the terminal.
If your command works, you can make bmark use that by adding a like to the '~/.config/bmark/config.toml' file:
dmenu_cmd = "<dmenu_cmd>"
The default command is
Using Actual Dmenu
If you want to use the actual dmenu instead of rofi, simply add this to your config .
dmenu_cmd = "dmenu"
(be sure to have rofi installed)
The editor command is run whenever you ask bmark to edit a file (ex:
bmark edit). This command should be able to be used like this:
For this a terminal based editor like neovim is recommended.
The terminal command is the command used for spawning terminal emulators at the desired locations. This command should be able to spawn a terminal in the root directory like this:
If you are not using the
kitty terminal, you should probably change this.
The prefix in front of the bookmark name for generated aliases.
Whether or not, to show paths in the dmenu-like fuzzy finder. If false, the
display_sep has no effect.
The characters separating the bookmark names from their paths when listing or searching through your bookmarks.