系统设置

隐藏默认顶部栏

osascript -e 'tell application "System Events" to set autohide menu bar of dock preferences to true'

启用顶部烂

osascript -e 'tell application "System Events" to set autohide menu bar of dock preferences to false'

安装

brew tap FelixKratz/formulae  
brew install sketchybar

设置配置文件

mkdir -p ~/.config/sketchybar/plugins
cp $(brew --prefix)/share/sketchybar/examples/sketchybarrc ~/.config/sketchybar/sketchybarrc
cp -r $(brew --prefix)/share/sketchybar/examples/plugins/ ~/.config/sketchybar/plugins/

启动运行

brew services start sketchybar

停止运行

brew services stop sketchybar 

重启

brew services restart sketchybar

卸载

brew uninstall sketchybar
brew untap FelixKratz/formulae
 
pkill "sketchybar"
 
osascript -e 'tell application "System Events" to set autohide menu bar of dock preferences to false'

配置

依赖

brew install --cask sf-symbols
brew install jq
brew install gh
brew install switchaudio-osx
 
# 这显示了应用程序的图标
curl -L https://github.com/kvndrsslr/sketchybar-app-font/releases/download/v1.0.23/sketchybar-app-font.ttf -o $HOME/Library/Fonts/sketchybar-app-font.ttf
  • jq - 用于解析JSON数据以提取特定的信息片段,例如网络状态、媒体播放信息、GitHub通知等。
  • sf-symbols - 这显示了苹果标志和其他图标在右边
  • gh - 这将安装GitHub命令行工具
  • switchaudio-osx - 用于切换音频源并显示麦克风名称。