A lightweight xbar plugin that provides real-time system resource monitoring directly in your macOS menu bar.
- 🌐 Network monitoring
- Real-time upload/download bandwidth
- Human-readable data formats (KB/s, MB/s, GB/s)
- 💻 System resources
- CPU usage percentage
- RAM usage percentage
- ⚡️ Performance
- Lightweight and efficient monitoring
- Configurable refresh rates
- Minimal system impact
- 🛠 Smart features
- Automatic suspension when laptop lid is closed
- Clean menu bar display
- macOS
- xbar
- Ruby
- sudo access for powermetrics (network monitoring)
- Install xbar from xbarapp.com
- Clone this repository:
git clone https://github.com/ApaeP/system_monitor.git
- Run the installation script:
Or manually copy the files:
./copy_to_plugins.sh
- Copy
system_monitor.1s.rb
to your xbar plugins folder - Copy the
system_monitor
directory to your xbar plugins folder
- Copy
- Make the plugin executable:
chmod +x "~/Library/Application Support/xbar/plugins/system_monitor.1s.rb"
- Refresh xbar
The plugin updates every second by default. Modify the refresh rate by renaming the main file:
system_monitor.1s.rb
- updates every secondsystem_monitor.5s.rb
- updates every 5 secondssystem_monitor.1m.rb
- updates every minute
To enable network monitoring without password prompts, add this line to your sudoers file using sudo visudo
:
your_username ALL=(root) NOPASSWD: /usr/bin/powermetrics
The plugin is built with a modular architecture:
- Metrics modules for each monitored resource
- View components for display formatting
- Configuration management
- Error handling and graceful degradation
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow Ruby style guidelines
- Update documentation as needed
- Ensure backward compatibility
MIT License - See LICENSE file for details
- xbar community for the plugin platform
- Contributors and bug reporters