Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Conky $if_match not working

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Conky $if_match not working

#1 Post by DebbyIan »

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.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 6 times
Been thanked: 16 times

Re: Conky $if_match not working

#2 Post by Dai_trying »

Sends constant notifications on my fresh Stretch install, Is this what you mean? or is there another problem?

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: Conky $if_match not working

#3 Post by DebbyIan »

The script should obey the if_match condition. It doesn't. It keeps executing the exec command.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 6 times
Been thanked: 16 times

Re: Conky $if_match not working

#4 Post by Dai_trying »

That's what I am getting, very weird...

Bulkley
Posts: 6387
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Conky $if_match not working

#5 Post by Bulkley »

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.

DebbyIan
Posts: 158
Joined: 2013-05-09 12:12

Re: Conky $if_match not working

#6 Post by DebbyIan »

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.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 6 times
Been thanked: 16 times

Re: Conky $if_match not working

#7 Post by Dai_trying »

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.

Post Reply