From 444e2bb25b76cc55a2f86bb7d318363711daa8ca Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 8 Feb 2026 21:35:05 -0800 Subject: glide: Add configuraton --- glide/.config/glide/glide.ts | 122 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 glide/.config/glide/glide.ts diff --git a/glide/.config/glide/glide.ts b/glide/.config/glide/glide.ts new file mode 100644 index 0000000..ea9fe88 --- /dev/null +++ b/glide/.config/glide/glide.ts @@ -0,0 +1,122 @@ +// Config docs: +// +// https://glide-browser.app/config +// +// API reference: +// +// https://glide-browser.app/api +// +// Default config files can be found here: +// +// https://github.com/glide-browser/glide/tree/main/src/glide/browser/base/content/plugins +// +// Most default keymappings are defined here: +// +// https://github.com/glide-browser/glide/blob/main/src/glide/browser/base/content/plugins/keymaps.mts +// +// Try typing `glide.` and see what you can do! + +glide.o.hint_size = "15pt"; + +glide.prefs.set("ui.key.menuAccessKeyFocuses", false); +glide.prefs.set("sidebar.verticalTabs", true); +glide.prefs.set("sidebar.visibility", "hide-sidebar"); +// glide.prefs.set("browser.urlbar.placeholderName", "DuckDuckGo"); +// glide.prefs.set("browser.urlbar.placeholderName.private", "DuckDuckGo"); + +// Previous tab +glide.keymaps.set("normal", "", "tab_prev"); +glide.keymaps.del('normal', ''); +glide.keymaps.set('insert', '', "tab_prev"); +glide.keymaps.del('insert', ''); + +// Next tab +glide.keymaps.set("normal", "", "tab_next"); +glide.keymaps.del('normal', ''); + +// Scroll to top +glide.keymaps.set("normal", "", "scroll_top"); +glide.keymaps.del('normal', 'gg'); + +// glide.keymaps.set("normal", "", "scroll_bottom"); +// glide.keymaps.del('normal', 'G'); + +// Scroll down +glide.keymaps.set('normal', '', 'caret_move down'); +glide.keymaps.del('normal', 'j'); +glide.keymaps.set('command', '', 'commandline_focus_next'); + +// Scroll up +glide.keymaps.set('normal', '', 'caret_move up'); +glide.keymaps.set('normal', 'k'); +glide.keymaps.set('command', '', 'commandline_focus_back'); + +// Go back +glide.keymaps.set("normal", "l", "back"); +glide.keymaps.del("normal", ""); + +// Go forward +glide.keymaps.set("normal", "r", "forward"); +glide.keymaps.del("normal", ""); + +// Abort +glide.keymaps.set("op-pending", "", "mode_change normal"); + +// Close tab +glide.keymaps.set('normal', 'x', 'tab_close'); +glide.keymaps.del('normal', 'd'); + +// Scroll down +glide.keymaps.set('normal', '', 'scroll_page_down'); +glide.keymaps.del('normal', ''); + +// Scroll up +glide.keymaps.set('normal', '', 'scroll_page_up'); +glide.keymaps.del('normal', ''); + +// Commandline +glide.keymaps.set('normal', '', 'commandline_show'); +glide.keymaps.del('normal', ':'); + +async function installPuntAddons() { + await glide.addons.install("https://addons.mozilla.org/firefox/downloads/file/4677239/1password_x_password_manager-8.12.1.3.xpi"); +} + +glide.keymaps.set('normal', 'm', async function() { + const tabs = await glide.tabs.query({url: 'https://meet.google.com/*'}); + + if (tabs.length === 0) { + return; + } + + await glide.content.execute(() => { + document.querySelector('[data-is-muted]').click(); + }, { tab_id: tabs[0] }); +}); + +async function open_or_activate(url) { + const tabs = await glide.tabs.query({url: `*://${url.hostname}/*`}); + const tab = tabs.find(t => t.url.startsWith(url.href)); + + if (tabs.length === 0) { + glide.excmds.execute(`tab_new ${url}`); + } else { + await browser.tabs.update(tab.id, { active: true }); + } +} + +glide.keymaps.set('normal', 'gd', async function() { + glide.commandline.show({ + title: "Shortcut", + options: [ + { label: 'Chanced Local', execute() { open_or_activate(new URL('http://localhost:8081')); } }, + { label: 'Punt Local', execute() { open_or_activate(new URL("http://localhost:8082")); } }, + { label: 'Local Filament', execute() { open_or_activate(new URL("http://localhost:8002")); } }, + { label: 'Chanced Staging', execute() { open_or_activate(new URL("https://gambleh.com")); } }, + { label: 'Chanced Staging Filament', execute() { open_or_activate(new URL("https://filament.gambleh.com")); } }, + { label: 'Punt Staging', execute() { open_or_activate(new URL("https://goldsink.com")); } }, + { label: 'Punt Staging Filament', execute() { open_or_activate(new URL("https://filament.goldsink.com")); } }, + { label: 'Back-end Github', execute() { open_or_activate(new URL("https://github.com/juked-social/social-api")); } }, + ], + }); +}); -- cgit v1.3-2-g0d8e