You are not logged in.
Sector11 wrote:tmq wrote:Do I need a .conkyrc file in my home folder too? Any ideas??!
This should do it:
#!/bin/bash (sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc) & (sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc_clock) & (sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc_top) & exit
The & at the end of each line returns control back the the terminal and the process continues.
Reference: Start/Stop Conky
So does the final "&" initiate the "exit" portion of the script - or does it do something else entirely....?
It was a typo. and fixed.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
The & at the end of each line returns control back the the termina and the process continues.
Thank you, this code fixed my two three conky on startup but the end "$" provide errors debugin from terminal so just changed $ to & fixed errors.
Thank you once again.
Regards!
Don't you hate typos.
Glad it worked.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@tmq
I would suggest starting your conky start script with a conkywonky to kill all conkys before calling new ones.
also the base .conkyrc should always start up
The problem with that is conkywonky will kill his three conky and start none of them.
conkywonky
#!/bin/sh
# conkywonky
# ----------
# Many moons ago, Conky did not automatically restart when changes were
# made to its config files. This script was used to restart it. It does not
# really serve any purpose now, but I like the name and some people may still
# be using/referencing it.
if [ "$(pidof conky)" ]; then
killall conky
conky -q
exit
else
conky -q
exit
fi
The concept is wonderful, and either comes from "ssc" or was the base from which ssc came from (I originally saw it on Ubuntu forums) it will as you said "it will kill all conkys - but only starts the default:
the default /etc/conky/conky.conf or if it exists
/home/username/.conkyrc
- which it does in a default #! install OOTB (see: b) ... my ~/.conkyrc has been edited as an OOPS! conky.
Sector11 you did something wrong calling a conky
See the left conky below.
Since tmq has three conkys and none of them are: ~/.conkyrc conkywonky it is not useful for him as it sits.
- - - - -
@ tmg and anyone else interested
If you want something like that that will start your conkys automatically you can modify it and put it in your path and make it executable - mine are in ~/bin and then add it as the last entry in your autostart file:
This will kill any conkys running, on boot obviously none are running, and starts your three conkys, if no conkys are running, this will start them though.
I call it: tmq-conky
#!/bin/sh
# tmq-conky
# From: #! conkywonky
# ----------
# Many moons ago, Conky did not automatically restart when changes were
# made to its config files. This script was used to restart it. It does not
# really serve any purpose now, but I like the name and some people may still
# be using/referencing it.
if [ "$(pidof conky)" ]; then
killall conky
(sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc) &
(sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc_clock) &
(sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc_top) &
exit
else
(sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc) &
(sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc_clock) &
(sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc_top) &
exit
fi
The script at Conky PitStop ssc.sh or just ssc will start conkys if none are running run, run it a second time and it will killall conkys, a third time will start them again.
ssc
#!/bin/sh
# click to start, click to stop
if pidof conky | grep [0-9] > /dev/null
then
exec killall conky
else
(sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc) &
(sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc_clock) &
(sleep 15 && conky -c /home/(myname)/.myscripts/.conkyrc_top) &
exit
fi
When editing conkys today sometimes they don't restart properly especially the width height so starting stopping a conky should be done in a terminal.
Now sometimes you want to edit 'one' of your conkys. Add a line at the top of each of your three conkys - thanks to GG for starting this idea (Ubuntu forums):
/home/(myname)/.myscripts/.conkyrc
#pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc" &
/home/(myname)/.myscripts/.conkyrc_clock
#pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc_clock" &
/home/(myname)/.myscripts/.conkyrc_top
#pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc_top" &
So now to edit "/home/(myname)/.myscripts/.conkyrc_clock"
copy and paste that line from /home/(myname)/.myscripts/.conkyrc_clock to a terminal and edit out the #
pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc_clock" &
... and hit enter ... that ONE conky dies!
edit the conky as you want and in the same terminal hit the up arrow to see the line again:
pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc_clock" &
edit it: removing the ' after clock and the pkill -xf " from the front of the line:
conky -c /home/(myname)/.myscripts/.conkyrc_clock &
and hit enter ... your conky starts with the changes ... in the terminal hit enter and double "up" arrow and enter again kills it again ... edit and another enter and double "up" and you start it. Fast and easy and all other conkys are untouched.
On the left is ~/.conky.rc that is my OOPS! you did something wrong and on the right the original CrunchBang conky.
- - - - -
My bash script S11_Current.sh that starts/stops my conkys is based on the ssc script above, It starts or stops:
# on desktop 4 only | no sticky
- 3 conkys
# on desktop 3 only | no sticky
- 2 conkys
# on desktop 2 only | no sticky
- 3 conkys
# on desktop 1 only | no sticky
- 4 conkys
# on all desktops | sticky
- 1 conky
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@ Sector11, I found your idea a bit intimidating, and hence I tried a different route: I separated the paths slightly (see script below), and I took "rc" out of all titles. I hoped good fences and clear names make good (script) neighbors. At present, my task mgr shows --
"Conky_startIII" (my /usr/bin start script) is listed three times @ 604kb each RSS
"Conky" shows up three more times @ a range 6.8 - 7.1mb
My take away is that the "...startIII" entries signify the resources used by the script as it executes three separate times, while the label "conky" represents the actual execution of the conky config files. Therefore I am no longer duplicating - does that sound right? Please let me know if I'm too optimistic.
#!/bin/bash
(sleep 15 && conky -c /home/(myname)/.myscripts/conky_sys/.conky_sys) &
(sleep 15 && conky -c /home/(myname)/.myscripts/conky_clock/.conky_clock) &
(sleep 15 && conky -c /home/(myname)/.myscripts/conky_top/.conky_top) &
exit
I think I am following......
Now sometimes you want to edit 'one' of your conkys. Add a line at the top of each of your three conkys - thanks to GG for starting this idea (Ubuntu forums):
/home/(myname)/.myscripts/.conkyrc
#pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc" &
/home/(myname)/.myscripts/.conkyrc_clock
#pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc_clock" &
/home/(myname)/.myscripts/.conkyrc_top
#pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc_top" &
So now to edit "/home/(myname)/.myscripts/.conkyrc_clock"
copy and paste that line from /home/(myname)/.myscripts/.conkyrc_clock to a terminal and edit out the #
pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc_clock" &
... and hit enter ... that ONE conky dies!
edit the conky as you want and in the same terminal hit the up arrow to see the line again:
pkill -xf "conky -c /home/(myname)/.myscripts/.conkyrc_clock" &
edit it: removing the ' after clock and the pkill -xf " from the front of the line:
conky -c /home/(myname)/.myscripts/.conkyrc_clock &
and hit enter ... your conky starts with the changes ... in the terminal hit enter and double "up" arrow and enter again kills it again ... edit and another enter and double "up" and you start it. Fast and easy and all other conkys are untouched.
The ' after the clock is the "&" right? I may try this in a day or two...
Offline
I have just finished a new function and so I wanted to showcase it as well as my use for it.
I have for a long time ran my conkys a little heavy, one as bad as 10% on average, so I decided that this needed some control.
Thus conky_controller was born. I talked about this earlier, breifly and wanted to expand on it.
conky_controller watches cpu average and waits for it to be 100 for 60 updates (30 in the next update) then it kills all conkys and loads a different conky.
The different conky that I load is called minimal, as it's name inplies, it is a simple conky with base stats.
This conky uses the new "conky_text_to_gauge" based off the lua version I made. Coloring each letter as it prints them to work as it's own gauge. The other reason that I made this is because I noticed .conkyrc talk in the last few days.
Text color can be changed very easy by inputing the hex color after choosing which gauge you want. Becuase I have no idea how to input a table from .conkyrc to .lua, I had to make preset versions that are easy to call.
(in use)
function conky_text_to_gauge(type,color,scale)--5/13/14
if color == nil then color="00FF00" end
if scale == nil then scale=100 end
output=""
gauge={"t","e","s","t"}
--##############################
if type == "cpu" then
value=tonumber(conky_parse("${cpu cpu0}"))
if value == nil then value=0 end
gauge={"c","p","u","_","a","v","g","."}
end
if type == "cpu1" then
value=tonumber(conky_parse("${cpu cpu1}"))
gauge={"c","p","u","_","c","o","r","e","_","1"}
end
if type == "cpu2" then
value=tonumber(conky_parse("${cpu cpu2}"))
gauge={"c","p","u","_","c","o","r","e","_","2"}
end
if type == "mem" then
value=tonumber(conky_parse("${memperc}"))
gauge={"m","e","m","_","p","e","r","c"}
end
if type == "swap" then
value=tonumber(conky_parse("${swapperc}"))
gauge={"s","w","a","p","_","p","e","r","c"}
end
if type == "system" then
value=tonumber(conky_parse("${fs_used_perc /}"))
gauge={"/","s","y","s","t","e","m"}
end
if type == "home" then
value=tonumber(conky_parse("${fs_used_perc /home}"))
gauge={"/","h","o","m","e"}
end
--################################
if value == nil then value=0 end
if value >= (scale/4*3) then color="FF0000" end
for i = 1,#gauge do
if value >= (scale/#gauge*i) then
output=""..output..""..conky_parse("${color "..color.."}")..""..gauge[i]..""..conky_parse("${color}")..""
else
output=""..output..""..gauge[i]..""
end
end--for
return output
end
Offline
^ thats real great stuff! currently i have no need for this because my conkys are mostly minimal anyways but ill keep it in mind because it seems to be a good approach when it comes to clickable conkys...
greetz -naik
*kaum macht man es richtig, funktioniert es sofort*
Offline
@ tmq
Sorry if you found that intimidating, it wasn't meant to be. But Now that I look at it for someone having problems it might be just that.
There is nothing wrong with your Conky_startIII script. It does what you want, it's simple and it works.
I don't understand why you see "Conky_startIII" in your task manager at all. You run it once it starts the conkys and then exits. It simply should not be there, at least by my understanding. My "S11_current.sh" script doesn't show but the individual conkys do.
My take away is that the "...startIII" entries signify the resources used by the script as it executes three separate times, while the label "conky" represents the actual execution of the conky config files. Therefore I am no longer duplicating - does that sound right? Please let me know if I'm too optimistic.
Not sure what you mean by "no longer duplicating"?
One question - out of curiosity only, it works it's your so I'm just curious.
#!/bin/bash
(sleep 15 && conky -c /home/(myname)/.myscripts/conky_sys/.conky_sys) &
(sleep 15 && conky -c /home/(myname)/.myscripts/conky_clock/.conky_clock) &
(sleep 15 && conky -c /home/(myname)/.myscripts/conky_top/.conky_top) &
exit
why did you put each conky into a separate folders under /.myscripts named the same as the conky file and then hide the conky file?
-----
I think I am following......
Sector11 wrote:Now sometimes you want to edit 'one' of your conkys. Add a line at the top of each of your three conkys - thanks to GG for starting this idea (Ubuntu forums):
The ' after the clock is the "&" right? I may try this in a day or two...
No not quite. lets take one example, your .conky_sys conky
The very first line in that conky would be:
#pkill -xf "conky -c /home/(myname)/.myscripts/conky_sys/.conky_sys" &
It could be anywhere in fact as the # at the beginning makes it a comment line, but it's easier to find at the top of the file.
Now ... your conky is running but you want to make a change.
Copy that line to a terminal, less the # or at least edit out the # in the terminal:
pkill -xf "conky -c /home/(myname)/.myscripts/conky_sys/.conky_sys" &
and hit enter .... this will stop that one conky: .conky_sys
Edit your conky file and to start it again go back to the terminal:
Hit enter and the "up" arrow ... that will bring that line back. now edit it so it loos like this:
conky -c /home/(myname)/.myscripts/conky_sys/.conky_sys &
The parts you take out:
pkill -xf "conky -c /home/(myname)/.myscripts/conky_sys/.conky_sys" &
hit enter and that conky starts again.
Your other two are not touched.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@ tmq
Sorry if you found that intimidating, it wasn't meant to be. But Now that I look at it for someone having problems it might be just that.
I understand; I'm growing slowly
I don't understand why you see "Conky_startIII" in your task manager at all. You run it once it starts the conkys and then exits. It simply should not be there, at least by my understanding. My "S11_current.sh" script doesn't show but the individual conkys do.
It doesn't seem to show up in htop... Only xfce task mgr.
Not sure what you mean by "no longer duplicating"?
As secondary instances ran, they would layer each on top of the last - duplicating each other.
One question - out of curiosity only, it works it's your so I'm just curious. Why did you put each conky into a separate folders under /.myscripts named the same as the conky file and then hide the conky file?
Since I'm not a programer by any means, I was looking for anything that might - in an alternate universe - cause a script to execute each configuration twice. While I didn't quite buy it myself, I thought maybe three side-by-side conkys in the same folder was troublesome - so I split them (this AM I found my problem was xfce's auto save, I'll post the link I used separately). I'm just now wiping the proverbial egg off my face. I'll likely put them in one folder within the hour. The files were hidden from force of habit I guess - I didn't think much of it.
...lets take one example, your .conky_sys conky
The very first line in that conky would be:
#pkill -xf "conky -c /home/(myname)/.myscripts/conky_sys/.conky_sys" &
It could be anywhere in fact as the # at the beginning makes it a comment line, but it's easier to find at the top of the file.
Now ... your conky is running but you want to make a change.
Copy that line to a terminal, less the # [run it]
Edit your conky file and to start it again go back to the terminal:
Hit enter and the "up" arrow ... that will bring that line back. now edit it so it looks like this:
conky -c /home/(myname)/.myscripts/conky_sys/.conky_sys &
hit enter and that conky starts again. Your other two are not touched.
Hmmm, ok, I'll have to try this at some point...
Last edited by tmq (2014-05-13 15:52:08)
Offline
After a little more digging I discovered that conky was running two instances of the same config (with one layered on top of another), because of xfce's auto-save feature. After following the steps in this post on Arch forum -https://bbs.archlinux.org/viewtopic.php?id=120277 - the problem appears solved.
Offline
After a little more digging I discovered that conky was running two instances of the same config (with one layered on top of another), because of xfce's auto-save feature. After following the steps in this post on Arch forum -https://bbs.archlinux.org/viewtopic.php?id=120277 - the problem appears solved.
WoW!! That's a process. Glad you got it fixed. XFCE! What distro? I ask because we have a lot of people here that don't use #! and sometimes one needs to know what desktop or window manager a person is using.
Since I'm not a programer by any means, I was looking for anything that might - in an alternate universe - cause a script to execute each configuration twice. While I didn't quite buy it myself, I thought maybe three side-by-side conkys in the same folder was troublesome - so I split them (this AM I found my problem was xfce's auto save, I'll post the link I used separately). I'm just now wiping the proverbial egg off my face. I'll likely put them in one folder within the hour. The files were hidden from force of habit I guess - I didn't think much of it.
I'm not a programmer either, but having multiple conkys in one directory is not a problem, my test folder: /media/5/conky/
"MY" conkys are in /media/5/Conky along with more test conkys that I really should move and there are other folders that are specific to a certain type of conky or person - Teo's weather scripts, mrpeachy's WUN weather etc etc.
But then I'm a conky addict nut! A lot of those are only 'partial' conkys testing specific commands/scripts found around the net.
For someone with a simple three conky setup I see no reason why you can not put them all in one folder.
Don't even need to hide them, but that an opinion on my part.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@Sector11
I have had Xfce run multiple instances of the same conky that way with Debian and Xubuntu due to the auto saved session.
There's a reason you separate military and the police. One fights the enemies of the state, the other serves and protects the people. When the military becomes both, then the enemies of the state tend to become the people.
Offline
@Sector11
I have had Xfce run multiple instances of the same conky that way with Debian and Xubuntu due to the auto saved session.
I understand how the problems with 'saving sessions' can cause multiple versions of the same conky running, but that's not 'because' they were in the same folder surely. I've only ever had desktops, so I've never activated 'save sessions' - when I shut down, everything is closed first and the last thing: Shutdown ... tried 'Hibernate' for a while back in my early days with Ubuntu - but ... seemed silly on a desktop.
At least there is a fix for it.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Having the same things back up and running that you had before you shut down can be convenient and appealing.
There's a reason you separate military and the police. One fights the enemies of the state, the other serves and protects the people. When the military becomes both, then the enemies of the state tend to become the people.
Offline
@sector11 I forgot that you collected conkys and luas. Would there happen to be any that you wouldn't mind giving me copies of and who made them? I am low on ideas and codes to play with.
Offline
@sector11 I forgot that you collected conkys and luas. Would there happen to be any that you wouldn't mind giving me copies of and who made them? I am low on ideas and codes to play with.
Yea, I'm a conky nut and with six and a half years collecting I have a few. And I deleted a big chunk of them a while back by mistake.
Have you seen the Conky Archive thread, in my sig, that mrpeachy started? Conky only go there IF there is a screenshot and the code to do them.
Unfortunately I don't 'write' lua, bash or python scripts for use in conkys, I just 'bend fold and mutilate' them to my needs. havent done anything "new" lately ... I have mrpeachy's GUI-WUN lua script to get at yet ( latest ) ... just haven't had the time available to dedicate a day to play with it.
This one was a 'tweaking' nightmare for spacing:
I think the code is in the Archives thread - not sure.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
I just finished with my system_profile for the first time. This doesn't do anything else than figure out what your computer has that you would want to show in your lua script.
This function requires inxi and mount.lua from mrpeachy. It outputs simply cpu cores, hdd partition, eth0, wlan0, temps, and fan counts for use with other functions I have made to only pull the conky_parse that are needed. I haven't made all of them yet or made them to work with each other. This is still a work in progress and one of the things I would like to do is remove the dependence on inxi.
So if anyone has an idea on how to do that please let me know, also can a couple of people test this and make sure it works on your systems.
At the moment it prints out a couple of lines in terminal that look like this:
cores hdd eth0 wlan0 temps fans
2 3 1 1 1 0
cores hdd eth0 wlan0 temps fans
2 3 1 1 1 0
cores hdd eth0 wlan0 temps fans
2 3 1 1 1 0
This can be called from conky directly if you add conky_ before the system_profile
function system_profile()
--this function requires inxi and mount.lua from mrpeachy
local updates=tonumber(conky_parse('${updates}'))
if updates == 1 then
temps={}
cores={}
fans={}
p_total=0
n_total=0
conky_get_mounted_data(1)
for i = 1,10 do
temps[i]=conky_parse("${exec sensors acpitz-virtual-0 |grep 'temp"..i.."'}")
cores[i]=conky_parse("${exec inxi -C | grep 'Clock Speeds:' | awk -F'Clock Speeds:' '{print $2}' | awk -F'"..i..":' '{print $2}'}")
fans[i]=conky_parse("${exec sensors |grep 'fan"..i.."'}")
if temps[i] ~= "" then t_total=i end
if cores[i] ~= "" then c_total=i end
if fans[i] ~= "" then f_total=i end
if conky_mount((i+1),"fsys",8) == "/dev/sda" then p_total=i end
end--for
p_total=p_total+1
net=conky_parse("${exec inxi -n | grep 'IF' | awk -F'IF:' '{print $2}' | awk -F'state' '{print $1}'}")
if string.find(net,"wlan0") ~= nil then wlan0=1 end
if string.find(net,"eth0") ~= nil then eth0=1 end
if t_total == nil then t_total=0 end
if c_total == nil then c_total=0 end
if f_total == nil then f_total=0 end
if p_total == nil then p_total=0 end
if n_total == nil then n_total=0 end
if wlan0 == nil then wlan0=0 end
if eth0 == nil then eth0=0 end
print("cores","hdd","eth0","wlan0","temps","fans")
print(c_total,p_total,eth0,wlan0,t_total,f_total)
end--if
end--function
if you don't have mrpeachy's mount.lua here it is
function conky_get_mounted_data(interval)
--[[partitions for conky by mrpeachy
##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number. This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}
]]
if interval == nil then interval=10 end
local updates=tonumber(conky_parse("${updates}"))
if update == 1 then conky_start=1 else conky_start=0 end
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
for line in file:lines() do
if string.find(line,"/dev/")~=nil then
local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
table.insert(fsys,fs)
local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(size,sz)
local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(used,us)
local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(avail,av)
local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(uperc,up)
local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
table.insert(mount,mn)
end
end
file:close()
conky_start=nil
end--timed section
return ""
end
function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
--for use with "conky_get_mounted_data"
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
if c~=0 then
data=string.sub(data,1,c) or ""
end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
if c~=0 then
data=string.sub(data,1,c) or ""
end
else
data="check data type"
end
return data
end--end main function
function conky_mount_usep(partition_number)--aon addition
--for use with conky_mount
return tonumber(conky_parse("${fs_used_perc "..(conky_mount(partition_number,"mount")).."}"))
end--function
Offline
@pandroidanaroid
function conky_count_down(y,mo,d,h,mi)--5/9/14 time_strings("numbers") if y == nil then y=0 end if mo == nil then mo=0 end if d == nil then d=0 end if h == nil then h=0 end if mi == nil then mi=0 end if s == nil then s=0 end if y2o == nil then y2o=0 end if mo2o == nil then mo2o=0 end if d2o == nil then d2o=0 end if h2o == nil then h2o=0 end if mi2o == nil then mi2o=0 end if s2o == nil then s2o=0 end if y ~= "text" then if s == 0 then s=60 ; mi=mi-1 end if mi2o < 0 then mi2o=60-(mi2o*(-1)) ; h=h-1 end if h2o < 0 then h2o=24-(h2o*-1) ; d=d-1 end if d2o < 0 then d2o=(month_days[month])-(d2o*-1) ; mo=mo-1 end if mo2o < 0 then mo2o=12-(mo2o*-1) ; y=y-1 end s2o=s-second mi2o=mi-minute h2o=h-hour24 d2o=d-day mo2o=mo-month y2o=y-year if s < 0 then s=60 ; mi2o=mi2o-1 end if mi2o < 0 then mi2o=60-(mi2o*(-1)) ; h2o=h2o-1 end if h2o < 0 then h2o=24-(h2o*-1) ; d2o=d2o-1 end if d2o < 0 then d2o=(month_days[month])-(d2o*-1) ; mo2o=mo2o-1 end if mo2o < 0 then mo2o=12-(mo2o*-1) ; y2o=y2o-1 end if y2o < 0 then s2o=0 ; mi2o=0 ; h2o=0 ; d2o=0 ; mo2o=0 y2o=0 end output=""..h2o..":"..mi2o..":"..s2o.." "..mo2o.."/"..d2o.."/"..y2o.."" if output == "0:0:0 0/0/0" then output="past" end else output="h:mi:s mo/d/y" end return output end
Now it's totally blank
Offline
Now it's totally blank
Terminal output?
Offline
@ ansem_of_nexus
I have a problem with the 'temps': I have 4 temps - counting ${hddtemp /dev/sda}
Two of my fans are missing the 'third' connector to get sensors input.
Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x3400001)
Conky: drawing to double buffer
cores hdd eth0 wlan0 temps fans
3 7 1 0 1 3
cores hdd eth0 wlan0 temps fans
3 7 1 0 1 3
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@ ansem_of_nexus
I have a problem with the 'temps':
I have 4 temps - counting ${hddtemp /dev/sda}
Two of my fans are missing the 'third' connector to get sensors input.Conky: desktop window (265) is root window Conky: window type - normal Conky: drawing to created window (0x3400001) Conky: drawing to double buffer cores hdd eth0 wlan0 temps fans 3 7 1 0 1 3 cores hdd eth0 wlan0 temps fans 3 7 1 0 1 3
I am going to say that this is my fault because I left acpitz-virtual-0 in the sensors line. So delete it and it may fix it, or you will end up with +1
Line I am talking about:
temps[i]=conky_parse("${exec sensors acpitz-virtual-0 |grep 'temp"..i.."'}")
Offline
I am going to say that this is my fault because I left acpitz-virtual-0 in the sensors line. So delete it and it may fix it, or you will end up with +1
Line I am talking about:temps[i]=conky_parse("${exec sensors acpitz-virtual-0 |grep 'temp"..i.."'}")
Of course it's your fault, I NEVER make mistake....
I do however make "Oopsies!"
as in "OOPS! - that's not right!"
$ Conky: forked to background, pid is 2793
Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x4200001)
Conky: drawing to double buffer
cores hdd eth0 wlan0 temps fans
3 7 1 0 10 3
cores hdd eth0 wlan0 temps fans
3 7 1 0 10 3
Ummmmm --- >> 10?
The line you were talking about:
conky_get_mounted_data(1)
for i = 1,10 do
--temps[i]=conky_parse("${exec sensors acpitz-virtual-0 |grep 'temp"..i.."'}")
cores[i]=conky_parse("${exec inxi -C | grep 'Clock Speeds:' | awk -F'Clock Speeds:' '{print $2}' | awk -F'"..i..":' '{print $2}'}")
fans[i]=conky_parse("${exec sensors |grep 'fan"..i.."'}")
Not my OOPS! O:)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Of course it's your fault, I NEVER make mistake....
I do however make "Oopsies!"![]()
![]()
![]()
![]()
as in "OOPS! - that's not right!"
$ Conky: forked to background, pid is 2793 Conky: desktop window (265) is root window Conky: window type - normal Conky: drawing to created window (0x4200001) Conky: drawing to double buffer cores hdd eth0 wlan0 temps fans 3 7 1 0 10 3 cores hdd eth0 wlan0 temps fans 3 7 1 0 10 3
Ummmmm --- >> 10?
The line you were talking about:
conky_get_mounted_data(1) for i = 1,10 do --temps[i]=conky_parse("${exec sensors acpitz-virtual-0 |grep 'temp"..i.."'}") cores[i]=conky_parse("${exec inxi -C | grep 'Clock Speeds:' | awk -F'Clock Speeds:' '{print $2}' | awk -F'"..i..":' '{print $2}'}") fans[i]=conky_parse("${exec sensors |grep 'fan"..i.."'}")
Not my OOPS!
O:)
that would be the right line... But 10 is not what I was expecting. What is you sensors output look like?
Offline
that would be the right line... But 10 is not what I was expecting. What is you sensors output look like?
15 May 14 | 20:51:38 ~
$ sensen
acpitz-virtual-0
Adapter: Virtual device
temp1: +30.0°C (crit = +110.0°C)
f71862fg-isa-0a00
Adapter: ISA adapter
+3.3V: +3.50 V
in1: +1.36 V
in2: +1.51 V
in3: +0.87 V
in4: +0.00 V
in5: +0.00 V
in6: +0.00 V
3VSB: +3.39 V
Vbat: +2.96 V
fan1: 2133 RPM
fan2: 0 RPM ALARM
fan3: 0 RPM ALARM
temp1: +40.0°C (high = +85.0°C, hyst = +81.0°C)
(crit = +255.0°C, hyst = +251.0°C) sensor = transistor
temp2: +32.0°C (high = +85.0°C, hyst = +81.0°C)
(crit = +100.0°C, hyst = +96.0°C) sensor = thermistor
temp3: +127.0°C (high = +70.0°C, hyst = +68.0°C) ALARM (CRIT)
(crit = +85.0°C, hyst = +83.0°C) sensor = transistor
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +31.8°C (high = +70.0°C)
Sensors: System Temperatures: cpu: 32.0C mobo: 31.9C gpu: 39C
Fan Speeds (in rpm): cpu: 2133 fan-2: 0 fan-3: 0
15 May 14 | 20:51:42 ~
$
sensen = sensors and inxi -s
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
I think that the sensor part of this script is a no go
Offline
I think that the sensor part of this script is a no go
'sensors' are so machine specific ... too bad it looked like it was turning into something.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat