diff options
| author | 2026-02-08 21:35:05 -0800 | |
|---|---|---|
| committer | 2026-02-08 21:35:05 -0800 | |
| commit | 444e2bb25b76cc55a2f86bb7d318363711daa8ca (patch) | |
| tree | 6081dbdef5c39cd10ab530c0ab6ca64b48accf74 | |
| parent | cf8e1247d543a95271732593e6c55044f45fd960 (diff) | |
| download | new-dotfiles-444e2bb25b76cc55a2f86bb7d318363711daa8ca.tar.gz new-dotfiles-444e2bb25b76cc55a2f86bb7d318363711daa8ca.zip | |
glide: Add configuraton
| -rw-r--r-- | glide/.config/glide/glide.ts | 122 |
1 files changed, 122 insertions, 0 deletions
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", "<A-p>", "tab_prev"); +glide.keymaps.del('normal', '<C-k>'); +glide.keymaps.set('insert', '<A-p>', "tab_prev"); +glide.keymaps.del('insert', '<C-k>'); + +// Next tab +glide.keymaps.set("normal", "<A-n>", "tab_next"); +glide.keymaps.del('normal', '<C-j>'); + +// Scroll to top +glide.keymaps.set("normal", "<A-lt>", "scroll_top"); +glide.keymaps.del('normal', 'gg'); + +// glide.keymaps.set("normal", "<A-gt>", "scroll_bottom"); +// glide.keymaps.del('normal', 'G'); + +// Scroll down +glide.keymaps.set('normal', '<C-n>', 'caret_move down'); +glide.keymaps.del('normal', 'j'); +glide.keymaps.set('command', '<C-n>', 'commandline_focus_next'); + +// Scroll up +glide.keymaps.set('normal', '<C-p>', 'caret_move up'); +glide.keymaps.set('normal', 'k'); +glide.keymaps.set('command', '<C-p>', 'commandline_focus_back'); + +// Go back +glide.keymaps.set("normal", "l", "back"); +glide.keymaps.del("normal", "<A-h>"); + +// Go forward +glide.keymaps.set("normal", "r", "forward"); +glide.keymaps.del("normal", "<A-l>"); + +// Abort +glide.keymaps.set("op-pending", "<C-g>", "mode_change normal"); + +// Close tab +glide.keymaps.set('normal', 'x', 'tab_close'); +glide.keymaps.del('normal', '<leader>d'); + +// Scroll down +glide.keymaps.set('normal', '<C-v>', 'scroll_page_down'); +glide.keymaps.del('normal', '<C-d>'); + +// Scroll up +glide.keymaps.set('normal', '<A-v>', 'scroll_page_up'); +glide.keymaps.del('normal', '<C-u>'); + +// Commandline +glide.keymaps.set('normal', '<A-x>', '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', '<leader>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', '<leader>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")); } }, + ], + }); +}); |
