yqrashawn / GokuRakuJoudo

config karabiner with ease
GNU General Public License v3.0
1.16k stars 119 forks source link

hyper with arrow keys doesn't work #67

Closed bangedorrunt closed 4 years ago

bangedorrunt commented 4 years ago

hi,

i have the following config to combine hyper with arrow keys to execute shell command. however it just doesn't work. not sure if this is bug or my fault

{:des "hyper + arrow to resize window"
 :rules [[:!!up_arrow "yabai -m window --grid 1:1:0:0:1:1"]
         [:!!down_arrow "yabai -m window --grid 8:8:1:1:6:6"]
         [:!!left_arrow "yabai -m window --grid 1:2:0:0:1:1"]
         [:!!right_arrow "yabai -m window --grid 1:2:1:0:1:1"]]}

updated: after doing some research, the following worked for me

{:des "hyper + arrow to resize window"
 :rules [[:!!up_arrow "PATH=$PATH:usr/local/bin yabai -m window --grid 1:1:0:0:1:1"]
        [:!!down_arrow "PATH=$PATH:usr/local/bin yabai -m window --grid 8:8:1:1:6:6"]
        [:!!left_arrow "PATH=$PATH:usr/local/bin yabai -m window --grid 1:2:0:0:1:1"]
        [:!!right_arrow "PATH=$PATH:usr/local/bin yabai -m window --grid 1:2:1:0:1:1"]]}

as you can see, i hade to put env PATH before executive command to make it worked. is it possible to let karabiner recognized the homebrew PATH by default?

yqrashawn commented 4 years ago

Yes. That's the solution. You can simply use /usr/local/bin/yabai to replace yabai like here.

is it possible to let karabiner recognized the homebrew PATH by default?

There's a related KE issue got closed by the stale bot.

bangedorrunt commented 4 years ago

@yqrashawn many thanks 👍

bangedorrunt commented 4 years ago

@yqrashawn, i found a solution here that might help as a work around. yabai was installed from homebrew and its PATH is not recognized for GUI/.app. we can fixed it by using sudo launchctl config user path "/usr/local/bin:$PATH" and then restart the machine. from now on, you don't have to put the PATH before any shell_command.

yqrashawn commented 4 years ago

@babygau That's great. Let's add some SEO words to make this issue help more people.

karabiner shell_command yabai nothing not work bin PATH