HybridBar
HybridBar copied to clipboard
[Feature] Implement Scripting
Warning This is a complex feature and is not guaranteed to be implemented.
Compile from the dedicated branch at your own risk, it may break at any time.
Using Rune, add scripting support for labels as a start, then assuming everything works well, implement it to a larger degree.
Paused for now due to several reasons:
- Adding scripting would require yet another key for widgets, making it all a huge mess
- This can be solved by removing support for the
command
key, letting the user callexecute
themselves.
- This can be solved by removing support for the
- It would break all current configs if a proper, clean solution was introduced. If just a new key named
script
was added, then it would bring in more complexity to the codebase.
Benefits of having scripting though:
- More control of Hybrid
- You're free to implement more advanced functions, rather than hacking around with it
- Widgets can be dynamically added/removed
- Custom widget types to an extent
- Custom user-defined functions and variables
- Access to more optimized functions, rather than having to use shell-commands for everything, which adds a lot of overhead when called frequently
Downsides of implementing scripting:
- If done properly, all configs that use the
command
key will break, although it takes little to no effort from the user to fix it - More documentation has to be added to reflect on how to use/transition to using scripts
- More prone to user errors
- Less beginner-friendly (hence new examples will be made to help out beginners)