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.
Clone this repo to your Übersicht widgets directory.
$ git clone https://github.com/ryanyz10/ayu-nibar $HOME/Library/Application\ Support/Übersicht/widgets/ayu-nibar
- SF Symbols (optional) — used for symbols in the statusbar 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\"'"
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).