Closed cocoonkid closed 1 year ago
PRs welcome
Thanks, I'd work on it but I'm still a noob and I'm not ready for tackling swift.
I researched a bit though https://n1ghtmare.github.io/2022-01-14/implement-a-keyboard-shortcuts-handler-in-typescript/
I then tried to fix it with hamerspoon. https://github.com/Hammerspoon/hammerspoon
I am successful in launching it and sometimes it works actually but most of the time it just gets into some kind of "hidden state"
here's the Lua code I'm using.
hs.hotkey.bind({"ctrl"}, "space", toggle_application("com.ospfranco.sol"))
function toggle_application(_app)
return function()
local app = hs.application.applicationsForBundleID(_app)
if app[1] == nill then
hs.application.launchOrFocusByBundleID(_app)
elseif app[1]:isFrontmost() then
app[1]:hide()
else
app[1]:activate()
end
end
end
I wonder if there's a way to capture the sol window on it's own.
I propose adding an option to disable either/or Global Shortcut, Clipboard Shortcut, Scratchpad Shortcut.
Ha, I was able to get it to work:
hs.hotkey.bind({"ctrl"}, "space", toggle_application("com.ospfranco.sol"))
function toggle_application(_app)
return function()
local app = hs.application.applicationsForBundleID(_app)
if app[1] == nill then
hs.application.launchOrFocusByBundleID(_app)
elseif app[1]:isFrontmost() then
app[1]:hide()
else
app[1]:activate()
app[1]:unhide()
app[1]:setFrontmost(true)
end
end
end
the native shortcut is set to cmd + space and does not interfere with Contexts.
No, unfortunately not. It just takes a while longer now for the Sol window to become inaccessible.
Killing the Sol process makes it work again. I haven't yet been able to identify what triggers the inaccessibility.
Will report back as soon as I have stable workaround.
There is more happening when the window is shown than just activating it:
You will probably not get around this with hammerspoon
Added Ctrl + Space to the list of selectable global shortcuts
[feature request] Add ctrl + space as hotkey (or actually make it fully customizable)
I run Contexts on cmd+space and my terminal on option+space.
Alfred works on ctrl+space but I cannot configure sol to work with this combo. I'd really like to use it instead of Alfred.
I was able to put Sol on ctrl+space via hammerspoon but it still reserves the cmd or option key for itself.
Thank you for consideration.