mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 08:26:42 +00:00
When using Arc and having new links open in Little Arc while having Hammerspoon set as the default browser, clicking a link first switches to and focuses on the most recent main Arc window, before then opening Little Arc. While if Arc itself is the default browser, no such focus switching happens, and instead Little Arc just opens and gets focus.
63 lines
1.9 KiB
Lua
63 lines
1.9 KiB
Lua
local obj = {}
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- Global Hotkeys
|
|
--------------------------------------------------------------------------------
|
|
|
|
local apptoggle = require('app_toggle')
|
|
|
|
local function init_hotkeys()
|
|
hs.hotkey.bind({ 'cmd', 'alt', 'ctrl' }, 'S', apptoggle.showAppInfo)
|
|
|
|
apptoggle:bind({ 'cmd', 'alt', 'ctrl' }, 'A', { 'Activity Monitor' })
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, '4', { 'HuggingChat' })
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, 'A', { 'ArgoCD' })
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, 'B', { 'TablePlus' }, { 'Lens' })
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, 'D', { 'Mail' })
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, 'E', { 'Emacs', '/Applications/Emacs.app' })
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, 'T', { 'Discord PTB' })
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, 'X', { 'Obsidian' }, { 'Notion' })
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, 'Z', { 'Slack' })
|
|
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, 'C',
|
|
{ 'Calendar' },
|
|
{ 'Google Calendar' },
|
|
{ 'Notion Calendar' }
|
|
)
|
|
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, 'W',
|
|
{ 'Code - Insiders', '/Applications/Visual Studio Code - Insiders.app' }
|
|
)
|
|
apptoggle:bind({ 'cmd', 'ctrl' }, '2',
|
|
{ 'Code', '/Applications/Visual Studio Code.app' }
|
|
)
|
|
end
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- URL Handling
|
|
--------------------------------------------------------------------------------
|
|
|
|
-- local uh = require('url_handler')
|
|
|
|
-- local function init_url_handler()
|
|
-- uh.default_handler = uh.browsers.arc
|
|
-- uh.url_patterns = {
|
|
-- {
|
|
-- { "%://meet.google.com/" }, uh.browsers.chrome, nil,
|
|
-- }
|
|
-- }
|
|
|
|
-- uh:init()
|
|
-- end
|
|
|
|
--------------------------------------------------------------------------------
|
|
-- Initialization
|
|
--------------------------------------------------------------------------------
|
|
|
|
function obj.init()
|
|
init_hotkeys()
|
|
-- init_url_handler()
|
|
end
|
|
|
|
return obj
|