Skip to content

TibetOS/SysBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SysBar

A lightweight macOS menu bar app that displays real-time system resource usage.

macOS 15+ Swift 6 License: MIT

Features

  • CPU — Total and per-core usage with spark-line history in the menu bar
  • RAM — Used / total memory in GB
  • GPU — Apple Silicon GPU utilization percentage
  • Disk — Boot volume used / total space
  • Network — Real-time upload and download speeds
  • Battery — Level, charging status, and power source

Menu Bar

The menu bar icon shows a live CPU spark-line chart. Click to open the full metrics panel.

Requirements

  • macOS 15+ (Sequoia)
  • Apple Silicon Mac
  • Xcode 16+ or Swift 6 toolchain

Build & Run

# Build
swift build

# Run
swift run SysBar

# Or open in Xcode
open Package.swift

Architecture

  • Pure SwiftUIMenuBarExtra with .window style, no AppKit bridges
  • Zero dependencies — Uses system APIs only (Mach, IOKit, POSIX)
  • Swift actors — Thread-safe data collection without manual locks
  • Direct syscallshost_processor_info, host_statistics64, statvfs, getifaddrs, IOKit registry

Project Structure

Sources/
├── SysBarApp.swift          # Entry point, MenuBarExtra setup
├── Models/
│   ├── SystemMetrics.swift  # Data structs (CPU, RAM, GPU, Disk, Network, Battery)
│   └── AppState.swift       # Observable state with 2-second refresh loop
├── Services/
│   └── SystemMonitor.swift  # Actor collecting all metrics via syscalls
├── Views/
│   ├── SysBarPanel.swift    # Main dropdown panel
│   ├── MetricRow.swift      # Reusable metric + progress bar component
│   └── SparkLine.swift      # Canvas-based CPU spark-line
└── Utilities/
    └── Formatters.swift     # Byte, speed, and percentage formatting

License

MIT

About

Lightweight macOS menu bar app for real-time system resource monitoring

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors