aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-03-26 12:28:24 -0700
committerGravatar Tom Willemse2026-03-30 10:28:30 -0700
commit71b135395c52142c1c6333847dad558bc8271609 (patch)
tree7d613ad3921d87948351b10e757417c5ee506f99
parentc4ee3b229db030ee10f9c9fd0e6a3b30b043af18 (diff)
downloadnew-dotfiles-71b135395c52142c1c6333847dad558bc8271609.tar.gz
new-dotfiles-71b135395c52142c1c6333847dad558bc8271609.zip
glide: Reorder options in url picker, show all bookmarks
-rw-r--r--glide/.config/glide/glide.ts19
1 files changed, 10 insertions, 9 deletions
diff --git a/glide/.config/glide/glide.ts b/glide/.config/glide/glide.ts
index 7c6fe36..1c3449f 100644
--- a/glide/.config/glide/glide.ts
+++ b/glide/.config/glide/glide.ts
@@ -281,21 +281,22 @@ const search_info: Record<string, { url: string, sep: string }> = {
} as const
/*
-* pick tabs via a selection of bookmarks and history
-*/
-
+ * pick tabs via a selection of bookmarks and history
+ */
glide.keymaps.set("normal", "<leader>t", async () => {
//let combined: Array<Browser.Bookmarks.BookmarkTreeNode | Browser.History.HistoryItem> = []
let combined = []
- const bookmarks = await browser.bookmarks.getRecent(20);
- bookmarks.forEach(bmark => combined.push({ title: bmark.title, url: bmark.url, type: 'B' }));
+ const tabs = await browser.tabs.query({});
+ tabs.forEach(entry => combined.push({ title: entry.title ?? 'Unnamed Tab', url: entry.url, type: 'T', favIconUrl: entry.favIconUrl }));
- const history = await browser.history.search({ text: "", maxResults: 100 });
- history.forEach(entry => combined.push({ title: entry.title, url: entry.url, type: 'H' }));
+ const bookmarks = await browser.bookmarks.search({});
+ bookmarks
+ .filter(bmark => bmark.type !== 'folder')
+ .forEach(bmark => combined.push({ title: bmark.title, url: bmark.url, type: 'B', favIconUrl: null }));
- const tabs = await browser.tabs.query({});
- tabs.forEach(entry => combined.push({ title: entry.title ?? 'Unnamed Tab', url: entry.url, type: 'T' }));
+ const history = await browser.history.search({ text: "", maxResults: 100 });
+ history.forEach(entry => combined.push({ title: entry.title, url: entry.url, type: 'H', favIconUrl: null }));
// filtering
const newtab = (await browser.runtime.getManifest()).chrome_url_overrides?.newtab