Closed k2662 closed 7 months ago
It is true that brew is a bit buggy and there are so many bug reports just because of strangeness in brew, however it seems to work great most of the times. It is very simple to work directly with the launchctl cli to manage the service completely without relying on brew or sketchybar:
sketchybar
program from source and copy it to /usr/local/bin/sketchybar
git.felix.sketchybar.plist
file in ~/Library/LaunchAgents/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>git.felix.sketchybar</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/sketchybar</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/sketchybar.out.log</string>
<key>StandardErrorPath</key>
<string>/tmp/sketchybar.err.log</string>
<key>ThrottleInterval</key>
<integer>30</integer>
<key>ProcessType</key>
<string>Interactive</string>
<key>Nice</key>
<integer>-20</integer>
</dict>
</plist>
launchctl bootstrap gui/$UID $HOME/Library/LaunchAgents/git.felix.sketchybar.plist
launchctl load -w $HOME/Library/LaunchAgents/git.felix.sketchybar.plist
It is true that brew is a bit buggy and there are so many bug reports just because of strangeness in brew, however it seems to work great most of the times. It is very simple to work directly with the launchctl cli to manage the service completely without relying on brew or sketchybar:
- Compile the
sketchybar
program from source and copy it to/usr/local/bin/sketchybar
- Create a
git.felix.sketchybar.plist
file in~/Library/LaunchAgents/
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>git.felix.sketchybar</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/sketchybar</string> </array> <key>EnvironmentVariables</key> <dict> <key>PATH</key> <string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin</string> </dict> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>StandardOutPath</key> <string>/tmp/sketchybar.out.log</string> <key>StandardErrorPath</key> <string>/tmp/sketchybar.err.log</string> <key>ThrottleInterval</key> <integer>30</integer> <key>ProcessType</key> <string>Interactive</string> <key>Nice</key> <integer>-20</integer> </dict> </plist>
- Bootstrap the plist with
launchctl bootstrap gui/$UID $HOME/Library/LaunchAgents/git.felix.sketchybar.plist launchctl load -w $HOME/Library/LaunchAgents/git.felix.sketchybar.plist
I want to suggest you add these instructions to the wiki under compile from source. Trialling aerospace as an alternative to yabai atm so I needed to upgrade to a version supporting the changes mentioned in #495. Couldn't get it all working on my own and had to track down a working launchagent spec through issues here.
It would be nice to have sketchybar manage itself instead of buggy brew.