Restart Conky when resuming from Suspend

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
newlyminted7
Level 5
Level 5
Posts: 558
Joined: Sat Jan 02, 2021 4:44 pm

Restart Conky when resuming from Suspend

Post by newlyminted7 »

My Conky uses more CPU over time, and gets up to almost 10% CPU after a few days, according to htop.

I'm trying to make it restart via a script using killall conky and conky -d whenever I resume from Suspend, but I can't get it to work.

My script:

Code: Select all

#!/bin/bash

export DISPLAY=:0
killall conky
sleep 1
/usr/bin/conky -d
The script executes okay after the computer resumes from Suspend (via systemd), but it won't launch Conky. The script works fine when run on the command line, and succeeds it starting Conky up, but when it is executed from systemd (I used this info: https://askubuntu.com/questions/250690/ ... untu-12-04) it won't launch Conky. The killall conky command in the script always succeeds, though.

In summary, when resuming from Suspend this script kills Conky just fine, but it doesn't launch Conky. Nothing happens.

Any ideas? Or is there a better / easier way to do this?

EDIT: I also created this as a service, and as a cron job, but both had the same problem (would kill Conky but not be able to start it).
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Restart Conky when resuming from Suspend

Post by Termy »

Oooh, nice one. I'm not sure why that's not working, off-hand, but I like your approach. The one I was talking about in my PM should work, but this one should be much easier!

I'd probably try:

Code: Select all

DISPLAY=:0 /usr/bin/conky -d
No need to export the variable if you're just needing to tell Conky what the 'DISPLAY' is. ;) I doubt it'll fix the issue, but it might.
I'm also Terminalforlife on GitHub.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Restart Conky when resuming from Suspend

Post by rene »

The issue is going to be that the systemd-sleep script runs as root, i.e., in the context of root. Having to manually set DISPLAY is an example of this: your user's DISPLAY is not a part of root's environment (and I expect the most immediate problem to be either being denied access to said non-owned display and/or conky not finding its configuration under the invoking user's home directory).

Last time I checked, systemd user-instances were completely and fully broken/unimplemented on Ubuntu/Mint (at least) and that's sort of to say that at the very least pedantically speaking there's no nice solution available out of the box. I.e., who's to a priori say from a systemd-sleep script that a given user is even logged in, i.e., has a display to connect to as it then seems conky needs to do? I also don't in fact know conky and a common secondary issue is needing to set a DBus-related variable but I'd actually be somewhat surprised if conky communicated over the user's DBus, so non-pedantically speaking things may work for you with instead

Code: Select all

sudo -u <your username> DISPLAY=:0 /usr/bin/conky -d
If still not, try

Code: Select all

sudo -u <your username> DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/<your uid>/bus" /usr/bin/conky -d
The "<your uid>" as printed by id -u for your user; will normally be 1000.

Of course, the much better solution is to fix whatever's making conky grow.
newlyminted7
Level 5
Level 5
Posts: 558
Joined: Sat Jan 02, 2021 4:44 pm

Re: Restart Conky when resuming from Suspend

Post by newlyminted7 »

Thank you both, that's very helpful info. Rene, I think you're right about trying to fix my Conky config, though. I'm going to make a better attempt at trying to figure out why the CPU usage goes up after a few days.

Here is my Conky config, for what it's worth. Any ideas why these commands might cause increased CPU usage over time? Unless that's just normal Conky behaviour...? What is also strange to me is that it is CPU usage that goes up, not Memory, like a memory leak... Why would CPU usage go up, do you think?

The config has three conditions:
- If on Battery power then display the Battery time and bar of power left.
- If a song is playing via Audacious, display the song name (refreshed every 3 sec)
- If Xampp is running (local web deveopment stack), then print a notice that it is running (refreshed every 5 min)

Code: Select all

conky.config = {
    alignment = 'top_left',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    use_xft = true,
    font = 'DejaVu Sans Mono:size=10',
    minimum_height = 5,
	minimum_width = 5,
	maximum_width = 190,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_stderr = false,
    extra_newline = false,
	own_window = true,
	own_window_transparent = false,
	own_window_argb_visual = true,
	own_window_argb_value = 70,
	own_window_type = 'desktop',
    own_window_class = 'Conky',
    stippled_borders = 0,
    update_interval = 1,
    uppercase = false,
    use_spacer = 'none',
    show_graph_scale = false,
    show_graph_range = false,
	double_buffer = true,
	gap_x = 1250,
	gap_y = 405,
     --always display conky on my laptop screen when using an external monitor:
    xinerama_head = 0,
}



conky.text = [[
${voffset -3}${font :pixelsize=15}${time %l:%M%P}${font} ${voffset -1}${alignr}${font :size=8}${time %a, %b %d, %Y}${font}
${voffset -10}${alignr}${font :size=6}Uptime ${uptime}
${voffset -5}$stippled_hr
${color orange}${font :size=8}CPU:${color} ${cpu cpu0}% (${texeci 3 sensors | grep Core | awk '!/-/' | awk '{ print $3}' | sort -r | head -n 1 | tr -d "C" | tr -d "+"}) ${cpubar cpu0 show_graph_range}
${voffset 2}${cpugraph cpu0 10,189 84F66E FE1B1B -t}
${voffset 3}${color orange}${font :size=8}LOAD:${color} ${font :size=7}${loadavg} ${alignr}${loadgraph 10,70 b2f47c 3884AC -t -l}$font
${voffset -5}${color orange}${font :size=8}RAM:${color} ${font :size=7}$mem / $memmax ${membar}$font
${voffset -5}${color orange}${font :size=8}SWAP:${color} ${font :size=7}$swap / $swapmax ${swapbar}$font
${voffset -22}
${color orange}${font :size=8}DISK:${color} ${font :size=8}${fs_free} free ${fs_bar 6 /}
${font :size=6}Read: ${diskio_read} Write: ${color 24d4c2}${diskio_write}${color} ${alignr}${diskiograph 9,60 b2f47c 3884AC -t}
${voffset 5}${color orange}${font :size=8}NETWORKING:${color} ${voffset -2}$stippled_hr
${goto 5}${font PizzaDudeBullets:size=8}O${font}${voffset -3}${goto 20}${font :size=8}Up: ${upspeed wlp3s0} ${alignr}${upspeedgraph wlp3s0 10,60 FEC2A5 FA9C6F}
${goto 5}${font PizzaDudeBullets:size=8}U${font}${voffset -3}${goto 20}${font :size=8}Down: ${downspeed wlp3s0} ${alignr}${downspeedgraph wlp3s0 10,60 D9FFDF A5FEB3}
${voffset -30}
${if_match "${acpiacadapter}" != "on-line"}
$stippled_hr
${voffset -10}
${color orange}${font :size=8}BATTERY:${color} ${font :size=7}(${battery_time}) ${battery_bar}
${voffset -17}${endif}
${if_match "${audacious_status}" == "Playing"}\
${voffset 3}${color orange}${font :size=8}♫ ${voffset 2}NOW PLAYING:${color} ${voffset -2}$stippled_hr
${font DejaVu Sans Mono:size=7}${execi 3 ~/.conky/aud_song.sh}${font}\
${endif}${voffset 5}
${if_match "${execi 300 /opt/lampp/lampp status | grep '[A]pache is running'}" == "Apache is running."}\
${voffset -15}$stippled_hr
${voffset -5}${font :size=6}Xampp is running.${endif}
]]
And the Audacious "Now Playing" script that Conky calls every 3 seconds. I use Audacious a bit every day to listen to music, so maybe that has something to do with it?

Code: Select all

#!/bin/bash
# From: https://github.com/sstojkovic/discrete-audacious-conky
# To display Audacious' currently playing song and artist in Conky

playback_status=`audtool --playback-status`

song=`audtool --current-song-tuple-data title | fold -sw 65`

songfinal=${song//$' - '/$'\n'}

if [ "${playback_status}" == "playing" ];
then
    echo "${songfinal}"
fi
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Restart Conky when resuming from Suspend

Post by rene »

Am afraid I myself would have no clue whatsoever; have never used Conky (and hereby do solemnly swear to never use Conky) and am moreover at the moment not at a Linux system to quickly try things. There's a Conky-subforum here where someone might know...

Only thing I'm noticing is that you might as well move the song= and songfinal= into the then ... fi block in your Audacious script --- but that should be irrelevant unless audtool has some bug that causes it to hang around upon a "current-song-tuple-data" request if it's not in fact playing. I expect you'd have noticed a ton of audtool instances in e.g. htop so that's likely an irrelevant observation.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Restart Conky when resuming from Suspend

Post by Termy »

newlyminted7 wrote: Sat Jun 26, 2021 3:44 pm Why would CPU usage go up, do you think?
You'd see that sort of undesired behavior if you're repeatedly spawning something which takes up little RAM but uses the CPU a notable amount, like when executing the infamous fork bomb (IE: Func(){ Func &; }; Func).

This one-liner is incredibly inefficient, BTW:

Code: Select all

texeci 3 sensors | grep Core | awk '!/-/' | awk '{ print $3}' | sort -r | head -n 1 | tr -d "C" | tr -d "+"
If you post the output (between 'code' tags) of texeci 3 sensors exactly as it's shown in the terminal, I should be able to write a much more efficient alternative. I'll likely just use AWK and have it do what all 7 program calls are doing. AWK can head, sort, uniq, wc, sed (substitution, specifically), and so much more, because it's a programming language.

Ideally, I'd shove everything in a PERL script and have Conky use that, but I'd not want Conky to constantly load the interpreter over and over again, as that would be quite slow, comparatively.

BTW, is there are any chance you're executing Conky over and over again? Check with ps(1) or a tool of your choice. It's very easy to do so by accident and wonder why things are slowing down and acting strangely.

UPDATE:

Off-hand, I'd probably do something along these lines:

Code: Select all

awk '
	/Core/ && ! /-/ {
		Lines[$3]++
	}
	
	END {
		asorti(Lines, Sorted)
		Max=split(Sorted)
		Desired=Sorted[Max]
		
		gsub(/[C+]/, "", Desired)
		print(Desired)
	}
' <<< "$(texeci 3 sensors)"
But I can't test it without the original data.

Without any fancy parsing, you could improve it a bit by doing this:

Code: Select all

texeci 3 sensors | awk '/Core/ && !/-/ {print($3)}' | sort -r | head -n 1 | tr -d 'C+'
I'm also Terminalforlife on GitHub.
newlyminted7
Level 5
Level 5
Posts: 558
Joined: Sat Jan 02, 2021 4:44 pm

Re: Restart Conky when resuming from Suspend

Post by newlyminted7 »

rene wrote: Sat Jun 26, 2021 5:22 pm Only thing I'm noticing is that you might as well move the song= and songfinal= into the then ... fi block in your Audacious script --- but that should be irrelevant unless audtool has some bug that causes it to hang around upon a "current-song-tuple-data" request if it's not in fact playing. I expect you'd have noticed a ton of audtool instances in e.g. htop so that's likely an irrelevant observation.
No, you're right, it should be within the then ... fi block because there's no point in trying to get the song title if no song is playing.
Termy wrote: Sat Jun 26, 2021 6:30 pm If you post the output (between 'code' tags) of texeci 3 sensors exactly as it's shown in the terminal, I should be able to write a much more efficient alternative.
You're also right, it is an inefficient command. It was born of frustration and internet research, often the genesis of mistakes and regret, haha. I just wanted to get something working at the time and never revisited it.
The output is just the CPU temperature (48.0°, for example).

Also, I appear to only have one instance of Conky running, according to ps -aux | grep conky.
User avatar
all41
Level 19
Level 19
Posts: 9518
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Restart Conky when resuming from Suspend

Post by all41 »

newlyminted7 wrote: Sun Jun 27, 2021 2:29 am
rene wrote: Sat Jun 26, 2021 5:22 pm Only thing I'm noticing is that you might as well move the song= and songfinal= into the then ... fi block in your Audacious script --- but that should be irrelevant unless audtool has some bug that causes it to hang around upon a "current-song-tuple-data" request if it's not in fact playing. I expect you'd have noticed a ton of audtool instances in e.g. htop so that's likely an irrelevant observation.
No, you're right, it should be within the then ... fi block because there's no point in trying to get the song title if no song is playing.
Termy wrote: Sat Jun 26, 2021 6:30 pm If you post the output (between 'code' tags) of texeci 3 sensors exactly as it's shown in the terminal, I should be able to write a much more efficient alternative.
You're also right, it is an inefficient command. It was born of frustration and internet research, often the genesis of mistakes and regret, haha. I just wanted to get something working at the time and never revisited it.
The output is just the CPU temperature (48.0°, for example).

Also, I appear to only have one instance of Conky running, according to ps -aux | grep conky.
I've been following this for a while-I still don't understand the issue.
My conkys (multiple) are perfectly reloaded after suspend-always have been
I start my conkys with a simple bash script which is called in Startup applications
That script references several .rc statements--suspend recovery has never been an issue.
Also I have never noticed conky consuming more system resources over time. So my thoughts
are the resources are consumed by something other--and your conky is just reporting this--
No idea what you have your conky is monitoring though
Post the .rc
Everything in life was difficult before it became easy.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Restart Conky when resuming from Suspend

Post by rene »

all41 wrote: Sun Jun 27, 2021 2:47 am Post the .rc
Unless I don't know what "the Conky .rc" is, seems that's already posted a bit up: viewtopic.php?p=2031433&sid=615f585cff6 ... 4#p2031433

Anyways; my if-then reply was it seems slightly under-interpreted so, newlyminted7, do be sure that you do not have an "audtool" and/or "fold" instance build-up due to that bit; ps ax | grep audtool. Once again not likely, but still needs a check.
newlyminted7
Level 5
Level 5
Posts: 558
Joined: Sat Jan 02, 2021 4:44 pm

Re: Restart Conky when resuming from Suspend

Post by newlyminted7 »

all41 wrote: Sun Jun 27, 2021 2:47 am I've been following this for a while-I still don't understand the issue.
I stated the issue in the first line of this thread:
My Conky uses more CPU over time, and gets up to almost 10% CPU after a few days, according to htop.
all41 wrote: Sun Jun 27, 2021 2:47 am My conkys (multiple) are perfectly reloaded after suspend-always have been
Conky doesn't restart when the computer resumes from Suspend. At least mine doesn't. The same Conky process just keeps running, like all others.
See https://www.2daygeek.com/how-to-check-h ... -in-linux/ to check how long your conky process has been running. Mine doesn't restart upon Suspend.
all41 wrote: Sun Jun 27, 2021 2:47 am I start my conkys with a simple bash script which is called in Startup applications
So do I. But I'm looking for a way to restart it after resuming from Suspend, not upon Startup. I already have that working okay, the same way (Startup Applications), for Startup.
all41 wrote: Sun Jun 27, 2021 2:47 am Also I have never noticed conky consuming more system resources over time. So my thoughts
are the resources are consumed by something other--and your conky is just reporting this--
This is what I'm trying to figure out.
all41 wrote: Sun Jun 27, 2021 2:47 am Post the .rc
I already did, above (viewtopic.php?p=2031433&sid=5f23bc62284 ... e#p2031433).
newlyminted7
Level 5
Level 5
Posts: 558
Joined: Sat Jan 02, 2021 4:44 pm

Re: Restart Conky when resuming from Suspend

Post by newlyminted7 »

rene wrote: Sun Jun 27, 2021 7:50 am Anyways; my if-then reply was it seems slightly under-interpreted so, newlyminted7, do be sure that you do not have an "audtool" and/or "fold" instance build-up due to that bit; ps ax | grep audtool. Once again not likely, but still needs a check.
I think I interpreted what you were saying okay. There is no audtool buildup, only one instance runs when required, so that is okay. It is still an improvement for that script to move those calls into the if-then block, in my opinion, because there's no point trying to get the currently playing song title if no song is playing. Thanks again, rene, I do appreciate your help.

I put in those improvements, both to the audacious song script as well as the CPU temp line in my Conky configrc from Termy (thanks again Termy) and I'm going to monitor the CPU % usage over the next few days via htop and see if there's much change.
User avatar
all41
Level 19
Level 19
Posts: 9518
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Restart Conky when resuming from Suspend

Post by all41 »

newlyminted7 wrote: Sun Jun 27, 2021 3:05 pm
all41 wrote: Sun Jun 27, 2021 2:47 am Post the .rc
I already did, above (viewtopic.php?p=2031433&sid=5f23bc62284 ... e#p2031433).
doh! :roll:

This works here:
#!/bin/bash
export DISPLAY=:0
killall conky;
sleep 1 &&
/home/uno/.conky/TS1.sh;
exit


/home/uno/.conky/TS1.sh is the same path used in Startup
Everything in life was difficult before it became easy.
User avatar
zcot
Level 9
Level 9
Posts: 2828
Joined: Wed Oct 19, 2016 6:08 pm

Re: Restart Conky when resuming from Suspend

Post by zcot »

you can add a line for debugging for a while, for the texeci 3 sensors call. Something like:
${voffset -9}THERE ARE ${threads} THREADS.

And rene makes a good point about encapsulation in the if block with audacious. Also in the conky config you look at that same attitude with the initiation of the audacious call. It would probably be better to do it more like the lampp call where you execi at first. That would eliminate any lost count or resets, and plus you are already checking against the status inside of the audacious script so you don't need it in that conky block. You could also do that block with merely the execi call to the script and just do everything in the script, and create a conky string to return, if needed, if "Playing", and use the ${conky_parse} with it. -that's pretty ugly, and I guess it comes from the idea of using a lua support file but i think you could do it with a shell script too. Or just do the block with a lua support file. There's a number of approaches.
newlyminted7
Level 5
Level 5
Posts: 558
Joined: Sat Jan 02, 2021 4:44 pm

Re: Restart Conky when resuming from Suspend

Post by newlyminted7 »

zcot wrote: Mon Jun 28, 2021 11:30 pm you can add a line for debugging for a while, for the texeci 3 sensors call. Something like:
${voffset -9}THERE ARE ${threads} THREADS.
This gives me around 1367 threads, fluctuating up and down by a few. This is the total thread count on my machine, not sure if this is helpful, though? Or is there a way to make it only show the threads of that texeci 3 sensors call?
zcot wrote: Mon Jun 28, 2021 11:30 pmAlso in the conky config you look at that same attitude with the initiation of the audacious call. It would probably be better to do it more like the lampp call where you execi at first. That would eliminate any lost count or resets, and plus you are already checking against the status inside of the audacious script so you don't need it in that conky block.
I'm trying to do that already with the ${if_match "${audacious_status}" == "Playing"} line, which I think is roughly the same as what you're suggesting, isn't it? This uses Conky's API for Audacious and restricts the block that calls aud_song.sh to only execute when Audacious is actually "Playing". This saves a lot of unnecessary calls to the aud_song.sh script that would otherwise execute with each iteration of Conky (every second or so). And even when that aud_song.sh script is called, it only makes the call to aud_song.sh every 3 seconds with execi (only when Audacious is actively playing a song). And that script was only querying the song title if Audacious is playing, which was redundant, yes, so I removed the playback_status check in aud_song.sh.
zcot wrote: Mon Jun 28, 2021 11:30 pmYou could also do that block with merely the execi call to the script and just do everything in the script, and create a conky string to return, if needed, if "Playing", and use the ${conky_parse} with it.
If I do that then Conky calls the aud_song.sh script on every iteration of Conky (or 3 sec, if I use execi), instead of only when Audacious is playing a song. That would be too costly, in my opinion.

Thank you for the suggestions, though, since I am still trying to figure this out.

As for debugging, here are the results of my little un-scientific test, performed over the course of 5 days, after I improved the ${texeci 3 sensors call from Termy. During the test I just opened htop and watched it for a few minutes, recording the highest and lowest CPU values of the active threads (usually just two appear to do the bulk of the work out of the total 12 threads).

Conky CPU usage

Code: Select all

Sat Jun 26, 12:15pm: 1.5-3% and 0.1% Mem usage

Sun Jun 27, 12:15pm: 1.9-3.8% and 0.1% Mem usage

Sun Jun 27, 8:46pm: 0.6-2.6% and 0.1% Mem usage

Sun Jun 27, 10:46pm: 1.3-5.1% and 0.1% Mem usage

Mon Jun 28, 3:45pm: 1.9-6.4% and 0.1% Mem usage

Mon Jun 28, 9:15pm: 1.3-7.5% and 0.1% Mem usage

Tue Jun 29, 1:05pm: 3.2-9.6% and 0.2% Mem usage

Tue Jun 29, 5:13pm: 3.8-10.9% and 0.2% Mem usage

Tue Jun 29, 6:15pm: 3.8-12.2% and 0.2% Mem usage

Tue Jun 29, 9:48pm: 5.1-12.8% and 0.2% Mem usage

Tue Jun 29, 11:00pm: 5.1-15.5% and 0.2% Mem usage

Wed Jun 30, 12:00pm: 5.8-17.0% and 0.2% Mem usage

Wed Jun 30, 2:47pm: 5.7-18.4% and 0.2% Mem usage

Wed Jun 30, 6:00pm: 5.8-19.9% and 0.2% Mem usage
Even with the ${texeci 3 sensors} change, it's still creeping up in CPU usage and I still don't know why. Any other ideas? Does anyone else's Conky do this?
User avatar
zcot
Level 9
Level 9
Posts: 2828
Joined: Wed Oct 19, 2016 6:08 pm

Re: Restart Conky when resuming from Suspend

Post by zcot »

I didn't know if you can see some obvious issue with exponential thread creation, maybe there's no issue with that.

the current script is using conky audacious function and separately audtool externally. do one, then do the other. and test it without audacious too. -is it even a surety that audacious relationship is an issue? But it seems like an easy enough test to check out whether it is or not.

I've never seen the problem, but also I've never used audacious function. I'll test it here.
newlyminted7
Level 5
Level 5
Posts: 558
Joined: Sat Jan 02, 2021 4:44 pm

Re: Restart Conky when resuming from Suspend

Post by newlyminted7 »

Yes, I suppose I'll have to test if it's the Audacity code, or one of the others.

Doesn't look like any exponential thread creation is going on, either, I left that code in my Conky for awhile.
tafrej
Level 1
Level 1
Posts: 1
Joined: Thu Jul 01, 2021 7:56 am

Re: Restart Conky when resuming from Suspend

Post by tafrej »

Hello everyone!
Since a couple of days I felt in love with conky, and precisely conky-lua-arch, from aur.
I am very happy with it, and it's really useful and beautiful! But I would like to ask you a question: is it possible to update conky's displayed informations right after a suspend/hibernation?
I mean, I added to the original config, check for emails, weather, and updates to be done.
But if i hibernate now, and tomorrow afternoon I resume, these info are not updated (apparently the timeout of the command execpi stops when the computer is suspended).
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Restart Conky when resuming from Suspend

Post by Termy »

I've just found out you can actually have SystemD do stuff pre- and post-suspend, and the same for powering off the system! All you have to do is add a script in '/lib/systemd/system-sleep', which is owned by 'root' and in the 'root' group, plus be '744' permissions. The issue here will probably be in how to execute conky for the given user when X is loaded.
I'm also Terminalforlife on GitHub.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Restart Conky when resuming from Suspend

Post by rene »

The systemd-sleep route was already mentioned as part of the original post, and also see my first reply.
newlyminted7
Level 5
Level 5
Posts: 558
Joined: Sat Jan 02, 2021 4:44 pm

Re: Restart Conky when resuming from Suspend

Post by newlyminted7 »

tafrej wrote: Mon Jul 05, 2021 1:45 am Hello everyone!
Since a couple of days I felt in love with conky, and precisely conky-lua-arch, from aur.
I am very happy with it, and it's really useful and beautiful! But I would like to ask you a question: is it possible to update conky's displayed informations right after a suspend/hibernation?
I mean, I added to the original config, check for emails, weather, and updates to be done.
But if i hibernate now, and tomorrow afternoon I resume, these info are not updated (apparently the timeout of the command execpi stops when the computer is suspended).
Tafrej, I'd create a new thread. You're more likely to get a better response for your specific issue that way.
Locked

Return to “Scripts & Bash”