From 32b25c3717914197d1b22f4f47a017247beea4d3 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 22 Feb 2024 23:55:26 +0000 Subject: [PATCH] feat(hammerspoon/noct): tweak host-specific URL handling and keybindings --- hammerspoon/hosts/noct.lua | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/hammerspoon/hosts/noct.lua b/hammerspoon/hosts/noct.lua index be1d936..1a3f40e 100644 --- a/hammerspoon/hosts/noct.lua +++ b/hammerspoon/hosts/noct.lua @@ -11,7 +11,7 @@ local function init_hotkeys() apptoggle:bind({ 'cmd', 'ctrl' }, '2', { 'ChatGPT' }) apptoggle:bind({ 'cmd', 'ctrl' }, '4', { 'FastGPT' }) apptoggle:bind({ 'cmd', 'ctrl' }, 'A', { 'Messages' }) - apptoggle:bind({ 'cmd', 'ctrl' }, 'B', { 'TablePlus' }, { 'Lens' }) + apptoggle:bind({ 'cmd', 'ctrl' }, 'B', { 'Lens' }, { 'Sequel Pro' }) apptoggle:bind({ 'cmd', 'ctrl' }, 'D', { 'Mailplane' }, { 'Mimestream' }) apptoggle:bind({ 'cmd', 'ctrl' }, 'E', { 'Emacs', '/Applications/Emacs.app' }) apptoggle:bind({ 'cmd', 'ctrl' }, 'F', { 'Element' }, { 'Element Nightly' }) @@ -40,26 +40,10 @@ end local uh = require('url_handler') local function init_url_handler() - local chromeProfiles = { - default = uh.chromeProfile("Default"), - work = uh.chromeProfile("Profile 1"), - } - - uh.default_handler = uh.browsers.safari - uh.url_patterns = { + uh.default_handler = uh.browsers.safari + uh.url_patterns = { { - { - ".-://github.com/krystal/", - ".-://.-.github.com/krystal/", - ".-://.-.gitbase..-.k.io/" - }, - chromeProfiles.default, nil, { "Slack", "Code", "Emacs" } - }, - { - { "%://meet.google.com/" }, chromeProfiles.work, nil, - { - "Slack", "Calendar", "Google Calendar", "Notion Calendar" - } + { "%://meet.google.com/" }, uh.browsers.chrome, nil, } } -- uh.url_redir_decoders = {