MacOS Menubar Applet for showing spaces and switching spaces easily

Overview

Yabai Spaces Indicator

screenshot

screenshot2

Menubar Applet showing all spaces with clickable buttons for switching spaces.

Requirements

Yabai is required to be running for the space switching and keeping spaces information in sync. The latter will also require adding the following signals to your .yabairc:

yabai -m signal --add event=mission_control_exit action='echo "refresh" | nc -U /tmp/yabai-indicator.socket' label=yindmc
yabai -m signal --add event=display_added action='echo "refresh" | nc -U /tmp/yabai-indicator.socket' label=yindda
yabai -m signal --add event=display_removed action='echo "refresh" | nc -U /tmp/yabai-indicator.socket' label=yinddr

Currently yabai is expected to reside in /usr/local/bin/yabai. Configurability might come at a later point.

How it works

Information on spaces and displays is directly taken from SkyLight API and space and display switches are handled through the NotificationCenter. Unfortunately that is not enough to ensure that the information on the space indicator is correct, as MissionControl can be used to Add/Delete/Reorder spaces. Fortunately MissionControl invocation can be caught via the Accessibility API, as is done by Yabai.

IPC with easy shell scripting is realized through a UNIX Domain Socket Server, that listens at /tmp/yabai-indicator.socket. Currently only a refresh message is implemented, which is used to allow yabai signals to modify our UI.

The Menubar Indicator uses SwiftUI and is integrated into the StatusBarItem as a Subview of the default button. While replacing the StatusBarItem view is being deprecated, this approach should be future-proof for now.

Comparison to similar applications

SpaceId has some additonal configurability for presentation and also allows showing all active spaces on all displays. Switching between spaces is not implemented. As of 12/2021 it does not utilize Acessibility API for catching MissionControl invocation. It does not have a dependency on Yabai.

WhichSpace shows the current active Space in a single indicator. Does not allow for showing all spaces or all visible spaces on multiple displays.

Comments
  • Where's the documentation?

    Where's the documentation?

    Hi, I've looked everywhere in this project and I can't find the documentation. All I want to do is to change to compact mode, but I have no clue on how to do it.

    opened by ggrangel 1
  • Changes to messaging API in 4.0.2

    Changes to messaging API in 4.0.2

    Yabai has slightly changed the messaging Interface since 4.0.2.

    Reference:

    https://github.com/koekeishiya/yabai/issues/1372 https://github.com/koekeishiya/yabai/issues/1377

    • [ ] Implement new interface
    • [ ] update minimal requirements
    bug 
    opened by xiamaz 0
  • ability to show only spaces with windows on them

    ability to show only spaces with windows on them

    It would be convenient to show only spaces that have windows assigned to them, instead of showing all spaces, even when they are completely empty. For example, something like:

    [2][4][5]

    instead of [1][2][3][4][5]

    (assuming spaces 1 and 3 do not have any windows on them)

    enhancement 
    opened by edgimar 0
  • Any plans on adding a skdh indicator?

    Any plans on adding a skdh indicator?

    This project is amazing, thanks for sharing.

    I'm wondering if you have plans (or a solution) on adding skdh into the menubar. It would be very helpful for knowing in what mode are you currently and would play nice with the indicator.

    Thanks!

    enhancement 
    opened by AlgusDark 1
  • Is it possible to arrange the icons according to the monitor layout?

    Is it possible to arrange the icons according to the monitor layout?

    Hi, thank you for the really useful tool. Just curious, would it be possible to arrange the icons according to the monitor layout? I keep my secondary display to the left but the icons for its spaces show up on the right.

    enhancement 
    opened by restfuladi 0
  • Brew package

    Brew package

    Firstly, thanks for this amazing app. Does exactly what I need and no more.

    By any chance, have do done a brew package for this? I find anything with a quick search.

    enhancement 
    opened by jackielii 1
Releases(0.3.2)
Owner
Max Zhao
Max Zhao
An example project showing how to use `overrideUserInterfaceStyle` to build an in-app light/dark mode switch

OverrideDarkMode A sample project to show how using overrideUserInterfaceStyle enables having a dark / light mode switch directly in the app, while st

Zouhair Mahieddine 1 Jan 19, 2022
πŸ‡°πŸ‡· An app that helps non Korean speakers to learn Hangul easily and effectively.

?? HangulKing HangulKing is the fastest way to the throne of Hangul, the Korean alphabets! HangulKing helps the users learn Hangul easily, providing m

κ°œλ°œμžμ•„μΉ΄λ°λ―Έ_ν¬μŠ€ν… 7 Nov 26, 2022
Concise Auto Layout API to chain programmatic constraints while easily updating existing constraints.

Concise API for Auto Layout. SnapLayout extends UIView and NSView to deliver a list of APIs to improve readability while also shortening constraint co

Satinder Singh 11 Dec 17, 2021
LayoutKit is a fast view layout library for iOS, macOS, and tvOS.

?? UNMAINTAINED ?? This project is no longer used by LinkedIn and is currently unmaintained. LayoutKit is a fast view layout library for iOS, macOS, a

LinkedIn's Attic 3.2k Dec 27, 2022
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]

Extremely Fast views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainabl

layoutBox 2.1k Dec 22, 2022
LayoutKit is a fast view layout library for iOS, macOS, and tvOS.

?? UNMAINTAINED ?? This project is no longer used by LinkedIn and is currently unmaintained. LayoutKit is a fast view layout library for iOS, macOS, a

LinkedIn's Attic 3.2k Jan 4, 2023
CodeEdit App for macOS – Elevate your code editing experience. Open source, free forever.

CodeEdit for macOS CodeEdit is a code editor built by the community, for the community, written entirely and unapologetically for macOS. Features incl

CodeEdit 15.8k Dec 31, 2022
Real-time communication application form Google Jacquard tag to macOS

Jacquard RTC Real-time communication application form Google Jacquard tag to macOS Abstract Want to use your Google Jacquard equipped product with you

Phumrapee Limpianchop 4 Nov 28, 2022
βœ‚ Easy to use and flexible library for manually laying out views and layers for iOS and tvOS. Supports AsyncDisplayKit.

ManualLayout Table of Contents Installation Usage API Cheat Sheet Installation Carthage Add the following line to your Cartfile. github "isair/ManualL

Baris Sencan 280 Sep 29, 2022
MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.

MisterFusion MisterFusion makes more easier to use AutoLayout in Swift & Objective-C code. Features Simple And Concise Syntax Use in Swift and Objecti

Taiki Suzuki 316 Nov 17, 2022
CompositionalLayoutDSL, library to simplify the creation of UICollectionViewCompositionalLayout. It wraps the UIKit API and makes the code shorter and easier to read.

CompositionalLayoutDSL CompositionalLayoutDSL is a Swift library. It makes easier to create compositional layout for collection view. Requirements Doc

FABERNOVEL 44 Dec 27, 2022
Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout

Masonry Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're

null 18k Jan 5, 2023
Breezz: an application with which it is easy and simple to practice breathing exercises and meditation

breezz will help you relax Breezz is an application with which it is easy and si

dumojo 1 Jan 18, 2022
Allows users to pull in new song releases from their favorite artists and provides users with important metrics like their top tracks, top artists, and recently played tracks, queryable by time range.

Spotify Radar Spotify Radar is an iOS application that allows users to pull in new song releases from their favorite artists and provides users with i

Kevin Li 630 Dec 13, 2022
Swift-picker-views - inline single and multi picker views for UIKit. Without tableview! Easy and simple

swift-picker-views Inline single and multiple picker views for UIKit. No tablevi

IBRAHIM YILMAZ 2 Jan 31, 2022
Reusable GridView with excellent performance and customization that can be time table, spreadsheet, paging and more.

GridView GridView can tile the view while reusing it. It has an API like UIKit that works fast. Even when device rotates it smoothly relayout. Appetiz

Kyohei Ito 830 Dec 23, 2022
Add validations to your text fields, Group them together and navigate through them via keyboard's return button and accessory view.

TFManager Let's say you have multiple UITextFields to get data from users. You need to handle each field keyboard's return key and add an accessory vi

Hosein Abbaspour 16 Sep 29, 2022
An IOS/IPad OS application that demonstrates various capabilities and functions of ARKit and RealityKit.

Augmented Reality Development Demos based on ARKit and RealityKit Summary This repository contains an IOS application that shows the capability of App

yukun 2 Oct 30, 2022
BrickKit is a delightful layout library for iOS and tvOS. It is written entirely in Swift!

BrickKit is a delightful layout library for iOS and tvOS. It is written entirely in Swift! Deprecated BrickKit is being phased out at Wayfair, and the

Wayfair Tech – Archive 608 Sep 15, 2022