Another one .... arkfc works with $1 as well.
Nice arclance. Thanks.
Two in one day
Hey stinkeye you can retire the "All or nuttin'. Go hard or go home." now. :D
KFC has a couple of cousins!
Printable View
Another great looking desktop thanks to everyone else! I just copy/paste! The Conky on the left is courtesy of falldown! The awesome weather script at top right is the great work of arclance! (this weather script will also display live sat and radar images if you like) The cool wallpaper is courtesy of Sector11 and jst_joe over at the VSIDO Community!
http://en.zimagez.com/miniature/conky11.jpg
Keeping with what appears to be my current trend of "Those things which = 0, or are not applicable, should remain unseen", I updated my weather Conky to only display precip. chances when they do not equal 0% to make it easier to spot when rain/snow may occur. I mean, my precious time can't be wasted actually reading an entire line of numbers, right? ;)
I'm still not settled on my "Astro" Conky yet, but it's getting closer to what I want.
Thank you for this suggestion. The current version according to the gcalcli site is v2.3. My gcalcli is v2.1. How can I update to the latest version? I've tried moving the updated gcalcli into my bin directory, but even after rebooting, the version still shows v2.1.
Best,
Hi arclance,
Can you explain how the syntax works eg the ".*"
Does getting the command line from system monitor do the same?
Makes it easier for me as I can just copy and paste without having to use my old brain.
egCode:pkill -f "conky -c /home/glen/conky/configs/demo-conkyrc"
The ".*" is a multi-character wildcard.
pkill accepts "Extended Regular Expression" format arguments that is why you use ".*" as a wildcard.
The reason to use it in this case is so that the kill command will work if you have passed other command line options to conky along with "-c" and no mater what type of path you specify for the .conyrc.
The "-f" option specifies to match the full command used to start the process and not just the executable name.
You command would work fine.
Using the wildcards is easier when you don't have the command prepared already or want to script something.
Thanks for that. Been looking for a way to kill an individual conky process.
Now I can add a toggle just for my demo conky to run in terminal.
eg
I found that when running conky in terminal pgrep -f "conky -c /home/glen/conky/configs/demo-conkyrc"Code:#!/bin/bash
## click to start, click to stop
if pgrep -f "conky -c /home/glen/conky/configs/demo-conkyrc"
then
pkill -xf "conky -c /home/glen/conky/configs/demo-conkyrc"
else
gnome-terminal -e "conky -c /home/glen/conky/configs/demo-conkyrc"
fi
returned a PID for the both the terminal and conky and the pkill -f command would sometimes kill the terminal and the conky would still run.
Using pkill -xf for an exact match, killed conky.
Hmmmm, I don't really know. I added my scripts folder to path using:
(I put this at the very end of my ~/.bashrc file)Code:export PATH=/home/grouchygaijin/scripts:$PATH
Now when I run gcalcli --version in the terminal I get:
Code:~$ gcalcli --version
gcalcli v2.3 (Eric Davis)
I can't get this to work with a variable for the life of me - unless it is "hardcoded" that works just fine
It kills it ... if it is running, but will not start it.Code:#!/bin/bash
## click to start, click to stop
##if pgrep -f "conky -c /home/glen/conky/configs/demo-conkyrc"
##then
## pkill -xf "conky -c /home/glen/conky/configs/demo-conkyrc"
##else
## gnome-terminal -e "conky -c /home/glen/conky/configs/demo-conkyrc"
##fi
## click to start, click to stop
#if pgrep -f "conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock.conky"
#then
# pkill -xf "conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock.conky"
#else
# conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock.conky
#fi
if pgrep -f "conky.*-c.*$1"
then
pkill -xf "conky.*-c.*$1"
else
"conky.*-c.*$1"
fi
It really is there:Code:20 Jan 13 | 11:16:34 ~
$ stinkeye /media/5/Conky/TeoWeatherClock/Teo_Clock.conky
/home/sector11/bin/stinkeye: line 25: conky.*-c.*/media/5/Conky/TeoWeatherClock/Teo_Clock.conky: No such file or directory
sector11 @ sector11
20 Jan 13 | 11:16:40 ~
$ conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock.conky &
[1] 29272
sector11 @ sector11
20 Jan 13 | 11:17:19 ~
$ Conky: forked to background, pid is 29277
-----------------------------------------------------------
sector11 @ sector11
20 Jan 13 | 11:18:47 ~
$ stinkeye /media/5/Conky/TeoWeatherClock/Teo_Clock.conky
30055
Conky: received SIGINT or SIGTERM to terminate. bye!
sector11 @ sector11
20 Jan 13 | 11:18:50 ~
$ stinkeye /media/5/Conky/TeoWeatherClock/Teo_Clock.conky
/home/sector11/bin/stinkeye: line 25: conky.*-c.*/media/5/Conky/TeoWeatherClock/Teo_Clock.conky: No such file or directory
sector11 @ sector11
20 Jan 13 | 11:18:56 ~
$
EDIT: Tried this:Code:sector11 @ sector11
20 Jan 13 | 11:25:18 ~
$ conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock.conky &
[1] 926
sector11 @ sector11
20 Jan 13 | 11:25:21 ~
$ Conky: forked to background, pid is 931
Code:if pgrep -f "conky -c $1"
then
pkill -xf "conky -c $1"
else
"conky -c $1"
fi
Code:sector11 @ sector11
20 Jan 13 | 11:30:48 ~
$ stinkeye /media/5/Conky/TeoWeatherClock/Teo_Clock.conky
/home/sector11/bin/stinkeye: line 25: conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock.conky: No such file or directory
sector11 @ sector11
20 Jan 13 | 11:31:27 ~
$
Can you help?