Conky $if_match not working

Everything about X, Gnome, KDE, ... and everything running on it

Conky $if_match not working

Postby DebbyIan » 2019-02-06 18:40

I'm running Debian Stretch 9.7 and I'm trying the following in a Conky script of mine:

Code: Select all
${if_match "$battery_short"<"D"}${if_match "$battery_percent"=="1"}${exec notify-send "conky-notification"}$endif$endif


It has no effect. It's still running the exec command at every update cycle. Any ideas? Been bogged down with this issue for a few hours thought I'd give the forum a go.
DebbyIan
 
Posts: 132
Joined: 2013-05-09 12:12

Re: Conky $if_match not working

Postby Dai_trying » 2019-02-06 19:05

Sends constant notifications on my fresh Stretch install, Is this what you mean? or is there another problem?
Dai_trying
 
Posts: 715
Joined: 2016-01-07 12:25

Re: Conky $if_match not working

Postby DebbyIan » 2019-02-06 19:11

The script should obey the if_match condition. It doesn't. It keeps executing the exec command.
DebbyIan
 
Posts: 132
Joined: 2013-05-09 12:12

Re: Conky $if_match not working

Postby Dai_trying » 2019-02-06 19:20

That's what I am getting, very weird...
Dai_trying
 
Posts: 715
Joined: 2016-01-07 12:25

Re: Conky $if_match not working

Postby Bulkley » 2019-02-06 21:18

Is that an out dated script? I ask because there have been many changes over several years and I have run into Conky scripts that need to be adjusted.
Bulkley
 
Posts: 5827
Joined: 2006-02-11 18:35

Re: Conky $if_match not working

Postby DebbyIan » 2019-02-06 21:22

Those statements are barely what you can call a script.
The syntax is correct, the syntax is current (look them up in the Conky man).
The logic is sound.
The conditionals don't work.
DebbyIan
 
Posts: 132
Joined: 2013-05-09 12:12

Re: Conky $if_match not working

Postby Dai_trying » 2019-02-06 23:28

There would appear to be a problem using exec inside this condition and I have found a few queries regarding it through google searches but no reason or solution found.
The condition works correctly for text or other output but when using the exec command (regardless of what is executed) it runs constantly even though the condition is not met.
Dai_trying
 
Posts: 715
Joined: 2016-01-07 12:25


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable