GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - hexedbits/StatusItemController: A "view controller" for menu bar Mac apps

BranchesTags
Open more actions menu

Latest commit

 

History

139 Commits
139 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Example
Example
 
 
Sources
Sources
 
 
StatusItemController.xcodeproj
StatusItemController.xcodeproj
 
 
Tests
Tests
 
 
docs
docs
 
 
scripts
scripts
 
 
.gitignore
.gitignore
 
 
.spi.yml
.spi.yml
 
 
.swiftlint.yml
.swiftlint.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 
StatusItemController.podspec
StatusItemController.podspec
 
 

Repository files navigation

StatusItemController CI

A "view controller" for menu bar Mac apps


About

This library provides a StatusItemController component that you can use to create menu bar apps, or apps with menu bar items in macOS.

This component is used in Red Eye and Lucifer.

Usage

  1. Subclass StatusItemController
  2. Implement the following methods:
    1. buildMenu() -> NSMenu
    2. leftClickAction()
    3. rightClickAction()
  3. Create an instance of your StatusItemController subclass in your NSApplicationDelegate.

Requirements

  • macOS 11.0+
  • Swift 5.9+
  • Xcode 15.0+
  • SwiftLint

Installation

CocoaPods

pod 'StatusItemController', '~> 2.0.0'

Swift Package Manager

Add StatusItemController to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/hexedbits/StatusItemController", from: "2.0.0")
]

Alternatively, you can add the package directly via Xcode.

Documentation

You can read the documentation here. Generated with jazzy. Hosted by GitHub Pages.

Notes on Testing

Unfortunately, StatusItemController cannot be tested directly. Attempting to create an NSStatusItem outside of an app context throws an assert, which makes sense. Thus, in order to test StatusItemController it must be embedded in an app. Tests can be found in the Example App test suite. See #15 for more details.

Contributing

Interested in making contributions to this project? Please review the guides below.

  • Contributing Guidelines
  • Code of Conduct
  • Support and Help
  • Security Policy

Also consider sponsoring this project or buying my apps! ✌️

Credits

Created and maintained by Jesse Squires.

License

Released under the MIT License. See LICENSE for details.

Copyright © 2020-present Jesse Squires.

About

A "view controller" for menu bar Mac apps

hexedbits.github.io/StatusItemController/

Topics

mac-appmacosmenubarmenubar-app

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

69 stars

Watchers

3 watching

Forks

4 forks
Report repository

Releases

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.