koekeishiya / skhd

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

Works fine, until I try to implement modes #340

Closed maclong9 closed 1 month ago

maclong9 commented 6 months ago

The Issue

Everything works fine with no mode specifications, as soon as I add for example a default and a resize mode and restart the service none of the hotkeys work.

If I remove all mode definitions and mode specific hotkeys (all hotkeys just look like this: alt + shift - h : yabai -m window --warp west with no mode specification) then everything works fine.

Configuration

# Default 
:: default 

# Application Launching
default < alt - return : open /Applications/Alacritty.app

## Switch Focus 
default < alt - h : yabai -m window --focus west
default < alt - j : yabai -m window --focus south
default < alt - k : yabai -m window --focus north
default < alt - l : yabai -m window --focus east

## Swap Windows
default < alt + shift - h : yabai -m window --warp west
default < alt + shift - j : yabai -m window --warp south
default < alt + shift - k : yabai -m window --warp north
default < alt + shift - l : yabai -m window --warp east

## Change Mode
alt - r ; resize

# Resize
:: resize
alt - r ; resize

## Resize Windows
resize < h : yabai -m window --resize left:-15:0; yabai -m window --resize right:-15:0
resize < j : yabai -m window --resize bottom:0:15; yabai -m window --resize top:0:15
resize < k : yabai -m window --resize top:0:-15; yabai -m window --resize bottom:0:-15
resize < l : yabai -m window --resize right:15:0; yabai -m window --resize left:15:0

## Return to Default 
resize < esc ; default 
resize < enter ; default
merlinvn commented 5 months ago

could it be "return" instead of "enter"?

johnMocingbird commented 5 months ago

stop the skhd service and just run skhd in the terminal. It will give you more information of whats going on. I think there is a flag you can add to get even more information, but I think this will help. I setup up something similar to this,i can share the code with you if you'd like.