diff options
| author | 2026-05-08 11:45:04 -0700 | |
|---|---|---|
| committer | 2026-05-19 09:43:44 -0700 | |
| commit | 7ba0f9732499f3b92177147151e903c1f3ab05be (patch) | |
| tree | 5b958a34e0bdd851d347dc25adc8a9e5b81cb47a | |
| parent | a1a6c297baaa01cc7afe21ea6e7f0c5d35911bb1 (diff) | |
| download | new-dotfiles-7ba0f9732499f3b92177147151e903c1f3ab05be.tar.gz new-dotfiles-7ba0f9732499f3b92177147151e903c1f3ab05be.zip | |
glide: reindent file
| -rw-r--r-- | glide/.config/glide/glide.ts | 304 |
1 files changed, 152 insertions, 152 deletions
diff --git a/glide/.config/glide/glide.ts b/glide/.config/glide/glide.ts index 295c590..6bad42c 100644 --- a/glide/.config/glide/glide.ts +++ b/glide/.config/glide/glide.ts @@ -86,47 +86,47 @@ glide.keymaps.set('insert', '<C-n>', async () => await glide.keys.send("<down>") glide.keymaps.set('insert', '<C-p>', async () => await glide.keys.send('<up>')); const keyboard_quit = glide.excmds.create({ - name: "keyboard_quit", - description: 'Cancel whatever is going on and return to normal', + name: "keyboard_quit", + description: 'Cancel whatever is going on and return to normal', }, () => { - if (glide.findbar.is_open()) { - glide.findbar.close(); - } + if (glide.findbar.is_open()) { + glide.findbar.close(); + } - if (glide.commandline.is_active()) { - glide.commandline.close(); - } + if (glide.commandline.is_active()) { + glide.commandline.close(); + } - glide.excmds.execute('mode_change normal'); + glide.excmds.execute('mode_change normal'); }); glide.keymaps.set(['insert', 'command', 'normal'], '<C-g>', 'keyboard_quit'); // Search const search_next = glide.excmds.create({ - name: "search_next", - description: "Open search or find the next result", + name: "search_next", + description: "Open search or find the next result", }, () => { - if (glide.findbar.is_focused()) { - glide.findbar.next_match(); - } - else { - glide.findbar.open(); - glide.excmds.execute('mode_change insert'); - } + if (glide.findbar.is_focused()) { + glide.findbar.next_match(); + } + else { + glide.findbar.open(); + glide.excmds.execute('mode_change insert'); + } }); const search_prev = glide.excmds.create({ - name: "search_prev", - description: "Open search of find the previous result", + name: "search_prev", + description: "Open search of find the previous result", }, () => { - if (glide.findbar.is_focused()) { - glide.findbar.previous_match(); - } - else { - glide.findbar.open(); - glide.excmds.execute('mode_change insert'); - } + if (glide.findbar.is_focused()) { + glide.findbar.previous_match(); + } + else { + glide.findbar.open(); + glide.excmds.execute('mode_change insert'); + } }); glide.keymaps.set('normal', '<C-s>', 'search_next'); @@ -135,51 +135,51 @@ glide.keymaps.set('insert', '<C-s>', 'search_next'); glide.keymaps.set('insert', '<C-r>', 'search_prev'); async function installPuntAddons() { - await glide.addons.install("https://addons.mozilla.org/firefox/downloads/file/4677239/1password_x_password_manager-8.12.1.3.xpi"); - await glide.addons.install('https://addons.mozilla.org/firefox/downloads/file/4508409/vue_js_devtools-7.7.7.xpi'); + await glide.addons.install("https://addons.mozilla.org/firefox/downloads/file/4677239/1password_x_password_manager-8.12.1.3.xpi"); + await glide.addons.install('https://addons.mozilla.org/firefox/downloads/file/4508409/vue_js_devtools-7.7.7.xpi'); } async function installPersonalAddons() { - await glide.addons.install('https://addons.mozilla.org/firefox/downloads/file/4628286/keepassxc_browser-1.9.11.xpi'); + await glide.addons.install('https://addons.mozilla.org/firefox/downloads/file/4628286/keepassxc_browser-1.9.11.xpi'); } glide.keymaps.set('normal', '<leader>m', async function() { - const tabs = await glide.tabs.query({url: 'https://meet.google.com/*'}); + const tabs = await glide.tabs.query({url: 'https://meet.google.com/*'}); - if (tabs.length === 0) { - return; - } + if (tabs.length === 0) { + return; + } - await glide.content.execute(() => { - document.querySelector('[data-is-muted]').click(); - }, { tab_id: tabs[0] }); + 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)); + const tabs = await glide.tabs.query({url: `*://${url.hostname}/*`}); + const tab = tabs.find(t => t.url.startsWith(url.href)); - if (tab) { - await browser.tabs.update(tab.id, { active: true }); - } else { - glide.excmds.execute(`tab_new ${url}`); - } + if (tab) { + await browser.tabs.update(tab.id, { active: true }); + } else { + glide.excmds.execute(`tab_new ${url}`); + } } 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")); } }, - ], - }); + 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")); } }, + ], + }); }); glide.addons.install("https://addons.mozilla.org/firefox/downloads/file/4675310/ublock_origin-1.69.0.xpi"); @@ -201,9 +201,9 @@ glide.keymaps.set("normal", "gh", async () => { function isVisible(element: HTMLElement): boolean { const style = window.getComputedStyle(element); return style.display !== 'none' && - style.visibility !== 'hidden' && - style.opacity !== '0' && - element.offsetParent !== null; + style.visibility !== 'hidden' && + style.opacity !== '0' && + element.offsetParent !== null; } function getXPath(element: Element): string { @@ -229,7 +229,7 @@ glide.keymaps.set("normal", "gh", async () => { tag: heading.tagName.toLowerCase(), id: heading.id || '', xpath: getXPath(heading) - })); + })); }, { tab_id: activeTabId }); if (headings.length === 0) { @@ -276,40 +276,40 @@ glide.keymaps.set("normal", "gh", async () => { // Bookmarks const add_bookmark = glide.excmds.create({ - name: 'add_bookmark', - description: 'Create a bookmark for the current page, asking for the title.', + name: 'add_bookmark', + description: 'Create a bookmark for the current page, asking for the title.', }, async () => { - const currentTab = await glide.tabs.get_first({ active: true }); + 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.commandline.show({ + title: 'Add', + options: [{ + label: currentTab.title, + async execute({ input }) { + await browser.bookmarks.create({ + url: currentTab.url, + title: input || currentTab.title, + }); + } + }], + }); }); const remove_bookmark = glide.excmds.create({ - name: 'remove_bookmark', - description: 'Remove a bookmark for the current page.', + name: 'remove_bookmark', + description: 'Remove a bookmark for the current page.', }, async () => { - const bookmarks = await browser.bookmarks.search({}); + 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); - }, - })), - }); + glide.commandline.show({ + title: 'Remove', + options: bookmarks.map((b) => ({ + label: b.title, + async execute() { + await browser.bookmarks.remove(b.id); + }, + })), + }); }); glide.keymaps.set('normal', 'ab', 'add_bookmark'); @@ -318,52 +318,52 @@ glide.keymaps.set('normal', 'kb', 'remove_bookmark'); // Split windows const split_window = glide.excmds.create({ - name: 'split_window', - description: 'Ask for a tab and show it in a split with this window', + name: 'split_window', + description: 'Ask for a tab and show it in a split with this window', }, async () => { - const activeTab = await glide.tabs.active(); - const tabs = await glide.tabs.query({}); + const activeTab = await glide.tabs.active(); + const tabs = await glide.tabs.query({}); - glide.commandline.show({ - title: "Show other", - options: tabs.map(t => ({ - label: t.title, - async execute() { - glide.unstable.split_views.create([activeTab.id, t.id]); - } - })), - }); + glide.commandline.show({ + title: "Show other", + options: tabs.map(t => ({ + label: t.title, + async execute() { + glide.unstable.split_views.create([activeTab.id, t.id]); + } + })), + }); }); const keep_window = glide.excmds.create({ - name: 'keep_window', - description: 'Remove the current split of windows, keeping the focused window', + name: 'keep_window', + description: 'Remove the current split of windows, keeping the focused window', }, ({ tab_id }) => { - if (glide.unstable.split_views.has_split_view(tab_id)) { - glide.unstable.split_views.separate(tab_id); - } + if (glide.unstable.split_views.has_split_view(tab_id)) { + glide.unstable.split_views.separate(tab_id); + } }); const delete_window = glide.excmds.create({ - name: 'delete_window', - description: 'Remove the current split of windows, removing the focused window', + name: 'delete_window', + description: 'Remove the current split of windows, removing the focused window', }, async ({ tab_id }) => { - glide.excmds.execute(`other_window`); - glide.excmds.execute(`keep_window`); + glide.excmds.execute(`other_window`); + glide.excmds.execute(`keep_window`); }); const other_window = glide.excmds.create({ - name: 'other_window', - description: 'Focus other window', + name: 'other_window', + description: 'Focus other window', }, async ({ tab_id }) => { - if (!glide.unstable.split_views.has_split_view(tab_id)) { - return; - } + if (!glide.unstable.split_views.has_split_view(tab_id)) { + return; + } - const split_tabs = await glide.unstable.split_views.get(tab_id); - const other_tab = split_tabs.tabs.filter(t => t.id !== tab_id)[0]; + const split_tabs = await glide.unstable.split_views.get(tab_id); + const other_tab = split_tabs.tabs.filter(t => t.id !== tab_id)[0]; - await browser.tabs.update(other_tab.id, { active: true }); + await browser.tabs.update(other_tab.id, { active: true }); }); glide.keymaps.set('normal', '<C-x>4b', 'split_window'); @@ -374,38 +374,38 @@ glide.keymaps.set('normal', '<A-o>', 'other_window'); // Groups const group_tab = glide.excmds.create({ - name: 'group_tab', - description: 'Add the current tab to a group.' + name: 'group_tab', + description: 'Add the current tab to a group.' }, async ({ tab_id }) => { - const groups = await browser.tabGroups.query({}); - glide.commandline.show({ - title: "group", - options: groups.map((group) => ({ - label: group.title, - async execute({ input }) { - if (group.title.indexOf(input) >= 0) { - await browser.tabs.group({ - groupId: group.id, - tabIds: [tab_id], - }); - } else { - const groupId = await browser.tabs.group({ - tabIds: [tab_id], - }); - await browser.tabGroups.update(groupId, { - title: input, - }); - } - }, - })), - }); + const groups = await browser.tabGroups.query({}); + glide.commandline.show({ + title: "group", + options: groups.map((group) => ({ + label: group.title, + async execute({ input }) { + if (group.title.indexOf(input) >= 0) { + await browser.tabs.group({ + groupId: group.id, + tabIds: [tab_id], + }); + } else { + const groupId = await browser.tabs.group({ + tabIds: [tab_id], + }); + await browser.tabGroups.update(groupId, { + title: input, + }); + } + }, + })), + }); }); const ungroup_tab = glide.excmds.create({ - name: 'ungroup_tab', - description: 'Remove the current tab from any group.' + name: 'ungroup_tab', + description: 'Remove the current tab from any group.' }, async ({ tab_id }) => { - await browser.tabs.ungroup([ tab_id ]); + await browser.tabs.ungroup([ tab_id ]); }); glide.keymaps.set('normal', 'ag', 'group_tab'); @@ -415,16 +415,16 @@ glide.include('sitesearch.glide.ts'); glide.include('tabbar.glide.ts'); const toggle_reader_mode = glide.excmds.create({ - name: 'toggle_reader_mode', - description: 'Toggle Reader Mode for the current tab', + name: 'toggle_reader_mode', + description: 'Toggle Reader Mode for the current tab', }, () => { - browser.tabs.toggleReaderMode(); + browser.tabs.toggleReaderMode(); }); glide.autocmds.create("UrlEnter", { - hostname: "staging.goldsink.com", + hostname: "staging.goldsink.com", }, () => { - glide.buf.prefs.set( - 'geo.provider.network.url', - 'data:application/json,{"location": {"lat": 45.542805, "lng": -122.7369563}, "accuracy": 100.0}'); + glide.buf.prefs.set( + 'geo.provider.network.url', + 'data:application/json,{"location": {"lat": 45.542805, "lng": -122.7369563}, "accuracy": 100.0}'); }); |
