-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update all blocklets to be configured via injected config properties (next branch) #132
Comments
Helpful notes for converting: For shell scripts that simply set default values at the beginning of the script, converting most options is as simple as changing, e.g.,
to
|
Note: for bash scripts, adding a format string can be done using the
and the script will reference:
The |
In the upcoming release of i3blocks, arbitrary properties will be able to be injected into a blocklet's environment. The readability of the i3blocks configuration file will be substantially improved by making all block configuration done through these injected environmental variables.
By way of example, the volume-pulseaudio blocklet previously had an example config:
This should be replaced by something like
More generally, the README should include something like:
For each blocklet, we must:
Note that while we are at it, now is a great time to implement format string options
FORMAT_LONG
andFORMAT_SHORT
as above, or allowing different formats likeFORMAT_UP
andFORMAT_DOWN
.This can cut down on a lot of format specific configuration options. For instance, in the volume-pulseaudio block above, we could have
FORMAT_HIGH, FORMAT_MED, FORMAT_LOW, FORMAT_MUTED
and just let the user do exactly what they want.All work done towards this end should be on the next branch, not the master branch.
If you want to help, submit pull requests against the next branch.
Here is a list of the status of all files in the repo and their conversion status:
I will begin slowly working on this once the convention for how variables are injected is finalized. (Cf. vivien/i3blocks#279). Help is greatly welcomed.
The text was updated successfully, but these errors were encountered: