mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 04:46:41 +00:00
feat(hammerspoon/hosts): add hati specific configuration
This commit is contained in:
68
hammerspoon/hosts/hati.lua
Normal file
68
hammerspoon/hosts/hati.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
local obj = {}
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Global Hotkeys
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local apptoggle = require('app_toggle')
|
||||
|
||||
local function init_hotkeys()
|
||||
apptoggle:bind({ 'cmd', 'alt', 'ctrl' }, 'A', { 'Activity Monitor' })
|
||||
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' }, 'G', { 'Google Chrome' })
|
||||
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' },
|
||||
{ 'Code', '/Applications/Visual Studio Code.app' }
|
||||
)
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- URL Handling
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local uh = require('url_handler')
|
||||
|
||||
local function init_url_handler()
|
||||
uh.default_handler = uh.browsers.safari
|
||||
uh.url_patterns = {
|
||||
{
|
||||
{
|
||||
".-://github.com/krystal/",
|
||||
".-://.-.github.com/krystal/",
|
||||
".-://.-.gitbase..-.k.io/"
|
||||
},
|
||||
uh.browsers.chrome, nil, { "Slack", "Code", "Emacs" }
|
||||
},
|
||||
{
|
||||
{ "%://meet.google.com/" }, uh.browsers.chrome, nil,
|
||||
{
|
||||
"Slack", "Calendar", "Google Calendar", "Notion Calendar"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uh:init()
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Initialization
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function obj.init()
|
||||
init_hotkeys()
|
||||
init_url_handler()
|
||||
end
|
||||
|
||||
return obj
|
||||
Reference in New Issue
Block a user