π©· Hop around your filesystem π©·
This is a bookmark plugin for yazi which augments the builtin bookmarking abilities into a single menu of cd
powers designed with user experience (and cuteness) in mind. Bookmarks are referred to as hops because users should always feel adorable while using their terminal.
- Create persistent hops in your
init.lua
config file (lowercase letters only) - Create ephemeral hops while using yazi (uppercase letters only)
- Hop to any directory open in another tab
- Hop back to previous directory (history is associated with tab number)
- Hop by fuzzy searching available hops with fzf or similar program
- Single menu for all functionality, therefore only one keymap is required in your
keymap.toml
file - Hands off: no reads or writes to your filesystem, all state is kept in memory
git clone https://github.com/stelcodes/bunny.yazi ~/.config/yazi/plugins/bunny.yazi
ya pack -a stelcodes/bunny
flake.nix
:
inputs = {
bunny-yazi = {
url = "github:stelcodes/bunny.yazi";
flake = false;
};
};
Home Manager config:
programs.yazi = {
plugins.bunny = "${inputs.bunny-yazi}";
initLua = ''
require("bunny"):setup({ ... })
'';
keymap.manager.prepend_keymap = [
{ on = ";"; run = "plugin bunny"; desc = "Start bunny.yazi"; }
];
};
~/.config/yazi/init.lua
:
require("bunny"):setup({
hops = {
{ key = "r", path = "/", },
{ key = "v", path = "/var", },
{ key = "t", path = "/tmp", },
{ key = "n", path = "/nix/store", desc = "Nix store" },
{ key = { "h", "h" }, path = "~", desc = "Home" },
{ key = { "h", "m" }, path = "~/Music", desc = "Music" },
{ key = { "h", "d" }, path = "~/Documents", desc = "Documents" },
{ key = { "h", "k" }, path = "~/Desktop", desc = "Desktop" },
{ key = "c", path = "~/.config", desc = "Config files" },
{ key = { "l", "s" }, path = "~/.local/share", desc = "Local share" },
{ key = { "l", "b" }, path = "~/.local/bin", desc = "Local bin" },
{ key = { "l", "t" }, path = "~/.local/state", desc = "Local state" },
-- key and path attributes are required, desc is optional
},
desc_strategy = "path", -- If desc isn't present, use "path" or "filename", default is "path"
notify = false, -- Notify after hopping, default is false
fuzzy_cmd = "fzf", -- Fuzzy searching command, default is "fzf"
})
~/.config/yazi/yazi.toml
:
[[manager.prepend_keymap]]
desc = "Start bunny.yazi"
on = ";"
run = "plugin bunny"