koekeishiya / skhd

Simple hotkey daemon for macOS
MIT License
6.05k stars 204 forks source link

Changing layout breaks skhd modes #281

Open Mayonnaise-Slap opened 1 year ago

Mayonnaise-Slap commented 1 year ago

In my setup I have two window managers and they are tied to a specific mode in skhdrc. It appears to me, that every time I change layout (language) on my keyboard, .skhdrc is re-read and the mode I am in is not saved. I still can access non-modal shortcuts, but the mode I was in is forgotten.

In my case, I have yabai running, but all my commands are not registering after I have changed the language a couple of times.

Does anyone know if there is a way to fix that? I do have to type in multiple languages and having to re-instate the mode I was in is getting a bit unproductive. My config is probably jank as well and I invented a weel

Changing language makes skhd re-read .skhdrc

image

Snippet from my config

:: focus : yabai --start-service && shortcuts run "close_rectangle" && yabai -m space --balance
:: default : yabai --stop-service && open -a"Rectangle"

focus < shift + alt - a ; default
default < shift + alt - a ; focus

I want to keep non-modal shortcuts separate from modal. I may probably do with just having a default mode, but I have not yet found how to do that.

And btw, thanks for such an amazing tool. Tonns of appreciation for your work

mjgritli commented 9 months ago

when I change keyboard layout, i lose focus on the 2nd display and go back to focus on the first display window.