Skip to content

Latest commit

 

History

History
69 lines (46 loc) · 2.69 KB

README.md

File metadata and controls

69 lines (46 loc) · 2.69 KB

ayu-nibar

Simple Übersicht widget status bar with yabai support.

Forked from nibar, which provided a great base to work with. I'm mostly changing it to fit my aesthetic and adding some additional functionality I find useful.

img

Installation

Clone this repo to your Übersicht widgets directory.

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

Dependencies

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

Usage

Refreshing yabai workspaces widget

The workspaces widget is not refreshing automatically (to preserve battery). Add these lines at the end of your yabairc to utilize yabai's signals for auto-updating the widget whenever a workspace is changed:

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

# if using multple displays, add an additional rule for "display_changed" event
yabai -m signal --add event=display_changed \
    action="osascript -e 'tell application \"Übersicht\" to refresh widget id \"nibar-spaces-jsx\"'"
# add these rules to auto-update the "windows" widget
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\"'"

Weather

I wrote a quick python script to fetch the current location and weather using ipapi and openweathermap. You will need to sign up for API keys on the website. The script depends on the requests package which you can install as follows:

pip3 install requests 

The keys are specified in a .config file in the root of the project. It should be structured as below:

[geolocation]
key=<ipapi key here>

[weather]
key=<openweathermap key here>
unit=f

Unit is the temperature unit, which can either be fahrenheit or celsius (but defaults to kelvin if neither are selected).