Skip to content
forked from kkga/nibar

Simple Übersicht status bar with yabai support.

License

Notifications You must be signed in to change notification settings

ryanyz10/ayu-nibar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

About

Simple Übersicht status bar with yabai support.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.3%
  • Python 20.5%
  • Shell 12.2%