SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#6826 2013-12-18 09:13:36

ragamatrix
#! Junkie
From: Earth
Registered: 2012-12-05
Posts: 286

Re: Conky v1.9 Thread

Deegan wrote:

Hi ragamatrix  wink

You can pass me the .conkyrc and  script to have this conky?

http://img12.imageshack.us/img12/244/eyy4.jpg

Thanks   big_smile

Hi Deegan;
I've upgraded my distro and lost many datas... I still have a version of what you wanted but not exactly the same... You can modify the bash script which work with convert and find other settings...ouf! dropbox save me...
Conky-Sat-Map

EDIT:This one is lighter...
conkyrc:

# -- Paramètres Conky Météo -- #
# Text alignment, other possible values are commented
alignment tr
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# -- Conky settings -- #
	background yes
	update_interval 1
	cpu_avg_samples 2
	net_avg_samples 2
	override_utf8_locale yes
	double_buffer yes
	no_buffers yes
	text_buffer_size 2048
	imlib_cache_size 0
	# -- Window specifications -- #
	own_window yes
	own_window_type normal
	own_window_transparent yes
	own_window_hints undecorate,skip_taskbar,skip_pager,below
	show_graph_range no
	show_graph_scale no
	short_units yes
	own_window_class Conky
	border_inner_margin 0
	border_outer_margin 0
# -- Graphics settings -- #
	draw_shades no
	draw_outline no
	draw_borders no
	draw_graph_borders yes
# -- Couleurs -- #
default_color 645D5D
#color1 3B6702
#color2 645D5D
    color0 Cornsilk1#FFD700#GOLD#3b6702 # vert
    color1 black
    color2 white
    color3 EFEFEF # argile
    color4 LightGoldenrod3#vert_spring#645d5d # gris foncé
    color5 7FDD4C # vert clair
    color6 CC0000 # rouge
    color7 884DA7 # mauve
    color8 6892C6 # bleu ciel 2                                      
    color9 443AFF # bleu marine
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 125
gap_y 205
# Minimum size of text area
minimum_size 305 305  #Taille minimum (px) ; largeur / hauteur
maximum_width 305  #Largeur maximum (px)
#out_to_console no
# Force UTF8? note that UTF8 support required XFT
#override_utf8_locale yes
# Stippled borders?
#stippled_borders 0
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
#total_run_times 0
# set to yes if you want all text to be in uppercase
uppercase no
# Add spaces to keep things from moving about?  This only affects certain objects.
#use_spacer no
# -- Text settings -- #
# Use Xft?
use_xft yes
xftalpha 0.8 #0.4
xftfont caviar dreams:style=Bold:size=9 #Helvetica LT Std:size=10 #MaiandraGD:size=10

TEXT

##RADAR_EUROPE
${execi 1200 ~/.conky/script/radar-ghost.sh}
${image /tmp/radar-ghost.png -p 0,0 -s 300x300 -f 60}

radar-ghost.sh:

#!/bin/bash

# Crée par JPDipsy 
# script de recupération imagesat couverture nuageuse http://www.sat24.com
# et mise en forme polaroïd imagemagick et pagecurl  doivent être installés
# ce script et le script pagecurl doivent être dans le même rep.
#----------------------------------------------------------------------------------
path=`dirname $0`
heuremodif=`date +%H`; minmodif=`date +%M`
# ce que vous voulez
fonte=White-Rabbit-Regular
nomimage=radar-ghost
tailleimage=90 # ceci est en pourcentage
tailledecoupe=450x450
rotation=0
libelle="Radar pluie infra rouge : "

wget -q -O  /tmp/$nomimage.gif "http://www.meteo-mc.fr/dedie/Images/sat/satireu1.gif"

function mise_en_forme_image {
convert  /tmp/$nomimage.png -background silver -bordercolor silver  -border 2%  -gravity South -splice 0x22 -density 150 \
-fill red3 -font $fonte  -pointsize 8 -annotate 0x10-3+13 "$libelle $heuremodif h $minmodif"   /tmp/$nomimage.png

####EFFET_GHOST####
convert /tmp/$nomimage.png -resize $tailleimage% -alpha set -virtual-pixel transparent -channel A -blur 0x8  -level 50%,100% +channel /tmp/$nomimage.png

}

function ombre {
convert   /tmp/$nomimage.png  -background  DodgerBlue1  \( +clone -shadow 60x4+2+2 \) +swap -background  none   -flatten /tmp/$nomimage.png	
}	

if [[ -e /tmp/$nomimage.gif ]] ; then
	# decoupage de la partie utile
	convert /tmp/$nomimage.gif -filter Lanczos -crop  $tailledecoupe+140+110\! /tmp/$nomimage.png
	mise_en_forme_image ; ombre ; rm /tmp/$nomimage.gif
else
	# comme ça votre conky aura toujours une image au cas ou 
	convert -size $tailledecoupe plasma:  /tmp/$nomimage.png
	libelle="Désolé pas d'image radar à "
	mise_en_forme_image ; ombre
fi

Last edited by ragamatrix (2013-12-18 10:54:49)

Offline

Help fund CrunchBang, donate to the project!

#6827 2013-12-18 13:34:20

ragamatrix
#! Junkie
From: Earth
Registered: 2012-12-05
Posts: 286

Re: Conky v1.9 Thread

ragamatrix wrote:
Deegan wrote:

Hi ragamatrix  wink

You can pass me the .conkyrc and  script to have this conky?

http://img12.imageshack.us/img12/244/eyy4.jpg

Thanks   big_smile

Hi Deegan;
I've upgraded my distro and lost many datas... I still have a version of what you wanted but not exactly the same... You can modify the bash script which work with convert and find other settings...ouf! dropbox save me...
Conky-Sat-Map

EDIT:This one is lighter...
conkyrc:

# -- Paramètres Conky Météo -- #
# Text alignment, other possible values are commented
alignment tr
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# -- Conky settings -- #
	background yes
	update_interval 1
	cpu_avg_samples 2
	net_avg_samples 2
	override_utf8_locale yes
	double_buffer yes
	no_buffers yes
	text_buffer_size 2048
	imlib_cache_size 0
	# -- Window specifications -- #
	own_window yes
	own_window_type normal
	own_window_transparent yes
	own_window_hints undecorate,skip_taskbar,skip_pager,below
	show_graph_range no
	show_graph_scale no
	short_units yes
	own_window_class Conky
	border_inner_margin 0
	border_outer_margin 0
# -- Graphics settings -- #
	draw_shades no
	draw_outline no
	draw_borders no
	draw_graph_borders yes
# -- Couleurs -- #
default_color 645D5D
#color1 3B6702
#color2 645D5D
    color0 Cornsilk1#FFD700#GOLD#3b6702 # vert
    color1 black
    color2 white
    color3 EFEFEF # argile
    color4 LightGoldenrod3#vert_spring#645d5d # gris foncé
    color5 7FDD4C # vert clair
    color6 CC0000 # rouge
    color7 884DA7 # mauve
    color8 6892C6 # bleu ciel 2                                      
    color9 443AFF # bleu marine
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 125
gap_y 205
# Minimum size of text area
minimum_size 305 305  #Taille minimum (px) ; largeur / hauteur
maximum_width 305  #Largeur maximum (px)
#out_to_console no
# Force UTF8? note that UTF8 support required XFT
#override_utf8_locale yes
# Stippled borders?
#stippled_borders 0
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
#total_run_times 0
# set to yes if you want all text to be in uppercase
uppercase no
# Add spaces to keep things from moving about?  This only affects certain objects.
#use_spacer no
# -- Text settings -- #
# Use Xft?
use_xft yes
xftalpha 0.8 #0.4
xftfont caviar dreams:style=Bold:size=9 #Helvetica LT Std:size=10 #MaiandraGD:size=10

TEXT

##RADAR_EUROPE
${execi 1200 ~/.conky/script/radar-ghost.sh}
${image /tmp/radar-ghost.png -p 0,0 -s 300x300 -f 60}

radar-ghost.sh:

#!/bin/bash

# Crée par JPDipsy 
# script de recupération imagesat couverture nuageuse http://www.sat24.com
# et mise en forme polaroïd imagemagick et pagecurl  doivent être installés
# ce script et le script pagecurl doivent être dans le même rep.
#----------------------------------------------------------------------------------
path=`dirname $0`
heuremodif=`date +%H`; minmodif=`date +%M`
# ce que vous voulez
fonte=White-Rabbit-Regular
nomimage=radar-ghost
tailleimage=90 # ceci est en pourcentage
tailledecoupe=450x450
rotation=0
libelle="Radar pluie infra rouge : "

wget -q -O  /tmp/$nomimage.gif "http://www.meteo-mc.fr/dedie/Images/sat/satireu1.gif"

function mise_en_forme_image {
convert  /tmp/$nomimage.png -background silver -bordercolor silver  -border 2%  -gravity South -splice 0x22 -density 150 \
-fill red3 -font $fonte  -pointsize 8 -annotate 0x10-3+13 "$libelle $heuremodif h $minmodif"   /tmp/$nomimage.png

####EFFET_GHOST####
convert /tmp/$nomimage.png -resize $tailleimage% -alpha set -virtual-pixel transparent -channel A -blur 0x8  -level 50%,100% +channel /tmp/$nomimage.png

}

function ombre {
convert   /tmp/$nomimage.png  -background  DodgerBlue1  \( +clone -shadow 60x4+2+2 \) +swap -background  none   -flatten /tmp/$nomimage.png	
}	

if [[ -e /tmp/$nomimage.gif ]] ; then
	# decoupage de la partie utile
	convert /tmp/$nomimage.gif -filter Lanczos -crop  $tailledecoupe+140+110\! /tmp/$nomimage.png
	mise_en_forme_image ; ombre ; rm /tmp/$nomimage.gif
else
	# comme ça votre conky aura toujours une image au cas ou 
	convert -size $tailledecoupe plasma:  /tmp/$nomimage.png
	libelle="Désolé pas d'image radar à "
	mise_en_forme_image ; ombre
fi

Well... now it's good like that:1387373151.png
Conky-Sat-2 and this one updated in signature...

Last edited by ragamatrix (2013-12-18 13:38:32)

Offline

#6828 2013-12-18 21:28:32

g33zr
#! Die Hard
From: Never Never Land
Registered: 2013-02-19
Posts: 635

Re: Conky v1.9 Thread

I might be posting this query in the wrong place, but so far, I haven't found what I'm looking for after searching this forum among other places. Perhaps, I simply missed something in the scripts I've viewed.

I have a conkly that is a combination of scripts for a couple of people. I have tweaked these to my own taste, but the text runs off the bottom of my laptop screen. As a result, I'd like to split the conky so that one part is aligned left and the second part is aligned right. If I were typesetting a page for desktop publishing, this would be easy. Unfortunately, I haven't figured out how to do this with a conky script. Advice? 8)


It's never too late to learn something new! wink

OHCG | LXer

Offline

#6829 2013-12-18 21:38:05

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: Conky v1.9 Thread

^ unfortunatly afaik you will have to split it into two conkys.
one aligned top left and the other top right.
otherwise you would have to use the whole screen for your conky and call things that are in the same line on bothe sides
with a alignment for the left one and a second for the right part (like $alignr) in the same line as well.
possibly this would mean for you to have no place left for clicking the desktop for your ob-menu when window_typ is set to normal or (as i expirienced) you will have some trouble with the compositing when set to desktop.

anyways i think it would be easier (mostly in terms of alignment and having it clean and nice) to make two conkys and call them both in autostart with (conky -c ~/.conkyleftrc && conky -c ~/.conkyrightrc) &

hope this helped! -naik

edit for typos

Last edited by Naik (2013-12-18 21:41:05)


*kaum macht man es richtig, funktioniert es sofort*

Offline

#6830 2013-12-18 21:58:05

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

@ Naik

I agree with the two conkys ... absolutely the easiest way to do this.

But disagree or have a problem with: own_window_type normal and not being able to centre-click or right-click for menus.  All my conkys use "normal" and they are all click-able under OpenBox. As seen here..  There must be something else in your conky that does not allow clicking.

From my test.conky

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title A blank test

1. - Please show your conky code.
2. - Are you running compton?
- - - I use compton and have no problems with "normal" - 'desktop' causes a shadow though.

@ Geezer

There is a Start/Stop Conky script at Conky PitStop that works for as many conkys as you want to run.  Create two conkys:
1. - alignment tr
2. - alignment tl
and you are good to go.

Post your conky if you want / need help - or just ask questions.

Last edited by Sector11 (2013-12-18 22:00:10)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6831 2013-12-19 01:32:33

g33zr
#! Die Hard
From: Never Never Land
Registered: 2013-02-19
Posts: 635

Re: Conky v1.9 Thread

^Thanks, Sector 11, this sounds like a logical approach and I'll try it out when the old squash is a bit fresher in the morning.  wink

I copied the script, tweaked it, and made it executable, but nada, so it's back to the drawing board for another try or two before I holler for help.  8)

Last edited by g33zr (2013-12-20 02:35:11)


It's never too late to learn something new! wink

OHCG | LXer

Offline

#6832 2013-12-19 05:13:18

imnotthemute
New Member
Registered: 2013-12-19
Posts: 2

Re: Conky v1.9 Thread

hello, i know it's somewhere in this forum but how can i display something like "not playing" if rhythmbox is not running, but if its running show the Artist - Song?
thanks
smile

Last edited by imnotthemute (2013-12-19 05:29:43)

Offline

#6833 2013-12-19 07:09:01

cloverskull
#! Junkie
Registered: 2013-10-26
Posts: 377

Re: Conky v1.9 Thread

imnotthemute wrote:

hello, i know it's somewhere in this forum but how can i display something like "not playing" if rhythmbox is not running, but if its running show the Artist - Song?
thanks
smile

Try something like this (not sure because I don't really use rhythmbox):

${if_running rhythmbox}
${exec /usr/bin/rhythmbox-client –no-start –no-present –print-playing}
${else}
RhythmBox song not playing!
${endif}

I haven't done much with a conditional that includes ${else} so YMMV.  Proceed hackery!

Offline

#6834 2013-12-19 14:24:52

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

cloverskull wrote:

Try something like this (not sure because I don't really use rhythmbox):

${if_running rhythmbox}
${exec /usr/bin/rhythmbox-client –no-start –no-present –print-playing}
${else}
RhythmBox song not playing!
${endif}

I haven't done much with a conditional that includes ${else} so YMMV.  Proceed hackery!

That's perfect ... except it will use multiple lines in the conky needlessly.

Try this:

${if_running rhythmbox}\
${rhythmbox commands here}
${rhythmbox commands here}
${rhythmbox commands here}\
${else}
RhythmBox song not playing!

${endif}

This will display three lines of stuff if it's running,
and three lines if not with "RhythmBox song not playing!" in the second line

This keeps the conky vertical spacing equal. That \ shorten long lines ... without them the code would be:

${if_running rhythmbox}${rhythmbox commands here}
${rhythmbox commands here}
${rhythmbox commands here}${else}

RhythmBox song not playing!

${endif}

Last edited by Sector11 (2013-12-19 14:25:30)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6835 2013-12-19 15:54:11

chepioq
#! Member
Registered: 2013-01-09
Posts: 79

Re: Conky v1.9 Thread

I have problem with my conky.
I update my Fedora to 20 release, and I have four conky on my desktop.
2 work fine and two dont work with this error message :

Segmentation fault (core dump)

the two that don't work are the two with script lua. (the two that work don't have script lua).

Conky version is 1.9.0

Any ideas ?

Offline

#6836 2013-12-19 18:32:36

electrum
Member
From: Portugal
Registered: 2013-11-20
Posts: 35

Re: Conky v1.9 Thread

Is there a way to get conky to read usb ports and print out the device connected in it to the TEXT section? i have 4 ports i want to monitor and check their connectivity when i conect something on them.
thanks

Offline

#6837 2013-12-19 18:51:24

imnotthemute
New Member
Registered: 2013-12-19
Posts: 2

Re: Conky v1.9 Thread

thank you cloverskull & Sector11 for the tips!

I got what I needed now; had some problems in the beginning if rhythmbox wasnt open the conky would open it for me (I didnt like it)
then some the problem of the setting the right function with conkyrhythmbox...

BmadW34.png / aAc8fNf.png
playing / not playing
still working on the style, colors, fonts...

Offline

#6838 2013-12-19 21:53:59

storge
Member
Registered: 2012-12-20
Posts: 17

Re: Conky v1.9 Thread

i'd post a screenshot of my conkys here, but i already posted it in the screenshot forum, so i'll just link that here.

the conky font is sofachrome.


scary times are never dull.

Offline

#6839 2013-12-20 07:56:06

colorpixel
#! CrunchBanger
From: Germany
Registered: 2013-11-06
Posts: 118

Re: Conky v1.9 Thread

Here are the configs of the conky from my screenshot
I found the conky-weather here and mod it a little bit.
This is the config for conky-time:

## conky-time-sys
own_window yes
own_window_transparent yes
own_window_class conky-semi
own_window_type override ## normal, conky, override, desktop
own_window_title conky ## conky, normal, override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
background yes
use_xft yes
xftfont sans:size=10
xftalpha 0.8
update_interval 0.5
total_run_times 0
double_buffer yes
no_buffers yes
minimum_size 270 40
maximum_width 270
maximum_length 180
alignment top_right
draw_shades no
draw_outline no
draw_borders no
gap_x 20
gap_y 20
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer none
show_graph_scale no
show_graph_range no
#text_buffer_size 1024
#colour
default_color ECEDEE
color2 21323C
short_units yes
pad_percents 3
#${voffset -35} ${voffset 25}${offset -100}

TEXT
${font K22 Plural:size=72} ${time %H:%M} ${font} ${color}
${voffset 3}
${color2} ${offset 110} ${voffset -5} ${font play:size=10} OnAir: ${uptime_short} ${font} ${color}
${color2} ${offset 5}${voffset -25} ${font K22 Plural:size=60} ${time %d} ${font} ${color}
${font play:size=16} ${offset 110} ${voffset -35} ${time %B} ${font}
${color2} ${font play:size=12} ${offset 115} ${time %A} ${font} ${color}

${offset 110} ${font play:size=10} RAM ${offset 6} $memperc% ${font}
${offset 110} ${font play:size=10} CPU ${offset 10} ${cpu cpu}%${offset 10}${cpu cpu1}% ${font}
${offset 110} ${font play:size=10} DWN ${offset 2} ${downspeedf eth0} k/s ${font}
${offset 110} ${font play:size=10} UP  ${offset 15} ${upspeedf eth0} k/s ${font}

The font used in conky-time & tint2-clock is called k22-plural


+ Where there's a shell, there's a way +

Offline

#6840 2013-12-21 17:16:41

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

chepioq wrote:

I have problem with my conky.
I update my Fedora to 20 release, and I have four conky on my desktop.
2 work fine and two dont work with this error message :

Segmentation fault (core dump)

the two that don't work are the two with script lua. (the two that work don't have script lua).

Conky version is 1.9.0

Any ideas ?

Well, it would be really helpful if you posted the conky and the lua script you are using.

Conky v1.9 but is it conky, conky-all or conky-std? I'm running 'conky-all'

 21 Dec 13 | 14:07:34 ~
    $ conky -v
Conky 1.9.0 compiled Thu May  9 16:41:29 UTC 2013 for Linux 3.2.0-4-amd64 (x86_64)

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 General:
  * math
  * hddtemp
  * portmon
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * config-output
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2
 
 21 Dec 13 | 14:07:40 ~
    $ 

you need those final three:

  * Lua

  Lua bindings:
   * Cairo
   * Imlib2

·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6841 2013-12-21 17:21:40

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

electrum wrote:

Is there a way to get conky to read usb ports and print out the device connected in it to the TEXT section? i have 4 ports i want to monitor and check their connectivity when i conect something on them.
thanks

Yes, the best way I know of is with mrpeachys "mounted.lua"  - instructions for use at the beginning of the file.

mounted.lua

--[[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}

]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
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
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

Although I haven't tested it against usb devices that have an ISO dd'd to it.  It works great with my "external HDD"

EDIT:

There is a conky command if_mounted

if_mounted 	(mountpoint)

 	if MOUNTPOINT is mounted, display everything between $if_mounted and the matching $endif 

So IF you are absolutely certain of the "mount point" ie: lets say: MTP

${hr}
${if_mounted MTP}/MTP  ${color5}${fs_size /media/MTP}${color}
   Free  ${color5}${fs_free /media/MTP}${color}
   Used  ${color5}${fs_used_perc /media/MTP} %${color}
${else}
MTP not Mntd
${endif}
${hr}

Mounted you will see something like:

---------------
/MTP  116G
   Free  10.0G
   Used  48 %
---------------

Not mounted you's see something like:

---------------

MTP Not Mntd

---------------

${else} and ${endif} on lines by themselves create the blanf spaces if not mounted keeping the vertical spacing the same.

Last edited by Sector11 (2013-12-21 17:43:51)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6842 2013-12-21 17:26:46

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

imnotthemute wrote:

thank you cloverskull & Sector11 for the tips!

I got what I needed now; had some problems in the beginning if rhythmbox wasnt open the conky would open it for me (I didnt like it)
then some the problem of the setting the right function with conkyrhythmbox...

http://i.imgur.com/BmadW34.png / http://i.imgur.com/aAc8fNf.png
playing / not playing
still working on the style, colors, fonts...

On my part you're welcome ... and I place a bet on cloverskull's part too!

Yea, conky is forever a work in progress.
It will come.  big_smile


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6843 2013-12-22 06:36:45

chepioq
#! Member
Registered: 2013-01-09
Posts: 79

Re: Conky v1.9 Thread

Sector11 wrote:
chepioq wrote:

I have problem with my conky.
I update my Fedora to 20 release, and I have four conky on my desktop.
2 work fine and two dont work with this error message :

Segmentation fault (core dump)

the two that don't work are the two with script lua. (the two that work don't have script lua).

Conky version is 1.9.0

Any ideas ?

Well, it would be really helpful if you posted the conky and the lua script you are using.

Conky v1.9 but is it conky, conky-all or conky-std? I'm running 'conky-all'

 21 Dec 13 | 14:07:34 ~
    $ conky -v
Conky 1.9.0 compiled Thu May  9 16:41:29 UTC 2013 for Linux 3.2.0-4-amd64 (x86_64)

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 General:
  * math
  * hddtemp
  * portmon
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * config-output
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2
 
 21 Dec 13 | 14:07:40 ~
    $ 

you need those final three:

  * Lua

  Lua bindings:
   * Cairo
   * Imlib2

On Fedora there is no conky-all, (policy with nvidia driver), also I compile conky with this command, to have nvidia support :

./configure --enable-nvidia --enable-curl --enable-imlib2 --enable-lua --enable-lua-imlib2 --enable-lua-cairo

That work fine with Fedora 19 but with Fedora 20 my conky with lua don't work.

I test with :

./configure  --enable-curl --enable-imlib2 --enable-lua --enable-lua-imlib2 --enable-lua-cairo

and lua work, also I use the Fedora package.

But I don't know where is the problem.

Offline

#6844 2013-12-22 10:28:25

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

You shouldn't do "--enable-lua".
It defaults to "yes" and thus should be autodetect. If after

./configure --enable-nvidia --enable-curl --enable-lua-imlib2 --enable-lua-cairo

don't report in config summary a LUA support then something is missing

Those are builddep for conky 2.0 alpha, should be more than enough for 1.9

autotools-dev libxfixes-dev file libpcre3 gcc-4.7 cpp-4.7 g++-4.7 libstdc++6-4.7-dev libxdmcp-dev locales libxft-dev libc6 libpthread-stubs0-dev libpthread-workqueue-dev pkg-config libxcb1-dev libasound2-dev libfreetype6-dev x11proto-kb-dev x11proto-damage-dev libfontconfig1-dev libglib2.0-0 libsigsegv2 libpopt0 libxext-dev libmagic1 x11proto-render-dev zlib1g-dev libxau-dev gawk libxdamage-dev libircclient-dev libmicrohttpd-dev (>= 0.9.0) libncurses5-dev libmysqlclient-dev (>= 5.3.0) liblua5.1-0-dev libtolua++5.1-dev librsvg2-dev libcairo2-dev libimlib2-dev audacious-dev libxnvctrl-dev libcurl-dev libxml2-dev libical-dev libiw-dev

Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#6845 2013-12-22 15:12:58

chepioq
#! Member
Registered: 2013-01-09
Posts: 79

Re: Conky v1.9 Thread

dk75 wrote:

You shouldn't do "--enable-lua".
It defaults to "yes" and thus should be autodetect. If after

./configure --enable-nvidia --enable-curl --enable-lua-imlib2 --enable-lua-cairo

don't report in config summary a LUA support then something is missing

Those are builddep for conky 2.0 alpha, should be more than enough for 1.9

autotools-dev libxfixes-dev file libpcre3 gcc-4.7 cpp-4.7 g++-4.7 libstdc++6-4.7-dev libxdmcp-dev locales libxft-dev libc6 libpthread-stubs0-dev libpthread-workqueue-dev pkg-config libxcb1-dev libasound2-dev libfreetype6-dev x11proto-kb-dev x11proto-damage-dev libfontconfig1-dev libglib2.0-0 libsigsegv2 libpopt0 libxext-dev libmagic1 x11proto-render-dev zlib1g-dev libxau-dev gawk libxdamage-dev libircclient-dev libmicrohttpd-dev (>= 0.9.0) libncurses5-dev libmysqlclient-dev (>= 5.3.0) liblua5.1-0-dev libtolua++5.1-dev librsvg2-dev libcairo2-dev libimlib2-dev audacious-dev libxnvctrl-dev libcurl-dev libxml2-dev libical-dev libiw-dev

I build with your code and I have lua enable :

[dominique@host-192-168-1-2 conky-1.9.0]$ conky -v
Conky 1.9.0 compiled Sun Dec 22 15:44:42 CET 2013 for Linux 3.12.5-302.fc20.x86_64 (x86_64)

Compiled in features:

System config file: /usr/local/etc/conky/conky.conf
Package library path: /usr/local/lib/conky

 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual

 Music detection:
  * MPD
  * MOC

 General:
  * math
  * hddtemp
  * portmon
  * Curl
  * nvidia
  * config-output
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Lua

  Lua bindings:
   * Cairo
   * Imlib2

But when I launch a conky with script lua inside I have this :

[dominique@host-192-168-1-2 conky-1.9.0]$ conky -c /home/dominique/.conkyrc/conky-soleil1/conkyrc
Erreur de segmentation
[dominique@host-192-168-1-2 conky-1.9.0]$

If I build without nvidia all work fine.

It's very strange, no?

Offline

#6846 2013-12-22 15:18:26

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

Uninstall everything xnvctrl, download source from nVidia that matches your driver and compile yourself.


Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

#6847 2013-12-22 16:02:33

chepioq
#! Member
Registered: 2013-01-09
Posts: 79

Re: Conky v1.9 Thread

dk75 wrote:

Uninstall everything xnvctrl, download source from nVidia that matches your driver and compile yourself.

I think it's not a good idea compile driver nvidia.

I will put a bug on rpmfusion bugzilla.

Offline

#6848 2013-12-22 16:41:18

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Thank you dk75 - way beyond my skill set, good to see you here.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6849 2013-12-22 18:01:13

Deegan
Member
From: Italy Varese
Registered: 2011-11-19
Posts: 36

Re: Conky v1.9 Thread

Thanks  #! CrunchBanger  big_smile

How come this error with conkyforecast?  sad

ekdi.png

Offline

Help fund CrunchBang, donate to the project!

#6850 2013-12-22 18:26:52

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Deegan wrote:

Thanks  #! CrunchBanger  big_smile

How come this error with conkyforecast?  sad

http://imagizer.imageshack.us/v2/640x480q90/823/ekdi.png

Conky forecast has pretty well stopped working - and unless a python coder wants to pick up where Mark lets off it will stay that way.  sad   Sites make changes ... Mark has left Linux for work related reasons so cF sits unsupported.

Check out v9000 or Teo's scripts in my sig.

Last edited by Sector11 (2013-12-22 18:27:40)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Board footer

Powered by FluxBB

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

Debian Logo