-
Notifications
You must be signed in to change notification settings - Fork 474
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
Toggle critical_bg not working #1923
Comments
|
What would I use then for when command_off succeeds like I'm trying to do
…On Sun, Jul 23, 2023, 4:40 PM Max Verevkin ***@***.***> wrote:
critical_bg is used when command_{on,off} fails.
—
Reply to this email directly, view it on GitHub
<#1923 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7DKZYPTCDFYITHPPVYVSTXRWD2HANCNFSM6AAAAAA2S5PO2I>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It is not currently possible, |
softmoth
added a commit
to softmoth/i3status-rust
that referenced
this issue
Dec 16, 2023
softmoth
added a commit
to softmoth/i3status-rust
that referenced
this issue
Dec 16, 2023
softmoth
added a commit
to softmoth/i3status-rust
that referenced
this issue
Dec 17, 2023
softmoth
added a commit
to softmoth/i3status-rust
that referenced
this issue
Dec 17, 2023
MaxVerevkin
pushed a commit
that referenced
this issue
Dec 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From my understanding based on here: https://github.com/greshake/i3status-rust/blob/v0.31.8/src/blocks/toggle.rs#L129
If the status is "on" then
idle_bg
is used, and if the status is "off" thencritical_bg
is used.The determintor from
command_state
is whether the resulting command has text or if it's an empty string (https://github.com/greshake/i3status-rust/blob/v0.31.8/src/blocks/toggle.rs#L20).However, the tokio docs, if I'm reading it correctly, says that it's based on the exit code.
I'm not familiar w/ tokio and only a beginner at Rust, so maybe I'm missing something here, but the
critical_bg
override is never applied whencommand_state
returns an empty string or has exit code of 1.Here's my current block:
What I've also done is move the state command to a shell script and either do
exit 0
if the awk value == wg0 orexit 1
if it's not.So what I would expect to see is when the toggle is in this state, the bg is a red color. But instead it stays in idle bg regardless.
The toggle works, so the commands are fine and I can see it reflect in the NetworkManager applet and in the output of nmcli. So it's more so something is not working when trying to set the color.
The text was updated successfully, but these errors were encountered: