You are not logged in.

#301 2016-12-12 22:41:23

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Show us your conky

loutch wrote:

for cpu i modify this

#!/bin/bash
...
cpu=${cpu cpu0}

are you trying to use conky syntax in a bash script???

in bash it isn't so simple.
maybe try this: https://stackoverflow.com/a/9229580

Offline

#302 2016-12-13 13:26:15

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

ohnonot wrote:

are you trying to use conky syntax in a bash script???

yes

ohnonot wrote:

in bash it isn't so simple.

not for me  & i try to learn

I try this  i have someting

#!/bin/bash
## ohnonot - Mon 05 Dec 2016
gap="$1" #the gap between hours and minutes

numpath="/home/loutch/.conky/karamba/images"

cpu="$(NUMCPUS=`grep ^proc /proc/cpuinfo | wc -l`; FIRST=`cat /proc/stat | awk '/^cpu / {print $5}'`; sleep 1; SECOND=`cat /proc/stat | awk '/^cpu / {print $5}'`; USED=`echo 2 k 100 $SECOND $FIRST - $NUMCPUS / - p | dc`; echo ${USED}% CPU Usage)"

echo "\${image ${numpath}/1-${cpu:0:1}.png -p 66,88}\
\${image ${numpath}/1-${cpu:1:1}.png -p 101,88}\
\${image ${numpath}/1-${cpu:2:1}.png -p 134,88}"

1481646532.png

1481646567.png

But that  no work great
The number under the image is ${cpu} = 7 % from conky & not the same.

I try this with sarah & conky in 1.10 & lua not work because the script have any error .

& here with mageia & conky in 1.90 version

1481648682.png


1481648998.png
.

Last edited by loutch (2016-12-13 17:10:48)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#303 2016-12-15 18:58:33

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Show us your conky

loutch wrote:
cpu="$(NUMCPUS=`grep ^proc /proc/cpuinfo | wc -l`; FIRST=`cat /proc/stat | awk '/^cpu / {print $5}'`; sleep 1; SECOND=`cat /proc/stat | awk '/^cpu / {print $5}'`; USED=`echo 2 k 100 $SECOND $FIRST - $NUMCPUS / - p | dc`; echo ${USED}% CPU Usage)"

hmm, that's a little awkward, no?

i don't think it will work like this.
you need to get current cpu usage, and not since last boot.
i think you're better off installing something like mpstat.
or use conky & lua for this.

Offline

#304 2016-12-15 20:10:50

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,065
Website

Re: Show us your conky

Also, two more general observations:

loutch wrote:
`grep ^proc /proc/cpuinfo | wc -l`

No need for `wc` at all:

`grep -c ^proc /proc/cpuinfo`

And:

`cat /proc/stat | awk '/^cpu / {print $5}'`

The `awk` command works on files, just like `grep`:

`awk '/^cpu / {print $5}' /proc/stat`

http://porkmail.org/era/unix/award.html#uucaletter

Offline

#305 2016-12-16 12:33:32

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Hello

tank's for helping but this cpu grrrrrrrrrrrrrr don't work oder i'm to stupid to create the good code

Here what i've do with date and ram and other image In Sarah xfce

1481891595.png

@+


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#306 2016-12-16 19:48:35

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Bonsoir

here a fisrt draft in Mageia5

1481917611.png

Lua for cpu's work but not the grrrr cpu lamps (003 is a fake )
needle on internet work just have to change background

@+


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#307 2016-12-16 20:37:27

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,010

Re: Show us your conky

@ loutch those are beautiful!
And 1000% better than I could ever do!

You are "Le Conkystador"!!!!


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#308 2016-12-16 21:54:13

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

here second draft &

Now the hardest must attack the scripts

1481925172.png

Last edited by loutch (2016-12-16 21:54:40)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#309 2016-12-17 01:33:15

rwyarbrough
Member
From: Mesquite, Texas
Registered: 2016-11-26
Posts: 56

Re: Show us your conky

It's all looking really good. I apologize for not logging in more lately, but I've been having way too much stuff going on to "take my daily dose" of this forum like I want to.

The downside to a theme like this is that it has a rather large footprint due to the graphics - especially problematic if you have limited real estate already (like on a laptop).

Nixie tubes and old style meters is rather cool in my book no matter how much screen real estate you use!

Offline

#310 2016-12-17 07:09:44

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Hello

Laptop HP screen is 1600x900 & background "alu" is 1280x850

.


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#311 2016-12-17 16:01:46

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Bonsoir

here fisrt ligne of conky's work .
1481990072.png

i have a question about conky uptime (the 3')

How to modify the script so that the numbers begin to the right and moves towards the left

like this

[- - - 6] = 6mn
[- - 1 4] = 14 mn
[- 2 5 1] = 2h 51 mn  not like here [2 - 5 1]
[1 0 2 5] = 10h 25 mn

my conkyrc

 
 
background yes
use_xft yes
xftfont URW Chancery L:style=Bold:size=11
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color 38392a
default_outline_color white
alignment top_right
gap_x 580
gap_y 50
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes

#minimum_size 128 70
minimum_size 240 118

lua_load ~/.conky/lua/image.lua

TEXT

${lua fDrawImage $HOME/.conky/karamba/images/uptime.png 15 8 222 110}\
${lua fDrawImage $HOME/.conky/karamba/images/Reflection.png 22 0 270 122}\
${lua fDrawImage $HOME/.conky/karamba/images/0-0.png 56 24 30 69}\
${lua fDrawImage $HOME/.conky/karamba/images/0-0.png 87 25 30 69}\
${lua fDrawImage $HOME/.conky/karamba/images/0-0.png 128 24 30 69}\
${lua fDrawImage $HOME/.conky/karamba/images/0-0.png 162 24 30 69}\
${execpi 10 ~/.conky/karamba/uptime.sh 10}

uptime.sh

#!/bin/bash
## ohnonot - Mon 05 Dec 2016
gap="$1" #the gap between hours and minutes

time="$(uptime | awk '{print $3,$4}' | cut -f1 -d,)"

numpath="/home/loutch/.conky/karamba/images"

echo "\${image ${numpath}/1-${time:0:1}.png -p 49,20}\
\${image ${numpath}/1-${time:1:1}.png -p 82,20}\
\${image ${numpath}/1-${time:2:1}.png -p 123,20}\
\${image ${numpath}/1-${time:3:1}.png -p 154,20}"

thank's

Last edited by loutch (2016-12-17 16:04:57)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#312 2016-12-17 17:14:27

rwyarbrough
Member
From: Mesquite, Texas
Registered: 2016-11-26
Posts: 56

Re: Show us your conky

loutch wrote:

How to modify the script so that the numbers begin to the right and moves towards the left

I'm a noob here on the forum and with conky and LUA, so I'm guessing and not tried this, so I hope I'm not wasting your time - but what about

echo "\${alignr}${image ${numpath}/1-${time:0:1}.png -p 49,20}\
\${alignr}${image ${numpath}/1-${time:1:1}.png -p 82,20}\
\${alignr}${image ${numpath}/1-${time:2:1}.png -p 123,20}\
\${alignr}${image ${numpath}/1-${time:3:1}.png -p 154,20}"

From http://conky.sourceforge.net/variables.html

Variable            Arguments () = optional           Explanation
alignr                    (num)                           Right-justify text, with space of N

Offline

#313 2016-12-17 17:35:27

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Tank's for helping,


Sorry don't work that is for conky not for a bash script.

.

Last edited by loutch (2016-12-17 17:46:12)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#314 2016-12-17 17:44:00

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

Re


1481996492.png

here second line with 7 conkys  , the 4 cpu are working great with lua's script .

the cpu total work's with conky but not the script for lamps

Ram used work great

Ram not used not so well.Normaly when it is under 1000 that must give me

[0 5 9 5] & not like here [8 5 9 5]any idea .

here ram1.sh

#!/bin/bash
## ohnonot - Mon 05 Dec 2016
gap="$1" #the gap between hours and minutes

numpath="/home/loutch/.conky/karamba/images"

mem="$(free m|grep "Mem"|awk '{printf $4}')"

echo "\${image ${numpath}/1-${mem:0:1}.png -p 24,22}\
\${image ${numpath}/1-${mem:1:1}.png -p 59,22}\
\${image ${numpath}/1-${mem:2:1}.png -p 94,22}\
\${image ${numpath}/1-${mem:3:1}.png -p 131,22}"

.

Last edited by loutch (2016-12-17 17:44:39)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#315 2016-12-17 17:55:44

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,065
Website

Re: Show us your conky

loutch wrote:
mem="$(free m|grep "Mem"|awk '{printf $4}')"

Is this in Mageia?

I think their `free` command is different, what is the full output of `free`?

This command works for me in BunsenLabs:

mem="$(free -m|awk '/-\/+/{print $3}')"

Offline

#316 2016-12-17 17:57:05

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,010

Re: Show us your conky

@ rwyarbrough

No not going to work.  ${alignc x} or ${alignr x} will work on 'text' elements in conky but images are different:

image
    <path to image> (-p x,y) (-s WxH) (-n) (-f interval)

    Renders an image from the path specified using Imlib2. Takes 4 optional arguments: a position, a size, a no-cache switch, and a cache flush interval. Changing the x,y position will move the position of the image, and changing the WxH will scale the image. If you specify the no-cache flag (-n), the image will not be cached. Alternately, you can specify the -f int switch to specify a cache flush interval for a particular image. Example: ${image /home/brenden/cheeseburger.jpg -p 20,20 -s 200x200} will render 'cheeseburger.jpg' at (20,20) scaled to 200x200 pixels. Conky does not make any attempt to adjust the position (or any other formatting) of images, they are just rendered as per the arguments passed. The only reason $image is part of the TEXT section, is to allow for runtime modifications, through $execp $lua_parse, or some other method.

bold italics mine


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#317 2016-12-17 18:03:43

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Show us your conky

free -h give result in G by me

[loutch@localhost ~]$ free -h
             total       used       free     shared    buffers     cached
Mem:          3,8G       2,3G       1,5G       174M       115M       1,1G
-/+ buffers/cache:       1,1G       2,7G
Swap:         3,9G         0B       3,9G
[loutch@localhost ~]$ free -m
             total       used       free     shared    buffers     cached
Mem:          3901       2377       1524        174        115       1108
-/+ buffers/cache:       1153       2747
Swap:         3990          0       3990

Last edited by loutch (2016-12-17 18:04:22)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#318 2016-12-17 18:11:00

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,065
Website

Re: Show us your conky

^ Sorry, I edited my post -- the "-h" has been replaced with "-m" and it should now work wink

Offline

#319 2016-12-17 18:24:13

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,065
Website

Re: Show us your conky

loutch wrote:

Ram used work great

Ram not used not so well.

Ooops, sorry loutch, I completely misread your post :8

Please ignore my last few posts.

Offline

#320 2016-12-17 19:45:21

rwyarbrough
Member
From: Mesquite, Texas
Registered: 2016-11-26
Posts: 56

Re: Show us your conky

Sector11 wrote:

${alignc x} or ${alignr x} will work on 'text' elements in conky but images are different:

Thanks,  Next time I'll TEST IT first before giving bad advice... :8

Offline

Board footer

Powered by FluxBB