Customize the menu bar program on MacOS using BitBar.
brew install bitbar
- The first time you open BitBar, you will be prompted to set a path as the root directory for storing script files as the plugin directory.
- Create a script file in the plugin directory.
date: The script name is used as the file name.
1s: The script refresh interval.
- Edit the script content.
This example uses displaying the time as an example.
- Add executable permission.
chmod +x date.1s.sh
- Manually refresh with
- When outputting multiple lines of text, except for the first line, which will be displayed in the menu bar, the other lines will be displayed in the submenu in order.
- If there are multiple script files in the plugin directory, the first line of each script file will be displayed in the menu bar.