GithubHelp home page GithubHelp logo

diatoming / mxstatusmenu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from st400/mxstatusmenu

0.0 2.0 0.0 151 KB

MXStatusMenu shows the cpu and network load in the menubar of OS X similar to iStatMenus. Written in Swift.

License: MIT License

Swift 100.00%

mxstatusmenu's Introduction

MXStatusMenu shows the cpu and network load in the menubar of OS X similar to iStatMenus. Written in Swift.

Screenshot of MXStatusMenu

Details

  • Implements the menubar item using NSStatusBar and a NSView with a dynamic width
  • Reads the cpu load using host_processor_info / PROCESSOR_CPU_LOAD_INFO
  • Reads the network load using sysctl / NET_RT_IFLIST2
  • Shows how to alloc and dealloc Swift pointers of type UnsafePointer and UnsafeMutablePointer
  • Includes a timer implementation using Grand Central Dispatch / DISPATCH_SOURCE_TYPE_TIMER
  • Does not require third-party code to compile. The only dependencies are import Cocoa and import Darwin.

Parameters

Visual parameters, update intervals, and the maximum network load can be set in the file App.swift

Compatibility

Tested on OS X 10.10.3 (14D131). Compiles without errors or warnings using Xcode 6.3 (6D570).

Disclaimer

This is a simple app to test the capabilities of Swift and not intended to be used in production environments. If you are looking for a real app that monitors your Mac, i highly recommend iStatMenus.

Please notice that i'm not affiliated in any way with Bjango, the developer of iStatMenus.

Author

Maximilian Götzfried (@mgoetzfried, maximiliangoetzfried.com)

License

MXStatusMenu is available under the MIT license. See the LICENSE file for more information.

mxstatusmenu's People

Watchers

James Cloos avatar diatoming avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.