From 6b3c9df8c7a5f11ef8b4af3fa0200a320c75c31f Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 24 Feb 2026 17:56:07 -0800 Subject: glide: Add bookmark management commands --- glide/.config/glide/glide.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) 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", "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); + }, + })), + }); +}); -- cgit v1.3-2-g0d8e