Closed FelixKratz closed 2 years ago
I have implemented this feature but ended up not liking it, it is probably best to do this via an external helper program instead: https://github.com/FelixKratz/SketchyBarHelper
I have added the example for a direct C implementation of a cpu utilization graph and the current time here: https://github.com/FelixKratz/SketchyBarHelper
I was thinking about a system where sketchybar would recognize a set of predetermined variables and substitute them accordingly.
E.g. I could imagine having commonly used system information accessible via these in an "f-string"-like pattern:
This would be expanded dynamically by sketchybar itself and sketchybar would listen for changes in any of those dynamic variables and update the item accordingly.
Many "standard" items could make use of this, e.g. the time could be displayed via something like this:
without the need of an additional script.
Or a CPU indicator would look like this:
Of course, this will not change anything about the current possibilities and is only an additional option to easily and, especially, as low overhead as possible get some "standard" items running without shelling out to external scripts.
Please tell me your thoughts. If you have additional ideas for the specific syntax please comment them below. I am not sure currently if this might be fracturing the configuration a bit too much or if this is an elegant way to save some CPU cycles...