diff options
| -rw-r--r-- | glide/.config/glide/glide.ts | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/glide/.config/glide/glide.ts b/glide/.config/glide/glide.ts index 8f9ec46..f61da8b 100644 --- a/glide/.config/glide/glide.ts +++ b/glide/.config/glide/glide.ts @@ -381,3 +381,34 @@ glide.keymaps.set("normal", "<leader>t", async () => { })), }); }, { description: "Open the site searcher" }); + +glide.keymaps.set('normal', 'ab', async () => { + const currentTab = await glide.tabs.get_first({ active: true }); + + glide.commandline.show({ + title: 'Add', + options: [{ + label: currentTab.title, + async execute({ input }) { + await browser.bookmarks.create({ + url: currentTab.url, + title: input || currentTab.title, + }); + } + }], + }); +}); + +glide.keymaps.set('normal', 'kb', async () => { + const bookmarks = await browser.bookmarks.search({}); + + glide.commandline.show({ + title: 'Remove', + options: bookmarks.map((b) => ({ + label: b.title, + async execute() { + await browser.bookmarks.remove(b.id); + }, + })), + }); +}); |
