You are not logged in.

#151 2016-06-10 17:56:53

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: Show us your conky

pvsage wrote:
damo wrote:

1920 version of the Electro-conky

So this would be a clock punk/diesel punk Conky? tongue

I've got a 'steampunk' clock here thanks to EasySid a few hours with Startpage and about a week of cursing GIMP if your interested.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#152 2016-06-10 17:59:09

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: Show us your conky

@ damo re: 1920

NICE is not good enough for that.  Awesome comes close.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#153 2016-06-12 16:44:25

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 231

Re: Show us your conky

my conky wink wink

v9000.jpg

FV80  tongue


Conky a lifetime, thanks masters Obi-Wan (TEO) and Yoda (Sector11) Use Hydrogen bunsenlabs linux 8.9

Offline

#154 2016-06-13 19:29:49

wagmic
Member
From: Casablanca
Registered: 2015-09-30
Posts: 79

Re: Show us your conky

ninlith, your subsolar conky is really awesome

i have test it  an it 's just "enorme".

Raggamatrix nice to see you.


La liberté, personne ne peut l’expliquer mais tout le monde peut la comprendre.Cecilia Meireles
Tout ce qui n'est pas donné ou partagé est perdu (proverbe tsigane)

Offline

#155 2016-06-14 06:22:53

ragamatrix
Member
Registered: 2015-10-04
Posts: 411

Re: Show us your conky

wagmic wrote:

ninlith, your subsolar conky is really awesome

i have test it  an it 's just "enorme".

Raggamatrix nice to see you.

Hey hey my #!banger friend wink And yes I've chosen the bunsen side nice to see you too !

Offline

#156 2016-06-14 10:39:34

easysid
Member
Registered: 2016-01-01
Posts: 49

Re: Show us your conky

Long time no C[onky].

FrJS229m.jpg

A few things first:

1. The conkyrc uses the old 1.9 syntax. I have frozen my conky package because I do not want to spend time updating a bunch of conkys.

2. Shamelessly copied from based on this rainmeter skin

3. The visualizer is cava, running in a transparent terminal placed strategically. It is good for the screenshot, but as you can see by the cpu usage, isn't feasible.


conkyrc

# -- Conky settings -- #

background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
short_units yes
text_buffer_size 2048
imlib_cache_size 0
use_xft yes

xftfont fira sans:medium:size=14
xftalpha 0.8

own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_class Conky
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
border_inner_margin 0
border_outer_margin 0

minimum_size 1300 600
alignment tl
gap_x 50
gap_y 50

# -- Graphics settings -- #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

default_color f0f0f0
color1 454545

# -- Lua load -- #
lua_load draw_bars.lua
lua_draw_hook_post main

#at least one line (empty or not) after TEXT
TEXT
${voffset 15}${cpugraph cpu0 30,160 -l}
${voffset -40}${offset 180}${cpu cpu0}%${goto 240}CPU
${voffset -5}${goto 235}${font fira sans:medium:pixelsize=12}${freq} MHz
${font}${voffset 40}
${voffset 15}${goto 65}${memgraph 30,160}
${voffset -40}${offset 240}${memperc}%${goto 310}RAM
${voffset -5}${goto 310}${font fira sans:medium:pixelsize=12}${mem} used
${font}${voffset 40}
${voffset 15}${goto 135}${diskiograph /dev/sda1 30,160 -l}
${voffset -40}${offset 310}${fs_used_perc /}%${goto 380}/
${voffset -5}${goto 380}${font fira sans:medium:pixelsize=12}${fs_free /} free
${font}${voffset 40}
${voffset 15}${goto 205}${diskiograph /dev/sda2 30,160 -l}
${voffset -40}${offset 380}${fs_used_perc /home}%${goto 450}/home
${voffset -5}${goto 450}${font fira sans:medium:pixelsize=12}${fs_free /home} free
# Date
${font fira sans:regular:size=70}${voffset -550}
${goto 550}${time %A}${voffset -35}${font fira sans:meduim:size=35} \
${time %d}${voffset 45}${offset -40}${time %B}
# Clock
${font fira sans:regular:size=90}${voffset -10}${goto 550}${time %l}
${font fira sans:regular:size=70}${voffset -150}${goto 690}${time %M}
${font fira sans:regular:size=60}${voffset -120}${goto 840}${time %S}
${font fira sans:regular:size=30}${voffset -110}${goto 980}${time %p}
# Music
${if_mpd_playing}\
${if_match "$mpd_status" == "Paused"}${color1}${endif}\
${font fira sans:light:size=25}${voffset 100}
${goto 650}NOW ${voffset 32} ${goto 600}PLAYING ${voffset -60} ${cpubar 100,1 cpu10}
${font fira sans:light:size=20} ${voffset -120}${goto 750} ${mpd_smart 40}\
${voffset 40}${goto 750} ${mpd_album} \
${endif}

draw_bars.lua

--[[
draw_bars.lua for conky
written by easysid
Monday, 13 June 2016 21:41 IST
]]--


require 'cairo'


-- defaults for the bars. Override in settings table.
height = 65
width = 5
fill_color = {0xf0f0f0, 0.9}
base_color = {0xf0f0f0, 0.3}

-- settings table
t = {
    {
        arg = "cpu cpu0", -- conky var
        max = 100,   -- max value
        x = 220,      -- top left x
        y = 10,      -- top left y
        -- h = 60,      -- length
        -- w = 5,       -- width
        -- color = {0x223344, 1},
        -- base = {0x667788, 0.7}
    },
    {
        arg = "memperc",
        max = 100,
        x = 290,
        y = 140,
    },
    {
        arg = "fs_used_perc /",
        max = 100,
        x = 360,
        y = 270,
    },
    {
        arg = "fs_used_perc /home",
        max = 100,
        x = 430,
        y = 400,
    },
    {
        arg = "time %I",
        max = 12,
        h = 100,
        x = 660,
        y = 150,
    },
    {
        arg = "time %M",
        max = 60,
        h = 80,
        x = 810,
        y = 160,
    },
    {
        arg = "time %S",
        max = 60,
        x = 950,
        y = 170,
    },
} -- end settings table t


function conky_main()
    if conky_window == nil then return end
    local cs = cairo_xlib_surface_create(conky_window.display,
    conky_window.drawable, conky_window.visual,
    conky_window.width, conky_window.height)
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>3 then
        for i in ipairs(t) do
            draw_bars(cr,t[i])
        end --for
    end --endif
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
end --end main()

function draw_bars(cr,t)
    -- this function just draws the graphs. We put the text in the conkyrc
    -- set defaults
    local h0 = t.h or height
    local w0 = t.w or width
    local col = t.color or fill_color
    local bcol = t.base or base_color
    -- calculate
    value = tonumber(conky_parse(string.format("${%s}", t.arg)))
    if value == nil then value = 0 end
    local h1 = h0*value/t.max
    local y1 = t.y + h0 - h1
    -- draw base rectangle
    cairo_set_line_width(cr, 1)
    cairo_set_source_rgba (cr, rgba_to_r_g_b_a(bcol))
    cairo_rectangle(cr, t.x, t.y, w0, h0)
    cairo_fill(cr)
    -- draw overlay rectangle
    cairo_set_source_rgba (cr, rgba_to_r_g_b_a(col))
    cairo_rectangle(cr, t.x, y1, w0, h1)
    cairo_fill(cr)
end -- end draw_bars()

function rgba_to_r_g_b_a(tcolor)
    local color,alpha=tcolor[1],tcolor[2]
    return ((color / 0x10000) % 0x100) / 255.,
    ((color / 0x100) % 0x100) / 255., (color % 0x100) / 255., alpha
end --end rgba_to_r_g_b_a()

Offline

#157 2016-06-22 13:15:09

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: Show us your conky

How much easier is it with out cava?   Interesting full screen conky.

PS:  Careful with the "No time to C[onky]", you might get quoted  smile


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#158 2016-06-22 13:21:25

damo
....moderator....
Registered: 2015-08-20
Posts: 5,198

Re: Show us your conky

Sector11 wrote:

How much easier is it with out cava?  ...)

It won't function properly without a significant large download.
article-1332632-0C37EF36000005DC-783_224x423.jpg


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#159 2016-06-22 15:34:48

easysid
Member
Registered: 2016-01-01
Posts: 49

Re: Show us your conky

Sector11 wrote:

How much easier is it with out cava?   Interesting full screen conky.

PS:  Careful with the "No time to C[onky]", you might get quoted  smile

Without cava it's just a run of the mill conky-lua setup, with 1 second update. As easy as it gets.

Offline

#160 2016-06-22 16:17:21

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: Show us your conky

^ In other words cpu and damo's bubble powered burps are normal.  smile


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#161 2016-06-22 16:38:55

easysid
Member
Registered: 2016-01-01
Posts: 49

Re: Show us your conky

Sector11 wrote:

^ In other words cpu and damo's bubble powered burps are normal.  smile

The cpu is normal. Who knows what damo's bubble powered burps are packing with all that blending he's been doing wink

Offline

#162 2016-06-24 11:31:23

ohnonot
...again
Registered: 2015-09-29
Posts: 4,129
Website

Re: Show us your conky

every now and then i see a conky bar that has gaps in it, meaning if the value goes to zero, it doesn't draw anything.
examples:
https://forums.bunsenlabs.org/viewtopic … 597#p30597
https://forums.bunsenlabs.org/viewtopic … 950#p29950
https://forums.bunsenlabs.org/viewtopic … 808#p16808

it seems i cannot achieve that effect, there always is at least a 1px line at the bottom:
(it doesn't show so well on the cpu graphs, but disk io and net, definitely)
http://dt.iki.fi/stuff/conkygraph.png
i had a look at the linked config files, but there's nothing special in there afaics.
they're dead normal conky graphs, no lua no nothing.

i'm stumped.

here's my conky config:

#<conkyrc> 
own_window yes
own_window_transparent yes
own_window_type override
own_window_title Conky

background yes
update_interval 1

cpu_avg_samples 1
net_avg_samples 1
diskio_avg_samples 1

pad_percents 0

override_utf8_locale yes
short_units yes
double_buffer yes
no_buffers yes

text_buffer_size 2048

border_width 0
border_inner_margin 0
border_outer_margin 0

imlib_cache_size 0

minimum_size 180 950
maximum_width 180
alignment mr
gap_x 10
gap_y 0

# # Graphics settings # #
draw_outline no
draw_shades no
draw_borders no
draw_graph_borders no
default_color dddddd
color1 DDDDDD
color2 666666
default_shade_color 969696

use_xft yes
font andale mono:size=8
format_human_readable yes
use_spacer none

top_name_width 15 

TEXT
${voffset 6}${font open sans:style=condensed light:size=17}$color2$alignr C P U$font
${offset 10}${offset -1}${voffset -20}${cpugraph cpu1 40,80}$alignr${cpugraph cpu2 40,80}
${offset 10}$color1${voffset -23}${freq_g 1}GHz ${cpu cpu1}%$alignr${freq_g 2}GHz ${cpu cpu2}%
${offset 10}$color2${offset -1}${voffset -7}${cpugraph cpu3 40,80}$alignr${cpugraph cpu4 40,80}
${offset 10}$color1${voffset -23}${freq_g 3}GHz ${cpu cpu3}%$alignr${freq_g 4}GHz ${cpu cpu4}%
${offset 10}$color${voffset 8}$font${execp ~/.config/conky/sys/cpu-conky-temp.sh temp1}
${offset 10}$color${voffset -1}${execp ~/.config/conky/sys/cpu-conky-temp.sh temp2}
${offset 10}$color${voffset -1}${execp ~/.config/conky/sys/cpu-conky-temp.sh temp3}
${offset 10}${voffset 1}$color${top name 1}${color1}${alignr}${top cpu 1}%
${offset 10}${voffset -1}$color${top name 2}${color1}${alignr}${top cpu 2}%
${offset 10}${voffset -1}$color${top name 3}${color1}${alignr}${top cpu 3}%
${offset 10}${voffset -1}$color${top name 4}${color1}${alignr}${top cpu 4}%
${voffset 8}${font open sans:style=condensed light:size=17}$color2$alignr M E M$font$color
${offset 10}${voffset 2}$alignr${mem}/${memmax} - ${memperc}%
${offset 10}${voffset -1}${alignr}SWAP: $swap/$swapmax - ${swapperc}%
${offset 10}${voffset 2}${color}${top_mem name 1}${color1}${alignr}${top_mem mem 1}%
${offset 10}${voffset -1}${color}${top_mem name 2}${color1}${alignr}${top_mem mem 2}%
${offset 10}${voffset -1}${color}${top_mem name 3}${color1}${alignr}${top_mem mem 3}%
${offset 10}${voffset -1}${color}${top_mem name 4}${color1}${alignr}${top_mem mem 4}%
${offset 10}${voffset 7}${font open sans:style=condensed light:size=17}$color2$alignr I / O$font
${offset 10}${offset -1}${voffset -20}$color2${diskiograph /dev/sda 40 -l}
${offset 10}$color1${voffset -26}${font open sans:style=bold:size=10}R: ${diskio_read /dev/sda} - W: ${diskio_write /dev/sda}$font
${offset 10}${voffset 4}${top_io name 1}$alignr$color1${top_io io_perc 1}%$color
${offset 10}${voffset -1}${top_io name 2}$alignr$color1${top_io io_perc 2}%$color
${offset 10}${voffset -1}${top_io name 3}$alignr$color1${top_io io_perc 3}%$color
${offset 10}${voffset -1}${top_io name 4}$alignr$color1${top_io io_perc 4}%$color
${offset 10}$color1${font open sans:style=bold:size=9}Read:${alignr}$diskio_read
${offset 10}${voffset -2}Write:${alignr}$diskio_write
${offset 10}${voffset 5}${font open sans:style=condensed light:size=17}$color2$alignr F S$font
${offset 10}$color2${fs_bar 15 /}$color1
${offset 10}${voffset -22}root: $fs_used/$fs_size
${offset 10}${voffset 2}$color2${fs_bar 15 /home/data}$color1
${offset 10}${voffset -22}data: ${fs_used /home/data}/${fs_size /home/data}
${offset 10}${voffset 2}$color2${fs_bar 15 /home/data2}$color1
${offset 10}${voffset -22}data2: ${fs_used /home/data2}/${fs_size /home/data2}
${offset 10}${voffset 2}$color2${fs_bar 15 /home/server}$color1
${offset 10}${voffset -22}server: ${fs_used /home/server}/${fs_size /home/server}
${offset 10}${voffset 5}$if_gw${font open sans:style=condensed light:size=17}$color2$alignr N E T$color$font
${offset 10}Interface:$alignr$gw_iface
${offset 10}Internal IP:$alignr$addrs
${offset 10}${color1}DNS:$color$alignr${nameserver 0}
${offset 10}${voffset -1}$alignr${nameserver 1}
${voffset 2}${execpi 600 cat /tmp/conky-opennic-nearest}
${offset 10}${offset -1}${voffset -5}$color2${upspeedgraph eth0 40,80}$alignr${downspeedgraph eth0 40,80 990000 ff3333 -t}
${offset 10}${voffset -27}${font open sans:style=bold:size=9}${color1}Up: ${upspeed eth0}${alignr}Dn: ${downspeed eth0}
$endif${voffset -190}

Last edited by ohnonot (2016-06-25 08:30:38)

Offline

#163 2016-06-24 13:56:18

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: Show us your conky

ohnonot wrote:

i'm stumped.

Well, it's not your conky, it works (100% your code) here as expected.  There is something else in your system doing this.
  NOTES:

  • I only have a triple core AMD CPU - see CPU

  • I don't have the same FS's you have - but root works

  • I don't have "cpu-conky-temp.sh"

  • ... etc

2016_06_24_10_44_45_Scrot11.jpg

EDIT:  Please edit your post to use a thumbnail.

Last edited by Sector11 (2016-06-24 13:57:02)


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#164 2016-06-24 17:03:01

easysid
Member
Registered: 2016-01-01
Posts: 49

Re: Show us your conky

Works fine on my system too (Arch linux - conky 1.9.0-2), after making the necessary changes (removing the absent files and file systems).

Offline

#165 2016-06-24 22:52:30

ohnonot
...again
Registered: 2015-09-29
Posts: 4,129
Website

Re: Show us your conky

easysid wrote:

Works fine on my system too (Arch linux - conky 1.9.0-2), after making the necessary changes (removing the absent files and file systems).

with works, do you mean graphs don't show a 1px bottom line by default?

weird. maybe it's my conky version:

Conky 1.9.0 compiled Sat Dec 12 09:38:27 EET 2015 for Linux 4.1.13-1-lts (x86_64)

that's some aur version i needed for nvidia support. wanted to change that anyway, i don't use nvidia atm.

EDIT: S11: the filesize of the image is smaller than some of the thumbs here. i changed my desktop background to a solid color only for the scrot.

Last edited by ohnonot (2016-06-24 23:03:29)

Offline

#166 2016-06-24 23:03:55

damo
....moderator....
Registered: 2015-08-20
Posts: 5,198

Re: Show us your conky

ohnonot wrote:

.....
EDIT: S11: the filesize of the image is smaller than some of the thumbs here.

You are probably right - it is only 14KB after all, which is more important than screen size I guess. But I suppose the hope is not to encourage those who are less savvy than yourself.... sad


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#167 2016-06-25 00:26:59

bra10n
Member
Registered: 2016-06-15
Posts: 22

Re: Show us your conky

ohnonot wrote:

i'm stumped.

Hi ohnonot,

Conky will color the graph outline and will use the color called in your config file, in your example this is 666666 (from above the 'Text" line. You can also color the graph output which you have done for the downspeedgraph but have not done for the upspeedgraph. You are also 'painting' the upspeed section 666666 and with no end ${color} the consequence is conky is painting the downspeed section red, including borders.

(Suspect the reason you are not seeing borders on 4 sides of the graphs is due to the amount of (v)offset's used in a single conky)...

Otherwise you could simply do the following to get you on your way;

${color 332211}${downspeedgraph eth0 40,80 990000 ff3333 -t}${color}

HTH

Last edited by bra10n (2016-06-25 00:41:34)

Offline

#168 2016-06-25 01:16:49

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: Show us your conky

bra10n wrote:

(Suspect the reason you are not seeing borders on 4 sides of the graphs is due to the amount of (v)offset's used in a single conky)...

Above TEXT ohnonot has:

draw_graph_borders no

that's  why no borders.  He doesn't want borders nor the thin line he sees where there should be none like this


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#169 2016-06-25 08:30:04

ohnonot
...again
Registered: 2015-09-29
Posts: 4,129
Website

Re: Show us your conky

ohnonot wrote:

i'm stumped.

it must indeed be a version difference.
i tried the same config on bunsenlabs and it does not have those 1px lines on the graph's bottom.
thanks for the assistance!

Offline

#170 2016-06-25 12:57:56

voids
Member
From: paris
Registered: 2016-06-25
Posts: 58

Re: Show us your conky

CyTj8W9.png

took parts here and there for this
can't get fortune cookies to show up though


at the beginning there was darkness then came light

Offline

#171 2016-06-25 14:47:19

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: Show us your conky

${execpi 3600 fortune}

It will destroy the width of your conky though and using "fold" will make some look BAD!

 25 Jun 16 @ 11:36:33 ~
  $ fortune | fold -sw50
Very few people do anything creative after the 
age of thirty-five.  The
reason is that very few people do anything 
creative before the age of
thirty-five.
		-- Joel Hildebrand
 
 25 Jun 16 @ 11:46:54 ~
  $ fortune | fold -sw50
Whenever anyone says, "theoretically," they 
really mean, "not really."
		-- Dave Parnas
 
 25 Jun 16 @ 11:47:11 ~
  $ fortune | fold -sw50
	A novice asked the master: "In the east 
there is a great tree-structure
that men call 'Corporate Headquarters'.  It is 
bloated out of shape with
vice-presidents and accountants.  It issues a 
multitude of memos, each saying
'Go, Hence!' or 'Go, Hither!' and nobody knows 
what is meant.  Every year new
names are put onto the branches, but all to no 
avail.  How can such an
unnatural entity exist?"
	The master replies: "You perceive this 
immense structure and are
disturbed that it has no rational purpose.  Can 
you not take amusement from
its endless gyrations?  Do you not enjoy the 
untroubled ease of programming
beneath its sheltering branches?  Why are you 
bothered by its uselessness?"
		-- Geoffrey James, "The Tao of 
Programming"
 
 25 Jun 16 @ 11:47:12 ~
  $ 

BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#172 2016-07-01 07:44:31

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 920
Website

Re: Show us your conky

conky-cli/dzen2 on my panel.

out_to_console yes
background no
update_interval 2
total_run_times 0
use_spacer none

TEXT
^fg(\#B6A4AA) ^i($HOME/.config/dzcon/cat.xbm) ${uptime_short} #/
^fg(\#453C49)|#/
^fg(\#B6A4AA) ^i($HOME/.config/dzcon/diskette.xbm) ${fs_used /} ${fs_used_perc /}% #/
^fg(\#453C49)|#/
^fg(\#B6A4AA) ^i($HOME/.config/dzcon/cpu.xbm) ${cpu cpu1}% ${cpu cpu2}% #/
^fg(\#453C49)|#/
^fg(\#B6A4AA) ^i($HOME/.config/dzcon/mem.xbm) ${mem} ${memperc}% #/
^fg(\#453C49)|#/
^fg(\#7A8C73) ^i($HOME/.config/dzcon/net_up_02.xbm) ^fg(\#B6A4AA)${upspeed eth0} ${totalup eth0} #/
^fg(\#453C49)|#/
^fg(\#668099) ^i($HOME/.config/dzcon/net_down_02.xbm) ^fg(\#B6A4AA)${downspeed eth0} ${totaldown eth0} #/
^fg(\#453C49)|#/
^fg(\#B6A4AA)^ca(1,amixer set Master 1-) -^ca() #/
^fg(\#453C49)#/
^fg(\#B6A4AA) ^i($HOME/.config/dzcon/spkr_01.xbm)^ca(1,urxvt -e alsamixer) ${exec amixer get Master -M | grep -oE "[[:digit:]]*%"}^ca() #/
^fg(\#B6A4AA)^ca(1,amixer set Master 1+) +^ca() #/
^fg(\#453C49)#/
^fg(\#453C49)          #/
^fg(\#B6A4AA) ^i($HOME/.config/dzcon/clock.xbm) ^ca(1,urxvt -geometry 56x10-8+855 -e bash -c "ncal -3 && sleep 5")${time %A %d, %I:%M %p}^ca()   #/
^fg(\#914B68) ^ca(1,urxvt -e tmux)1.term^ca()#/
^fg(\#B6A4AA) ^ca(1,$HOME/.config/palemoon/palemoon)2.web^ca()#/
^fg(\#914B68) ^ca(1,spacefm)3.file^ca()#/
^fg(\#914B68) ^ca(1,$HOME/.dbeef/deadbeef)4.audio^ca()#/
#!/bin/sh

FONT='snap-7'
exec conky -d -c "./.config/dzcon/conky" | dzen2 -dock -e 'button2=;' -bg "#2A242D" -ta right -w 2000 -h 11 -x 0 -y 0 -fn $FONT &
exit 0

27-inch iMac with Retina 5K (Main) | NetBSD | Void Linux | Devuan (NetInst) | Windows 10 (LTSB)
Chuck Norris doesn't approve systemd

Offline

#173 2016-07-02 23:48:02

damo
....moderator....
Registered: 2015-08-20
Posts: 5,198

Re: Show us your conky

Conky/LUA Weather Widgets

2016-07-03-00-23-20_scrot.png

  • Instructions for getting the weather data are in 'lua-weather.sh'. (Based on bunsenweather.sh)

  • Select which ones to display, or adjust the positioning, with some simple code edits in 'lua-weather.lua'

  • The sun rotates with the time, and changes colour when it sets or rises smile

lua-weather.sh

#!/bin/bash
#
## lua-weather.sh by <damo> July 2016
## Adapted from bunsenweather.sh, which was based on ideas from 
## weatherbang.sh version 1.0, 2013 by Ryan Fantus
##
## Requires:
##          'jq' (sudo apt-get install jq);
##          API Key from http://openweathermap.org/api
##
## USAGE: Call this script from Conky with ( replace "<t>" with the update interval)
##          ${execpi <t> /path/to/lua-weather.sh [location]}


#### User configurables:  ##############################################

# Get API KEY by registering for one at http://openweathermap.org/api
api="your very long api number"

# Either set the location manually here, or by passing it as a script parameter in the Conky.
# "yourlocation" must be a name (which doesn't have spaces), or a numeric id.
#
# id's can be obtained from http://bulk.openweathermap.org/sample/city.list.json.gz
# Download and extract the json file, then simply search for an id with grep. 
#   For example:   grep "New York" city.list.json
#
# If $place is not set, then the script attempts to get a geolocation from the IP address.

place="$1"              # Get $place from script parameter.
#place="yourlocation"   # Uncomment and add name or id. NB If the name has spaces, then you must use the id.

# Choose fahrenheit/Imperial or Celcius/metric:
#metric='imperial'
metric='metric'

# data file
datafile="/path/to/weather.txt"

#########################################################################
connectiontest() {
    local -i i attempts=${1-0}
    for (( i=0; i < attempts || attempts == 0; i++ )); do
        if wget -O - 'http://ftp.debian.org/debian/README' &> /dev/null; then
            return 0
        fi
        if (( i == attempts - 1 )); then # if last attempt
            return 1
        fi
    done
}

placeholder() {
    if (( $1 == 1 )) &>/dev/null;then
        echo "No internet connection"
        echo "Weather information unavailable"
    else
        echo "No API key"
        echo "Weather information unavailable"
    fi
}

if [[ $metric == metric ]] &>/dev/null;then
    scaleT="°C"
    scaleV="m/s"
else
    scaleT="°F"
    scaleV="mph"
fi

if [[ -z "$api" ]] &>/dev/null;then
    placeholder 0 && exit 1
else
    connectiontest 10
    
    # If latlong is preferred then don't set a value for $place
    if (( $? == 0 )) &>/dev/null;then
        if [[ -z $place ]] &>/dev/null;then
            # Geolocate IP:
            ipinfo=$(curl -s ipinfo.io)
            latlong=$(echo "$ipinfo" | jq -r '.loc')
            # Parse the latitude and longitude
            lat=${latlong%,*}
            long=${latlong#*,}
            location="lat=$lat&lon=$long"
        else
            # check if numeric id, or placename is being used
            [[ ${place##*[!0-9]*} ]] &>/dev/null && location="id=$place" || location="q=$place"
        fi

        # get json data from openweathermap:
        weather=$(curl -s http://api.openweathermap.org/data/2.5/weather\?APPID=$api\&"$location"\&units=$metric)
        city=$(echo "$weather" | jq -r '.name') # In case location has spaces in the name
        weather_desc=$(echo "$weather" | jq -r '.weather[0].description')   # In case description has spaces in the name

        # load values into array:
        all=($(echo "$weather" | jq -r '.coord.lon,.coord.lat,.weather[0].main,.main.temp,.main.pressure,.main.temp_min,.main.temp_max,.wind.speed,.wind.deg,.clouds.all,.sys.sunrise,.sys.sunset'))
        #                   ARRAY INDEX  0          1          2                3          4              5              6              7           8         9           10           11

        longitude=$(printf '%06.1f' ${all[0]})
        latitude=$(printf '%+.1f' ${all[1]})
        condition="${all[2]}"
        temperature=$(printf '%+.1f%s' ${all[3]} $scaleT)
        pressure=$(printf '%.f %s' ${all[4]} mb)
        temperature_min=$(printf '%+.1f%s' ${all[5]} $scaleT)
        temperature_max=$(printf '%+.1f%s' ${all[6]} $scaleT)
        cloud_cover=$(printf '%d%s' ${all[9]} %)
        sunrise=$(date -d @${all[10]} +"%R")
        sunset=$(date -d @${all[11]} +"%R")
        description="$weather_desc"
        winddir=$(printf '%3.f%s' ${all[8]} °)
        
        winddir=${all[8]}
        echo ${winddir%.*} > "$datafile"
        windspeed=$(echo ${all[7]}*1.9 | bc)
        windspeed=$(printf '%01.1f %s' "$windspeed" "kn")
        echo "$windspeed" >> "$datafile"
        echo "$sunrise" | sed 's/://' >> "$datafile"
        echo "$sunset" | sed 's/://'>> "$datafile"
        temp_degrees=$(printf '%.1f' ${all[3]})
        echo "$temp_degrees" >> "$datafile"
        echo "$city" >> "$datafile" 
        echo "$description" >> "$datafile"

    else
        placeholder 1
    fi
fi

exit

lua-weather.lua

--[[ 
lua-weather.lua, written by <damo>, July 2016

---------------------------------------------
Use this in a conky with

    lua_load /path/to/lua-weather.lua
    lua_draw_hook_pre conky_main

In the conky, get the weather data from lua-weather.sh with

TEXT
${execi <interval> /path/to/lua-weather.sh}

---------------------------------------------]]

require 'cairo'

-- set default font
--fontface="Dustismo"
fontface="Liberation"

function conky_main()
    if conky_window==nil then return end
    cs=cairo_xlib_surface_create(conky_window.display,
                                        conky_window.drawable,
                                        conky_window.visual,
                                        conky_window.width,
                                        conky_window.height)
    cr=cairo_create(cs)
    
    xW=160      -- x pos wind dial centre
    yW=90       -- y pos wind dial centre
    radiusW=60  -- radiusW wind dial
    xT=30       -- x pos temp bar (top)
    yT=10       -- y pos temp bar (top)
    wT=6        -- width temp bar
    hT=150      -- height temp bar
    xSun=340    -- x pos sun dial centre
    ySun=90     -- y pos sun dial centre
    radiusSun=60-- radius sun dial
    datafile="/path/to/weather.txt"  -- textfile to hold lua-weather.sh output
    
    direction,windS,temperature,sunrise,sunset,loc,wx = get_vals() 

    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)

    if update_num>5 then
        draw_widgets()
    end

    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
end

--  Choose the widgets to be displayed:
function draw_widgets()
    draw_thermometer(cr,xT,yT,wT,hT)
    draw_wind_rose()
    draw_sun_ring()
end

-- read values from datafile
function get_vals()
    local path = datafile
    local file = io.open( path)
    local array = {}
    local i=0
    
    if (file) then
        -- read all contents of file into array
        for line in file:lines() do
            i=i+1
            array[i]=line
        end
        file:close()

        dir=tostring(array[1]) -- get wind direction, convert to value required
        winddir=-math.pi*(tonumber(dir))/180
        wind_speed=tostring(array[2])  -- windspeed knots
        temperature=tonumber(array[5])
        sunrise=array[3]
        sunset=array[4]
        location=array[6]
        weather=array[7]

        return winddir,wind_speed,temperature,sunrise,sunset,location,weather
    else
        print("datafile " .. datafile .. " not found")
    end
end

-- convert degree to rad 
function angle_to_position(start_angle, current_angle)
    local pos = start_angle + current_angle
    return pos * math.pi/180
end

function draw_sun_ring()
   
    local hours=os.date("%H")
    local mins=os.date("%M")
    current_time=(hours .. mins)

    mins_arc = 360/60*mins
    hours_arc = (360/24*hours + mins_arc/24) + 90
    
    start_angle = 90    -- south
    end_angle = 360
    start_arc = 0
    stop_arc = 0

    -- get times and angle position from function sun_rise_set()
    sunrise,sunset,sun_rise,sun_set = sun_rise_set()

    local border_pat=cairo_pattern_create_linear(xSun,ySun-radiusSun*1.25,xSun,ySun+radiusSun*1.25)
    
    cairo_pattern_add_color_stop_rgba(border_pat,0,1,1,0,0.3)
    cairo_pattern_add_color_stop_rgba(border_pat,0.4,0.9,0.9,0.2,0.2)
    cairo_pattern_add_color_stop_rgba(border_pat,0.55,0.9,0.2,0,0.2)
    cairo_pattern_add_color_stop_rgba(border_pat,0.7,0,0.1,1,0.3)
    cairo_set_source(cr,border_pat)
    -- draw ring, starting at south position ( = midnight/00hrs)
    cairo_arc(cr, xSun, ySun, radiusSun, angle_to_position(start_angle, 0), angle_to_position(start_angle, end_angle))
    --  set width of ring
    cairo_set_line_width(cr,radiusSun*0.06)
    cairo_stroke(cr)
    cairo_pattern_destroy (pat)

    -- draw sun
    -- get position on circumference ( = time from midnight (south), 24hr clock)
    sun_pos=angle_to_position(start_angle,hours_arc)
    local sunx=xSun - (math.sin(-sun_pos)*radiusSun)
    local suny=ySun - (math.cos(-sun_pos)*radiusSun)
    -- set colour & alpha, for day/night
    if ( tonumber(current_time) > tonumber(sunrise) ) and ( tonumber(current_time) < tonumber(sunset) ) then
        r,g,b,a = 1,1,0,0.4 --day
    else
        r,g,b,a = 0.5,0.5,0.5,0.4 --night
    end
    cairo_set_source_rgba (cr,r,g,b,a)
    cairo_arc(cr,sunx,suny,radiusSun*0.09,0,360)
    cairo_fill(cr)
    
    local r,g,b,a = 1,1,0,0.5
    cairo_set_source_rgba (cr,r,g,b,a)
    cairo_set_line_width(cr,2)
    cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND)

    -- draw sunrise mark
    local sunrise_x=xSun - (math.sin(-sun_rise)*radiusSun*1.05)
    local sunrise_y=ySun - (math.cos(-sun_rise)*radiusSun*1.05)
    local sunrise_xc=xSun - (math.sin(-sun_rise)*radiusSun*0.95)
    local sunrise_yc=ySun - (math.cos(-sun_rise)*radiusSun*0.95)
    cairo_move_to(cr,sunrise_x,sunrise_y)
    cairo_line_to(cr,sunrise_xc,sunrise_yc)
    cairo_stroke(cr)
    -- draw sunset mark
    local sunset_x=xSun - (math.sin(-sun_set)*radiusSun*1.05)
    local sunset_y=ySun - (math.cos(-sun_set)*radiusSun*1.05)
    local sunset_xc=xSun - (math.sin(-sun_set)*radiusSun*0.95)
    local sunset_yc=ySun - (math.cos(-sun_set)*radiusSun*0.95)
    local r,g,b,a = 1,0,0,0.5
    cairo_set_source_rgba (cr,r,g,b,a)
    cairo_move_to(cr,sunset_x,sunset_y)
    cairo_line_to(cr,sunset_xc,sunset_yc)
    cairo_stroke(cr)
    --  print sunrise/sunset text
    sun_text(sunrise_x,sunrise_y,sunset_x,sunset_y)
end

function sun_text(xr,yr,xs,ys)
    -- display sunrise time
    local r,g,b,a = 1,1,0,0.5
    cairo_set_source_rgba (cr,r,g,b,a)
    print_text(cr,sunrise,xr-4,yr,4,10)
    print_text(cr,"sunrise",xr-4,yr+8,4,8)
    
    -- display sunset time
    local r,g,b,a = 1,0,0,0.5
    cairo_set_source_rgba (cr,r,g,b,a)
    print_text(cr,sunset,xs,ys+10,0,10)
    print_text(cr,"sunset",xs,ys+18,0,8)
    
    -- display time
    local current_time = os.date("%H%M")
    local fontface="Dustismo"
    local r,g,b,a = 1,1,1,0.3
    cairo_set_source_rgba (cr,r,g,b,a)
    cairo_select_font_face(cr,fontface,CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_BOLD)
    cairo_set_font_size (cr,24)
    local xt,yt = position_text(cr,current_time,xSun,ySun-6,2)
    cairo_move_to (cr,xt,yt)
    cairo_show_text (cr,current_time)
    cairo_stroke (cr)
    
    -- display date
    local cal = os.date("%a %d %b")
    local fontface="Dustismo"
    local r,g,b,a = 1,1,1,0.3
    cairo_set_source_rgba (cr,r,g,b,a)
    cairo_select_font_face(cr,fontface,CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_BOLD)
    cairo_set_font_size (cr,12)
    local xt,yt = position_text(cr,cal,xSun,ySun+10,1)
    cairo_move_to (cr,xt,yt)
    cairo_show_text (cr,cal)
    cairo_stroke (cr)
    
    --  print location
    local fontface="Dustismo"
    local r,g,b,a = 1,1,1,0.4
    cairo_set_source_rgba (cr,r,g,b,a)
    cairo_select_font_face(cr,fontface,CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr,10)
    local xt,yt = position_text(cr,loc,xSun,ySun+25,1)
    cairo_move_to (cr,xt,yt)
    cairo_show_text (cr,loc)
    cairo_stroke (cr)
end

function sun_rise_set()
    sunupH = string.sub(sunrise,1,2)
    sunupM = string.sub(sunrise,3,4)
    sundownH = string.sub(sunset,1,2)
    sundownM = string.sub(sunset,3,4)

    minSR_arc = 360/60*sunupM
    hourSR_arc = (360/24*sunupH + minSR_arc/24) + 90
    pos_SR = angle_to_position(start_angle,hourSR_arc)

    minSS_arc = 360/60*sundownM
    hourSS_arc = (360/24*sundownH + minSS_arc/24) + 90
    pos_SS = angle_to_position(start_angle,hourSS_arc)

    return sunrise,sunset,pos_SR,pos_SS
end

function draw_thermometer(cr,x,y,wT,hT)
    local alpha=0.5
    HT = y+hT
    pat = cairo_pattern_create_linear (x,y,wT,HT)
    cairo_pattern_add_color_stop_rgba (pat, 1,   0,  0, 1, alpha)
    cairo_pattern_add_color_stop_rgba (pat, 0.4, 1,0.8, 0, alpha)
    cairo_pattern_add_color_stop_rgba (pat, 0.3, 1,0.3, 0, alpha)
    cairo_pattern_add_color_stop_rgba (pat, 0, 1,0, 0, alpha)

    cairo_rectangle (cr, x,y,wT,HT)
    cairo_set_source (cr, pat)
    cairo_fill (cr)
    cairo_pattern_destroy (pat)

    draw_temperature(cr,x,y,hT,temperature)
end

function draw_temperature(cr,x,y,hT,Tdegrees)
    local range=hT/100
    local zero = y + range*60
    local T = Tdegrees*range
    t = tostring(Tdegrees)
    t = ( t .. "°C" )
    cairo_set_source_rgba (cr,1,1,1,0.5)
    cairo_set_line_width(cr,1)

    for i = 0,100,10 do -- draw 10 degree marks
        local l = 3
        local xT = x-1
        if ( i == 60 ) then -- longer mark for freezing point
            xT = x-6
            l = -12
        end
        cairo_move_to (cr,xT,y)
        cairo_rel_line_to (cr,-l,0)
        cairo_stroke (cr)
        y = y + range*10
    end

    cairo_set_source_rgba (cr,1,1,1,0.5)
    cairo_set_line_width(cr,3)
    cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND)
    cairo_move_to(cr,x-1,zero-T)    -- temperature indicator
    cairo_rel_line_to(cr,10,0)

    -- temperature text
    print_text(cr,t,x+28,zero-T,1,10)
    -- zero degrees text
    print_text(cr,"0",x-12,zero,1,12)
end

function draw_wind_rose()
    draw_marks(cr,xW,yW,radiusW)
    draw_WindArrow(cr,xW,yW,50,direction,radiusW-8)
    draw_NESW(cr,xW,yW,radiusW,10)
    
    --  print windspeed
    local fontface="Dustismo"
    local r,g,b,a = 1,1,1,0.4
    cairo_set_source_rgba (cr,r,g,b,a)
    cairo_select_font_face(cr,fontface,CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_BOLD)
    cairo_set_font_size (cr,16)
    local xt,yt = position_text(cr,windS,xW,yW,2)
    cairo_move_to (cr,xt,yt)
    cairo_show_text (cr,windS)
    cairo_stroke (cr)

    --  print weather conditions
    local fontface="Dustismo"
    local r,g,b,a = 1,1,1,0.4
    cairo_set_source_rgba (cr,r,g,b,a)
    cairo_select_font_face(cr,fontface,CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr,10)
    local xt,yt = position_text(cr,wx,xW,yW+10,1)
    cairo_move_to (cr,xt,yt)
    cairo_show_text (cr,wx)
    cairo_stroke (cr)
end

function draw_WindArrow(cr,x, y, length, bearing,radiusW)
    -- startpoint x, startpoint y, length of side, compass bearing
    local head_ratio = 1.05 -- ratio of side to overall length
    local head_angle = 0.02 -- proportion 0 - 0.5 (straight, at right angle to direction)
    
    local x1=x- (math.sin(bearing)*radiusW)
    local y1=y- (math.cos(bearing)*radiusW)
    --arrow body
    local angle = bearing
    local x0 = x1 + (math.sin(angle) * length)
    local y0 = y1 + (math.cos(angle) * length)
    local xtext = x1 + (math.sin(angle) * 0.25*length)
    local ytext = y1 + (math.cos(angle) * 0.25*length)

    --arrow head left
    angle = bearing - (head_angle * math.pi)
    x2 = x0 - (math.sin(angle) * length * head_ratio)
    y2 = y0 - (math.cos(angle) * length * head_ratio)

    --arrow head right
    angle = bearing + (head_angle * math.pi)
    x3 = x0 - (math.sin(angle) * length * head_ratio)
    y3 = y0 - (math.cos(angle) * length * head_ratio)
    
    start_x=(x0+x2+x3)/3
    start_y=(y0+y2+y3)/3
    
    cairo_set_source_rgba (cr,1,1,1,0.5)
    cairo_move_to (cr,start_x,start_y)
    cairo_line_to (cr,x2,y2)
    cairo_line_to (cr,x1,y1) 
    cairo_line_to (cr,x3,y3) 
    cairo_close_path (cr)
    cairo_fill(cr)
    cairo_stroke (cr)
    
    return true
end

--  display compass points
function draw_NESW(cr,x,y,rt,font_size)
    local compass={0,90,180,270}
    local cpoints={"N","E","S","W"}
    radiusW=rt+12
    
    for i = 1,4,1 do
        compass_point=-math.pi*(tonumber(compass[i]))/180
        local x1=x - (math.sin(compass_point)*radiusW)
        local y1=y - (math.cos(compass_point)*radiusW)
        local t = cpoints[i]
        print_text(cr,t,x1,y1,1,font_size)
    end
end

--  draw compass rose graduations
function draw_marks(cr,x,y,r)
    local angle=0
    local inner=r-2
    local outer=r+2

    local r,g,b,a=1,1,1,0.5
    cairo_set_source_rgba (cr,r,g,b,a)
    cairo_set_line_width(cr, 1)

    for i = 0,36,1 do   -- draw small ticks, every 10 deg
        compass_arc=(-2*math.pi/360)*angle
        local x0 = x - (math.sin(compass_arc) * inner)
        local y0 = y - (math.cos(compass_arc) * inner)
        local endx = x - (math.sin(compass_arc) * outer)
        local endy = y - (math.cos(compass_arc) * outer)
        
        if ( (i/3) - math.floor(i/3) ~= 0 ) then -- don't draw every third tick
            cairo_move_to (cr,x0,y0)
            cairo_line_to(cr,endx,endy)
            cairo_stroke(cr)
        end
        angle=angle+10
    end
    
    angle=0 -- re-set angle
    
    for i = 0,12,1 do       -- draw large ticks, every 30 deg
        compass_arc=(-2*math.pi/360)*angle
        x0 = x - (math.sin(compass_arc) * (inner-5))
        y0 = y - (math.cos(compass_arc) * (inner-5))
        endx = x - (math.sin(compass_arc) * outer)
        endy = y - (math.cos(compass_arc) * outer)
        
        cairo_move_to (cr,x0,y0)
        cairo_line_to(cr,endx,endy)
        cairo_stroke(cr)
        angle=angle+30
    end
end

function print_text(cr,t,xT,yT,posT,font_size)
     --  align text, using text area extents
    -- posT:        0 = none
    --              1 = align both
    --              2 = horizontal
    --              3 = vertical
    --              4 = left
    cairo_set_font_size (cr,font_size)
    if ( posT == 0 ) then
        xt = xT
        yt = yT
    else
        xt,yt = position_text(cr,t,xT,yT,posT)
    end
    cairo_move_to (cr,xt,yt)
    cairo_show_text (cr,t)
    cairo_stroke (cr)
end

function position_text(cr,t,text_x,text_y,pos)
    -- adjust text position
    -- get text area (x_bearing,y_bearing,width,height,x_advance,y_advance)
    te=cairo_text_extents_t:create()
    cairo_text_extents(cr,t,te)
    xtext = text_x
    ytext = text_y
    
    if ( pos == 1 ) then    -- centre text
        xtext = text_x - te.width/2
        ytext = text_y + te.height/2
    elseif ( pos == 2 ) then    -- horizontal align
        xtext = text_x - te.width/2
    elseif ( pos == 3 ) then    -- vertical align
        ytext = text_y + te.height/2
    elseif ( pos == 4 ) then    -- set right edge of text to pos
        xtext = text_x - te.width
    end

    return xtext,ytext
end

Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#174 2016-07-04 07:36:09

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

Re: Show us your conky

@ demo

great job

is that possible to make it for Theo's 2b_wunderground_API


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#175 2016-07-04 07:47:10

damo
....moderator....
Registered: 2015-08-20
Posts: 5,198

Re: Show us your conky

loutch wrote:

...
is that possible to make it for Theo's 2b_wunderground_API

I guess you just need to feed it the relevant data - where it comes from doesn't matter.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

Board footer

Powered by FluxBB