diff --git a/.config/yazi/bookmark b/.config/yazi/bookmark new file mode 100644 index 00000000..2e73b6e9 --- /dev/null +++ b/.config/yazi/bookmark @@ -0,0 +1,10 @@ +Videos /home/fic/Videos v +Videos /home/fic/Videos/ v +SyncDocuments /home/fic/SyncDocuments/ s +SyncDocuments /home/fic/SyncDocuments s +Pictures /home/fic/Pictures/ p +Pictures /home/fic/Pictures p +Downloads /home/fic/Downloads D +Downloads /home/fic/Downloads/ D +Documents /home/fic/Documents/ d +Documents /home/fic/Documents d diff --git a/.config/yazi/init.lua b/.config/yazi/init.lua index 8f02ef84..e191d177 100644 --- a/.config/yazi/init.lua +++ b/.config/yazi/init.lua @@ -1,6 +1,43 @@ require("custom-shell"):setup({ - history_path = "default", - save_history = true, + history_path = "default", + save_history = true, }) require("git"):setup() -- require("starship"):setup() + +local bookmarks = {} + +local home = os.getenv("HOME") +table.insert(bookmarks, { + tag = "Documents", + path = home .. "/Documents/", + key = "d" +}) +table.insert(bookmarks, { + tag = "SyncDocuments", + path = home .. "/SyncDocuments/", + key = "s" +}) +table.insert(bookmarks, { + tag = "Pictures", + path = home .. "/Pictures/", + key = "p" +}) +table.insert(bookmarks, { + tag = "Downloads", + path = home .. "/Downloads/", + key = "D" +}) +table.insert(bookmarks, { + tag = "Videos", + path = home .. "/Videos/", + key = "v" +}) + +require("yamb"):setup({ + bookmarks = bookmarks, + jump_notify = true, + cli = "fzf", + keys = "tnseriplfuwydhcxoaqz", + path = home .. "/.config/yazi/bookmark", +}) diff --git a/.config/yazi/keymap.toml b/.config/yazi/keymap.toml index cd82ac65..67c19c62 100644 --- a/.config/yazi/keymap.toml +++ b/.config/yazi/keymap.toml @@ -251,7 +251,45 @@ on = [ "k", "g" ] run = "plugin vcs-files" desc = "Show Git file changes" +[[manager.prepend_keymap]] +on = [ "u", "a" ] +run = "plugin yamb save" +desc = "Add bookmark" +[[manager.prepend_keymap]] +on = [ "u", "g" ] +run = "plugin yamb jump_by_key" +desc = "Jump bookmark by key" + +[[manager.prepend_keymap]] +on = [ "u", "G" ] +run = "plugin yamb jump_by_fzf" +desc = "Jump bookmark by fzf" + +[[manager.prepend_keymap]] +on = [ "u", "d" ] +run = "plugin yamb delete_by_key" +desc = "Delete bookmark by key" + +[[manager.prepend_keymap]] +on = [ "u", "D" ] +run = "plugin yamb delete_by_fzf" +desc = "Delete bookmark by fzf" + +[[manager.prepend_keymap]] +on = [ "u", "A" ] +run = "plugin yamb delete_all" +desc = "Delete all bookmarks" + +[[manager.prepend_keymap]] +on = [ "u", "r" ] +run = "plugin yamb rename_by_key" +desc = "Rename bookmark by key" + +[[manager.prepend_keymap]] +on = [ "u", "R" ] +run = "plugin yamb rename_by_fzf" +desc = "Rename bookmark by fzf" # INPUT