-
Notifications
You must be signed in to change notification settings - Fork 256
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
Add a general and per-module default color configuration #284
base: main
Are you sure you want to change the base?
Conversation
4f68d82
to
8565ae4
Compare
8565ae4
to
d9cd686
Compare
d9cd686
to
3ab019f
Compare
3ab019f
to
3659eef
Compare
3659eef
to
75fc735
Compare
75fc735
to
086554d
Compare
086554d
to
acd4d88
Compare
acd4d88
to
96a96f8
Compare
For what it's worth, I still use it, and, anyway, I don't mind maintaining it just for me... I thought my last description/commit message was not great, so I reworded it to something better (I hope): The significant code change was to replace the A few improvements have been made from there:
|
96a96f8
to
0ec81f0
Compare
0ec81f0
to
6160e52
Compare
Replace the macros `START_COLOR` and `END_COLOR` by an enum and a variable `outcolor` (similar to `outwalk`, see `OUTPUT_FULL_TEXT`). This allowed for the addition of a couple user-side features: Add a new `color_default` config to the general and to all modules. So the default color can now be customized per-module. An unspecified or empty value means no color (same as old behavior). Any `color_*` config (in general or modules) can now be set to an empty string to disable it (no color emitted).
6160e52
to
7340a53
Compare
I changed the title and description again. FWIW I still thinks this is a good change, for users, and for the code. I am open to suggestions. If you think this is outside the scope of i3status, I'm ok with closing this PR. |
Add a new
color_default
configuration to emit a per-module default color.If left unspecified, you get the old behavior: the non-good/degraded/bad state does not emit any color, and so you get your bar program's default color.
If
color_default
is specified, ingeneral
for all modules, or per-module in their respective sections, then the module will emit this color when in non-good/degraded/bad state.Any color (
color_default
,color_good
etc.) can be set to an empty string to disable the color, reverting to the bar program default color.Notes on the source code changes:
START_COLOR
/END_COLOR
with a variableoutcolor
(similar tooutwalk
), typed with a enumoutput_color_t
. I think it's easier to play with the color now, and it makes it clearer it's for the entire module (as opposed to starting a color mid-sentence).