Jean-Tinland / simple-bar

A yabai status bar widget for Übersicht
https://www.jeantinland.com/toolbox/simple-bar
MIT License
1.21k stars 129 forks source link

Feature: show the current (non-default) skhd mode in process widget #354

Closed Amar1729 closed 1 year ago

Amar1729 commented 1 year ago

Addressing https://github.com/Jean-Tinland/simple-bar/issues/205#issuecomment-1074408036, I've introduced another update to the process widget: this adds skhd mode next to the space layout IFF it's something other than the string "default".

This one requires some configuration to set up (I've added notes in the readme):

  1. define on_enter commands in .skhdrc to call a new simple-bar bash script. This script will simply cache the given mode name, and optionally a color (default white).
  2. enable System Preferences > Privacy & Security > Automation > skhd > ubersicht, to allow skhd to issue AppleScript commands to Ubersicht.

I've added a setting for this to the process widget settings.

The logic that determines whether to display the span for the mode name will NOT print anything if the mode name is "default". I've assumed this default since that's used in the example skhdrc provided by the author. Should this be a config setting? Show mode name regardless of name?

Do let me know if you have changes you think would be helpful for the readme/configuration/the way the script is set up.


some screenshots:

during default mode (i.e. normal operation)

Screenshot 2023-08-24 at 2 40 54 AM

(display current layout: false)

Screenshot 2023-08-24 at 2 41 43 AM

(display current layout: true)

Screenshot 2023-08-24 at 2 41 08 AM
Jean-Tinland commented 1 year ago

This is great, I'll merge it soon! Thank you very much for your work :)

Amar1729 commented 1 year ago

no problem 🙏🏾