// Name: Hyper App Switcher // Description: Assign hyper-key shortcuts to focus the most recently used window of specific apps. // Author: tayiorbeii // GitHub: tayiorbeii import "@johnlindquist/kit" const mappings: { key: string; app: string }[] = [ { key: "b", app: "Google Chrome" }, { key: "l", app: "Logseq" }, ] // Register global shortcuts: Hyper = cmd+ctrl+shift+opt for (const { key, app } of mappings) { await registerShortcut(`cmd+ctrl+shift+opt+${key}`, async () => { try { await openApp(app) } catch (err) { await notify(`Failed to focus/open ${app}`) } }) } await toast("Hyper App Switcher active", { autoClose: 2000 }) await hide() // Keep script running to maintain shortcuts await new Promise(() => {})