-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use service instead of plist #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of this was discovered through trial and error so some suggestions may be overkill or unnecessary but this does work when installing locally via brew install ./yabai.rb
. Hope this helps!
service do | ||
run opt_bin/"yabai" | ||
require_root true | ||
environment_variables HOMEBREW_PREFIX/"bin:/usr/bin:/bin:/usr/sbin:/sbin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw this used in a few other formulae and it seems to fix the error.
environment_variables HOMEBREW_PREFIX/"bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
environment_variables PATH: std_service_path_env |
keep_alive true | ||
interval 30 | ||
log_path var/"log/yabai/yabai.out.log" | ||
err_log_path var"/log/yabai/yabai.err.log" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this option is called error_log_path
.
https://docs.brew.sh/Formula-Cookbook#page
err_log_path var"/log/yabai/yabai.err.log" | |
error_log_path "#{var}/log/yabai/yabai.err.log" |
environment_variables HOMEBREW_PREFIX/"bin:/usr/bin:/bin:/usr/sbin:/sbin" | ||
keep_alive true | ||
interval 30 | ||
log_path var/"log/yabai/yabai.out.log" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this matters (pretty unfamiliar with ruby) but Homebrew complains about "var" specifically and string interpolation seems to make that error go away.
log_path var/"log/yabai/yabai.out.log" | |
log_path "#{var}/log/yabai/yabai.out.log" |
</plist> | ||
EOS | ||
service do | ||
run opt_bin/"yabai" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably be ignored, just suggesting for consistency.
run opt_bin/"yabai" | |
run "#{opt_bin}/yabai" |
EOS | ||
service do | ||
run opt_bin/"yabai" | ||
require_root true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need root?
require_root true |
require_root true | ||
environment_variables HOMEBREW_PREFIX/"bin:/usr/bin:/bin:/usr/sbin:/sbin" | ||
keep_alive true | ||
interval 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seem like this only request when run_type is set to interval
Suggestion per @hunterliao29 on #27
interval 30 |
Track #31 instead. |
recently homebrew had deprecated the
plist_options
suggest use theservice.require_root
instead . I am not familiar the homebrew just read the doc of it then write this. not sure is correct so i only write the yabai .if this is no problem i can add skhd thanks.