theshortcut / nibar

Simple Übersicht status bar with yabai support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nibar

Simple Übersicht widget status bar with yabai support.

Originally forked from https://github.com/ajdnik/powerbar. I made it work with yabai and tweaked the aesthetics to match my preference.

Screenshot

img

Installation

Clone this repo to your Übersicht widgets directory.

$ git clone https://github.com/kkga/nibar $HOME/Library/Application\ Support/Übersicht/widgets/nibar

Dependencies

  • SF Symbols (optional) — used for symbols in the statusbar widget

Usage

Yabai workspaces widgets

There are 2 widgets for displaying workspaces: spaces-primary and spaces-secondary. The spaces-secondary is used when working with dual displays. If you're using a single display, disable it in the Übersicht's menu.

Refreshing yabai workspaces widget

The widgets for displaying yabai workspaces aren't refreshing automatically (to preserve battery). To refresh them, you can add these lines utilizing yabai's signals at the end of .yabairc:

When using a single display

yabai -m signal --add event=space_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"

When using dual displays

yabai -m signal --add event=space_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"
yabai -m signal --add event=display_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-primary-jsx\"'"

yabai -m signal --add event=space_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'"
yabai -m signal --add event=display_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-secondary-jsx\"'"

For window display

yabai -m signal --add event=window_focused \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-windows-jsx\"'"
yabai -m signal --add event=window_destroyed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-windows-jsx\"'"
yabai -m signal --add event=window_created \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-windows-jsx\"'"
yabai -m signal --add event=space_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-windows-jsx\"'"

About

Simple Übersicht status bar with yabai support.

License:MIT License


Languages

Language:JavaScript 82.8%Language:Shell 17.2%