You are not logged in.

#1 2009-12-31 18:28:11

munkyeetr
Member
From: Merritt, BC
Registered: 2008-08-07
Posts: 83

Conky: Can't get ${if_running} variable to work

I have been fiddling with this for too long now, so need some help. I am running Xfce4 and conky-1.7.2_rc3, which has been compiled using the --enable-audacious=yes flag

I have no problem displaying any of the Audacious variables like this (color variables removed to make it easier to read):

TEXT
AUDACIOUS
${audacious_title} || ${audacious_position} ${audacious_bar 5,70} ${audacious_length} || Vol: ${audacious_main_volume}%

But when I try to add the ${if_running audacious} variable - to display it conditionally - it fails (and always displays the "Audacious is not running" ${else} clause):

TEXT
AUDACIOUS
${if_running audacious}${audacious_title} || ${audacious_position} ${audacious_bar 5,70} ${audacious_length} || Vol: ${audacious_main_volume}%${else}Audacious is not running$endif

So, I am curious if there are other compilation flags I need to specify to get this to work? The conky documentation says conky uses the 'pidof' command with this variable, and I have verified that it is installed and all users have rwx permissions.

$ ls -la /bin/pidof
lrwxrwxrwx 1 root root 16 2009-04-30 00:03 /bin/pidof -> ../sbin/killall5

Any advice or nudges in the right direction are appreciate.
Munky


If the advice you're given in this forum solves your issue, please mark the post as [SOLVED] in consideration to others.

"More than any time in history mankind faces a crossroads. One path leads to despair and utter hopelessness, the other to total extinction.
Let us pray that we have the wisdom to choose correctly." -- Woody Allen

Offline

#2 2010-01-01 22:35:29

munkyeetr
Member
From: Merritt, BC
Registered: 2008-08-07
Posts: 83

Re: Conky: Can't get ${if_running} variable to work

*bump*

anyone have any ideas?


If the advice you're given in this forum solves your issue, please mark the post as [SOLVED] in consideration to others.

"More than any time in history mankind faces a crossroads. One path leads to despair and utter hopelessness, the other to total extinction.
Let us pray that we have the wisdom to choose correctly." -- Woody Allen

Offline

#3 2010-02-05 19:35:16

ferda
Member
Registered: 2010-02-05
Posts: 67

Re: Conky: Can't get ${if_running} variable to work

i had the same problem

it is a bug, if_running does not work, if you don't have any top / top_mem / top_io running.

i found it here: http://bugs.gentoo.org/show_bug.cgi?id=296380

there is a patch i haven't tried yet.

my solution to this problem isn't really clean, I added

${goto 1280}${top name 1}

(my screen resolution is 1280x800)
at the end of my conkyrc

Last edited by ferda (2010-02-05 22:44:21)

Offline

#4 2015-09-11 08:55:26

kalsan
Member
Registered: 2011-10-10
Posts: 119

Re: Conky: Can't get ${if_running} variable to work

This is five years old now and still shows up top in Google. if_running wasn't working for me either so this is my workaround:

${if_match "${exec pidof /usr/sbin/vpnc}" != ""}VPNC${else}no vpnc${endif}

This should be working for any kind of process. Hope this helps anybody who comes across it.

Offline

#5 2015-09-11 10:28:56

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,896
Website

Re: Conky: Can't get ${if_running} variable to work

kalsan wrote:

This is five years old now and still shows up top in Google.

Google isn't an excuse to disregard the etiquette. You have been here long enough to know better.

https://wiki.archlinux.org/index.php/Fo … bumping.22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB