You are not logged in.

#1276 2020-02-05 11:33:32

clusterF
Member
Registered: 2019-05-07
Posts: 520

Re: Show us your conky

^ thanks for that explanation Sector11.

I tested conky with ${desktop} on my other desktop machine that uses openbox this morning and conky was reporting correctly with openbox, but this afternoon testing now on my laptop with cwm window manager and conky reports that desktop 1 is actually desktop 2, wmctrl -d reports im indeed on desktop 1. So all i can gather is perhaps this is an interaction issue between conky and cwm. I will try to debug this myself somehow so not asking for any help here, just thought i would share my issue.

edit0: also what is strange is that ${desktop_name} reports im on "one" as it should, ${desktop_number} says "10".

edit1: Another discovery,

xdotool get_desktop

is much better solution than stringing three commands together like so..

wmctrl -d | grep "*" | awk '{print $1}'

Last edited by clusterF (2020-02-05 12:50:57)


"Ad Astra Incrementis"

git: clusterF

Offline

#1277 2020-02-05 13:24:33

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

clusterF wrote:

^ thanks for that explanation Sector11.

I tested conky with ${desktop} on my other desktop machine that uses openbox this morning and conky was reporting correctly with openbox, but this afternoon testing now on my laptop with cwm window manager and conky reports that desktop 1 is actually desktop 2, wmctrl -d reports im indeed on desktop 1. So all i can gather is perhaps this is an interaction issue between conky and cwm. I will try to debug this myself somehow so not asking for any help here, just thought i would share my issue.

edit: also what is strange is that ${desktop_name} reports im on "one" as it should, ${desktop_number} says "10".

Hmmmmmmmmmm I wonder:

Description
cwm is a stacking window manager oriented towards heavy keyboard usage,[9][10] small footprint and ease of use. While it lacks explicit virtual desktops functionality, it can be emulated by using the window groups mechanism.[11] cwm does not draw window decorations except for a 1-pixel border around windows.

grasping at straws as I know ZIP about cwm.

BUT:

wmctrl -d | grep "*" | awk '{print $1}'

will always report one number less than

${desktop}

because wmctrl starts counting desktops at 0 while ${desktop} starts counting at desktop  1

The bash script that starts my conkys, at one time I had conkys on 7 desktops:

#!/bin/bash

killall conky

# on desktop 7 = wmctrl -s 6
###############################

# on desktop 6 = wmctrl -s 5
###############################

# on desktop 5 = wmctrl -s 4
###############################

# on desktop 4 = wmctrl -s 3
###############################

# on desktop 3 = wmctrl -s 2
###############################
(sleep 0 && wmctrl -s 2 && conky -c ~/.conkyrc) &

# on desktop 2 = wmctrl -s 1
###############################
(sleep 1 && wmctrl -s 1 && conky -c /media/5/Conky/S11_Rem_Cal.conky) &
(sleep 1 && wmctrl -s 1 && conky -c /media/5/Conky/S11_Dates.conky) &

# on desktop 1 = wmctrl -s 0
###############################
(sleep 2 && wmctrl -s 0 && conky -c /media/5/Conky/time.conky) &
(sleep 2 && wmctrl -s 0 && conky -c /media/5/Conky/S11_thin_r2_side.conky) &
(sleep 2 && wmctrl -s 0 && conky -c /media/5/Conky/S11_thin_l2_side.conky) &
(sleep 2 && wmctrl -s 0 && conky -c /media/5/Conky/S11_Rem_Today.conky) &
(sleep 2 && wmctrl -s 0 && conky -c /media/5/Conky/S11_DateTime_br.conky) &
(sleep 2 && wmctrl -s 0 && conky -c /media/5/Conky/S11_Email_0.conky) &

# on all desktops
##########################
(sleep 2 && wmctrl -s 0 && conky -c /media/5/Conky/Eagle.conky) &

Try this make a test conky with just this line below TEXT section:

Desktop: ${desktop_name}, is number ${desktop} of ${desktop_number}

And in the test conky: change "override" to "normal" as seen below ...
Run the test conky in let's say top-left corner of your screen for a couple of days below your "not really a "panel conky"

I just noticed something you are NOT running a panel conky.  You are running an "override" one line conky:

own_window_colour = '4a4e4d',
own_window_type = 'override',
own_window_transparent = false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',

and further more with

own_window_type = 'override',

this line is useless:

own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',

Again the man page ... reformatted S11 but I did not change the content:

own_window_type

if own_window is yes, you may specify type
- normal, (default: normal)
- desktop,
- dock,
- panel (S11 - see PANEL below), or
- override (S11 - see OVERRIDE below)

NOTE BY S11:  You chose override vs panel or normal

Desktop windows are special windows that
- have no window decorations;
- are always visible on your desktop;
- do not appear in  your  pager or  taskbar;  and
-  are  sticky  across  all workspaces.

PANEL windows reserve space along a desktop edge, just like panels and taskbars, preventing maximized windows from overlapping them. The edge is chosen based on  the  alignment option.

OVERRIDE windows are not under the control of the window manager.
- Hints are ignored.
- - NOTE S11: so "own_window_hints" are ignored.
- This type of window can be useful for certain situations.

Last edited by Sector11 (2020-02-05 13:25:46)


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1278 2020-02-05 13:49:40

clusterF
Member
Registered: 2019-05-07
Posts: 520

Re: Show us your conky

Thanks sector11, i think it is just cwm not playing well with conky in the format im trying to use it in.

"own_window_type =" no matter what string i use has no effect in cwm as far as i can tell.

you are right about "own_window_hints =" from testing i do need this line but only with "sticky" so it appears on all desktops, otherwise all other configuration is done via cwmrc to allow for conky.

as it stands your suggestion to run

Desktop: ${desktop_name}, is number ${desktop} of ${desktop_number}

reads "Desktop: one, is 2 of 10"


interestingly wmctrl -d reports below output.

0  - DG: 1366x768  VP: N/A  WA: 0,19 1366x749  nogroup
1  * DG: 1366x768  VP: 0,0  WA: 0,19 1366x749  one
2  - DG: 1366x768  VP: N/A  WA: 0,19 1366x749  two
3  - DG: 1366x768  VP: N/A  WA: 0,19 1366x749  three
4  - DG: 1366x768  VP: N/A  WA: 0,19 1366x749  four
5  - DG: 1366x768  VP: N/A  WA: 0,19 1366x749  five
6  - DG: 1366x768  VP: N/A  WA: 0,19 1366x749  six
7  - DG: 1366x768  VP: N/A  WA: 0,19 1366x749  seven
8  - DG: 1366x768  VP: N/A  WA: 0,19 1366x749  eight
9  - DG: 1366x768  VP: N/A  WA: 0,19 1366x749  nine

Cheers

Last edited by clusterF (2020-02-05 13:57:29)


"Ad Astra Incrementis"

git: clusterF

Offline

#1279 2020-02-05 15:22:45

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,169

Re: Show us your conky

clusterF wrote:

Thanks sector11, i think it is just cwm not playing well with conky in the format im trying to use it in.

Mostly because of this:

Sector11 wrote:

While it lacks explicit virtual desktops functionality, it can be emulated by using the window groups mechanism.[11]

If you haven't seen it, this is a good explanation of using groups as virtual desktops: Getting started with cwm

And here is an interesting post of using a script to display the cwm window groups - Conky as status bar in cwm

Follow the link to the reddit page and there is an image of the conky and links to the author's dotfiles.


You must unlearn what you have learned.
    -- yoda

Offline

#1280 2020-02-05 17:33:44

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

OK, we have it down to "cwm" not liking ${desktop} in conky.

I which case ... cF stick with this:

${exec wmctrl -d | grep "*" | awk '{print $1}'}  \

for one conky it will not hurt you.  big_smile

Also if this was me ... I'd use:

own_window yes
own_window_type normal
own_window_hints sticky,undecorated #skip_taskbar,skip_pager,below

simply because I like to 'control things' a bit


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1281 2020-02-05 17:58:54

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

PackRat wrote:

If you haven't seen it, this is a good explanation of using groups as virtual desktops: Getting started with cwm

And here is an interesting post of using a script to display the cwm window groups - Conky as status bar in cwm

Follow the link to the reddit page and there is an image of the conky and links to the author's dotfiles.

All new to me.  Did not see ${desktop} in there though  big_smile
Thank you PackRat


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1282 2020-02-05 21:27:14

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,169

Re: Show us your conky

Sector11 wrote:

OK, we have it down to "cwm" not liking ${desktop} in conky.

I which case ... cF stick with this:

${exec wmctrl -d | grep "*" | awk '{print $1}'}  \

for one conky it will not hurt you.  big_smile

Also if this was me ... I'd use:

own_window yes
own_window_type normal
own_window_hints sticky,undecorated #skip_taskbar,skip_pager,below

simply because I like to 'control things' a bit

@S11 @clusterF - what is the output of just this command:

wmctrl -d | grep "*"

if I'm not mistaken, the last number in that line is the recalculated desktop number. So changing:

wmctrl -d | grep "*" | awk '{print $1}'

to

wmctrl -d | grep "*" | awk '{print $10}'       # yours might not be 10

will give you the desktop number starting with "1"  -- although not sure that will be what you'll want with cwm.

screenshots, fluxbox example:

February-1580937645-1920x1080.png

February-1580937727-1920x1080.png

Last edited by PackRat (2020-02-05 21:28:45)


You must unlearn what you have learned.
    -- yoda

Offline

#1283 2020-02-05 22:22:37

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

OpenBox only

Moving my terminal through the four desktops

 05 Feb 20 @ 19:15:16 ~
   $ wmctrl -d | grep "*"
0  * DG: 1920x1080  VP: 0,0  WA: 2,2 1916x1052  SR-71
 
 05 Feb 20 @ 19:15:19 ~
   $ wmctrl -d | grep "*"
1  * DG: 1920x1080  VP: 0,0  WA: 2,2 1916x1052  SR-72
 
 05 Feb 20 @ 19:15:35 ~
   $ wmctrl -d | grep "*"
2  * DG: 1920x1080  VP: 0,0  WA: 2,2 1916x1052  SR-73
 
 05 Feb 20 @ 19:15:43 ~
   $ wmctrl -d | grep "*"
3  * DG: 1920x1080  VP: 0,0  WA: 2,2 1916x1052  SR-74
 
 05 Feb 20 @ 19:15:49 ~
   $ 

and from Desktop1

 
 05 Feb 20 @ 19:20:05 ~
   $ wmctrl -d | grep "*" | awk '{print $1}'
0
 
 05 Feb 20 @ 19:20:17 ~
   $ wmctrl -d | grep "*" | awk '{print $2}'
*
 
 05 Feb 20 @ 19:20:25 ~
   $ wmctrl -d | grep "*" | awk '{print $3}'
DG:
 
 05 Feb 20 @ 19:20:31 ~
   $ wmctrl -d | grep "*" | awk '{print $4}'
1920x1080
 
 05 Feb 20 @ 19:20:36 ~
   $ wmctrl -d | grep "*" | awk '{print $5}'
VP:
 
 05 Feb 20 @ 19:20:42 ~
   $ wmctrl -d | grep "*" | awk '{print $6}'
0,0
 
 05 Feb 20 @ 19:20:47 ~
   $ wmctrl -d | grep "*" | awk '{print $7}'
WA:
 
 05 Feb 20 @ 19:20:52 ~
   $ wmctrl -d | grep "*" | awk '{print $8}'
2,2
 
 05 Feb 20 @ 19:20:58 ~
   $ wmctrl -d | grep "*" | awk '{print $9}'
1916x1052
 
 05 Feb 20 @ 19:21:03 ~
   $ wmctrl -d | grep "*" | awk '{print $10}'
SR-71
 
 05 Feb 20 @ 19:21:09 ~
   $ 

EDIT 1:  @PackRat

Did you give your desktops "names" - if not I'd bet that "1" you get is a default for the name.

EDIT 2: From the wmctrl man page:

ARGUMENTS
<DESK>
A Desktop is always specified by an integer which represents the desktop numbers. Desktop numbers start at 0.

Last edited by Sector11 (2020-02-05 22:34:02)


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1284 2020-02-05 22:23:16

clusterF
Member
Registered: 2019-05-07
Posts: 520

Re: Show us your conky

^ will get back to you later on today when im back in front of the laptop.

edit: i think i will just stick with conky exec command, cpu usage is minimal.

${exec xdotool get_desktop}

Last edited by clusterF (2020-02-06 11:04:30)


"Ad Astra Incrementis"

git: clusterF

Offline

#1285 2020-02-06 08:09:30

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

Re: Show us your conky

Hello

@ Théo

i have this

qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep artist
   "artist" : "Pseudo Echo",

& this

qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep title
   "title" : "Funky Town",

it's right but script don't work


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

#1286 2020-02-06 15:10:18

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

clusterF wrote:

^ will get back to you later on today when im back in front of the laptop.

edit: i think i will just stick with conky exec command, cpu usage is minimal.

${exec xdotool get_desktop}


Yup, like I said, if it's a cwm problem whatever works.

Does that command report a 1 for desktop 1 in cwm?

It acts like wmctrl for me.

Nice find though no grep|awk needed.  :D

 06 Feb 20 @ 12:08:49 ~
   $ wmctrl -d | grep "*" | awk '{print $1}'
0
 
 06 Feb 20 @ 12:08:51 ~
   $ xdotool get_desktop
0
 
 06 Feb 20 @ 12:09:03 ~
   $ 

The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1287 2020-02-07 14:33:14

clusterF
Member
Registered: 2019-05-07
Posts: 520

Re: Show us your conky

Sector11 wrote:

Yup, like I said, if it's a cwm problem whatever works.

Does that command report a 1 for desktop 1 in cwm?

yes it does.


"Ad Astra Incrementis"

git: clusterF

Offline

#1288 2020-02-07 18:33:14

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

AHA! <<--- If it ain't broke, don't fix it, keep it!

It is obviously a cwm "feature".

As Yoda would say:

Use the feature cF, use the feature.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1289 2020-02-12 22:42:14

manuel-909
Member
Registered: 2017-10-09
Posts: 83

Re: Show us your conky

loutch radiotray-ng script start working again..
chears .. :>)

Offline

#1290 2020-02-19 15:14:02

unklar
Member
Registered: 2015-10-31
Posts: 1,027

Re: Show us your conky

manuel-909 wrote:

loutch radiotray-ng script start working again..
chears .. :>)

Unfortunately not here   monkey

Offline

#1291 2020-02-19 15:22:39

unklar
Member
Registered: 2015-10-31
Posts: 1,027

Re: Show us your conky

There's some Conky to share.  smile

I want to start with these two:

upstairs for a line

-- pkill -xf "conky -c /home/unklar/S11/cmus_senk10" &
-- @unklar 2020-02-10

conky.config = {
	use_xft = true,
--xftfont Input Mono:size=8
--xftfont monofur:size=9
--xftfont monospace:size=8
--xftfont DejaVu Sans Mono:size=8.5
	font = 'Hack-Regular:size=8',
	xftalpha = 0.8,
	text_buffer_size = 2048,

	update_interval = 1,

	total_run_times = 0,

	own_window = true,
	own_window_transparent = true,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',--sticky,
	own_window_argb_visual = true,
--own_window_argb_value 150

--default_bar_size 0 5
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	stippled_borders = 0,
--border_inner margin 5
	border_width = 1,

	default_color = '#ffffff',
--default_shade_color 000000
--default_outline_color ffffff
--own_window_colour 333333
	color1 = '#66FFFF',

	alignment = 'top_left',
--alignment top_right
--alignment bottom_left
--alignment bottom_right
--alignment middle_right
	minimum_width = 1900, minimum_height = 10,
	maximum_width = 1900,
	gap_x = 10,
	gap_y = 10,

	double_buffer = true,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	net_avg_samples = 2,
	override_utf8_locale = true,
	use_spacer = 'none',
	imlib_cache_size = 0,
-----LUA---#
	lua_load = '~/TEST/loutch/draw_bg.lua',
	lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.55',

};

conky.text = [[
${image $HOME/Pictures/logo-bunsenlabs.png -p 0,0 -s 16x16}${goto 25}${nodename} | ${kernel} \
${goto 200}|| Weather: ${font DejaVu Sans:size=8}${texeci 1200 curl -s 'wttr.in/lichtenstein_sachsen?format=+%c+%t+%w+%P+%h+%m'}${font}\
${goto 520}|| £ ${execi 1200 curl gbp.rate.sx/1eur?TFq -s | cut -c1-7}  € ${execi 1200 curl eur.rate.sx/1gbp?TFq -s | cut -c1-7}\
${goto 680}|| System: ${cpu cpu0} | ${cpu cpu1} | ${cpu cpu2} | ${cpu cpu3}\
${goto 860}| Entropy: ${entropy_avail} / ${entropy_poolsize} - ${entropy_perc} %\
${goto 1050}| GPU Temp: ${hwmon 2 temp 1}°\
${goto 1150}| root: ${fs_free /root} / ${fs_size /root}\
${goto 1320}| RAM: ${memperc} %\
${goto 1400}| load: ${loadavg}\
${goto 1560}|| Net  Up: ${upspeedf enp2s0}\
${goto 1670} DL: ${downspeedf enp2s0}\
${goto 1750}|| Boot: ${execi 86400 who -b | cut -c23-} 
]];

The archive of the second Conky is here:
It's a bit bigger because I packed three different sized background images (1920x1080; 1920x1200; 2560x1600).
2020-02-09-14-17-02_scrot.th.png

Offline

#1292 2020-02-19 15:33:22

unklar
Member
Registered: 2015-10-31
Posts: 1,027

Re: Show us your conky

The modified lua clock.
2020-02-04-21-10-43_scrot.png
It consists of three lua scripts and three text files.
You can find the archive here with the Poky font.

UPDATE
2020-02-26-14-58-06_scrot.png 2020-02-26-14-59-30_scrot.png

Now the available updates of the OS are displayed.
If they are available, the number of packages is shown flashing red to the user's attention.

I have revised the "Theme1"-conky for this. To check for available updates you need the package of the terminal based package manager "aptitude".

The archive above has been updated.

Last edited by unklar (2020-02-26 15:42:16)

Offline

#1293 2020-02-19 15:41:13

unklar
Member
Registered: 2015-10-31
Posts: 1,027

Re: Show us your conky

And finally (for now), Teo's Wunderground weather as I like it   big_smile
2020-01-31-15-59-49_scrot.th.png

--https://forums.bunsenlabs.org/viewtopic.php?pid=2121#p2121
-- pkill -xf "conky -c $HOME/WuPix/wu_pixconkyrc10" &
-- Works perfect: Thu 29 Oct 2015 Sector11 with accuweather modify unklar 15.01.2016
-- modify unklar 2020-02-01 with Wunderground_conky_script
conky.config = {
own_window = true,
own_window_type = 'normal',
own_window_transparent = true, --false,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
--  own_window_colour = '#000000',
--  own_window_class = 'Conky',
--  own_window_title = 'Teo's WUweather',
own_window_argb_visual = true,
--  own_window_argb_value = 120,

minimum_width = 90, minimum_height = 00,  -- w|h
maximum_width = 90,

gap_x = 10, -- l|r
gap_y = 10,  -- u|d

alignment = 'top_right', --left',

use_xft = true,
font = 'monofur:bold:size=9',
xftalpha = 1,
override_utf8_locale = true,

draw_shades = true,
default_shade_color = '000000',
draw_outline = false,
default_outline_color = '000000',

default_color = 'DCDCDC', --Gainsboro
color0 = 'A9A9A9', --DarkGray
color1 = '778899', --LightSlateGray
color2 = 'F5F5DC', --Beige
color3 = '87CEFA', --LightSkyBlue
color4 = '48D1CC', --MediumTurquoise
color5 = 'FFDEAD', --NavajoWhite
color6 = '00BFFF', --DeepSkyBlue
color7 = 'B0E0E6', --PowderBlue
color8 = 'FFD700', --Gold
color9 = 'FFA07A', --LightSalmon

border_inner_margin = 5,
border_outer_margin = 0,

background = true,
use_spacer = 'none',
no_buffers = true,
imlib_cache_size = 0,
double_buffer = true,

update_interval = 2, --0.5

lua_load = '~/WuPix/script/draw_bg.lua',
lua_draw_hook_pre = 'draw_bg 10 0 0 0 0 0x000000 0.55',

};
conky.text = [[
${texeci 1000 bash $HOME/Wunderground_conky_script/wunderground}
${goto 20}${color5}Current
${color9}${texeci 1200 sed -n '52p' $HOME/Wunderground_conky_script/curr_cond}°${color}\
${image $HOME/Wunderground_conky_script/Forecast_Images/current.png -p 15,28 -s 55x55}


${goto 70}${color8}±${texeci 1200 sed -n '58p' $HOME/Wunderground_conky_script/curr_cond}°${color}
${texeci 1200 sed -n '26p' $HOME/Wunderground_conky_script/curr_cond} mb
${color8}${texeci 1200 sed -n '34p' $HOME/Wunderground_conky_script/curr_cond}${color}
UVI ${texeci 1200 sed -n '72p' $HOME/Wunderground_conky_script/curr_cond}
HUM ${texeci 1200 sed -n '36p' $HOME/Wunderground_conky_script/curr_cond} %
DP  ${texeci 1200 sed -n '56p' $HOME/Wunderground_conky_script/curr_cond}°
Wind ${texeci 1200 sed -n '82p' $HOME/Wunderground_conky_script/curr_cond}
@ ${texeci 1200 sed -n '86p' $HOME/Wunderground_conky_script/curr_cond} km/h
Vis ${texeci 1200 sed -n '78p' $HOME/Wunderground_conky_script/curr_cond} km
Ceil ${texeci 1200 sed -n '2p' $HOME/Wunderground_conky_script/curr_cond} m  
Prec ${texeci 1200 sed -n '22p' $HOME/Wunderground_conky_script/curr_cond} mm
ClCov ${texeci 1200 sed -n '55p' $HOME/Wunderground_conky_script/hourly} %
${font monofur:size=8}${texeci 1200 sed -n '1p' $HOME/Wunderground_conky_script/aktualisiert}${font}
${membar 1}
${goto 20}${color7}Mondphase
${image $HOME/Wunderground_conky_script/Forecast_Images/Moon_phase.png -p 30,265 -s 30x30}


${texeci 1200 sed -n '1p' $HOME/Wunderground_conky_script/moon_data}${color}
${membar 1}
${goto 15}${color8}Next 12 hours${color}
${goto 5}${tztime GMT-2 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h1.png -p 35,345 -s 30x30}
${goto 70}${texeci 1200 sed -n '7p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-3 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h2.png -p 35,400 -s 30x30}
${goto 70}${texeci 1200 sed -n '80p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-4 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h3.png -p 35,450 -s 30x30}
${goto 70}${texeci 1200 sed -n '153p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-5 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h4.png -p 35,502 -s 30x30}
${goto 70}${texeci 1200 sed -n '226p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-6 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h5.png -p 35,552 -s 30x30}
${goto 70}${texeci 1200 sed -n '299p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-7 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h6.png -p 35,605 -s 30x30}
${goto 70}${texeci 1200 sed -n '372p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-8 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h7.png -p 35,657 -s 30x30}
${goto 70}${texeci 1200 sed -n '445p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-9 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h8.png -p 35,712 -s 30x30}
${goto 70}${texeci 1200 sed -n '518p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-10 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h9.png -p 35,762 -s 30x30}
${goto 70}${texeci 1200 sed -n '591p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-11 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h10.png -p 35,812 -s 30x30}
${goto 70}${texeci 1200 sed -n '664p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-12 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h11.png -p 35,868 -s 30x30}
${goto 70}${texeci 1200 sed -n '737p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${goto 5}${tztime GMT-13 %H} h
${image $HOME/Wunderground_conky_script/Forecast_Images/h12.png -p 35,918 -s 30x30}
${goto 70}${texeci 1200 sed -n '810p' $HOME/Wunderground_conky_script/hourly}°
${membar 0}
${alignc}${font monofur:size=8}${cpu cpu1} | ${cpu cpu2} | ${cpu cpu3} | ${cpu cpu4}${font}
]];

Have fun

Last edited by unklar (2020-02-19 15:44:13)

Offline

#1294 2020-02-20 17:51:03

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

VERY NICE unklar!  Love them all.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1295 2020-02-20 18:57:19

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

A long time ago kaivalagi wrote a bunch of python scripts for conky.  The most popular back then being conkyForecast and conkyEmail pulling up a close second.

conkyForcast died first as weather.com changed how they do things.  Just ask Teo about weather sites changing things.

Another he bundled up, conkyMisc, had six little scripts in it:

conkyText - provides formatted output from a delimited text file
conkyLatLong - provides latitude/longtitude co-ordinates based on your IP address
conkyDateDiff - provides a difference in time between now/a date to another date#
conkyDatetimeDiff - provides a difference in time between now/a datetime to another datetime with varying input and output formatting
conkyDaysDiff - provides a difference in days between now/a date to another date
conkySlideshow - provides a locally stored image on each call based on an input file of image URLs.

and when "python-central" was dropped  by Debian, which was a dependency for these scripts in a dist-upgrade, I grabbed the .deb file from the, then, old-stable page.  "gdebi"ed it into my system without a hitch.  Until "buster" when a python-central "dependency" issue bricked them.

So I lost my conky that kept track of DateDiff and DaysDiff stuff..

A little while back I asked a question in the "Remind Fans List" I belong to, to see if remind could do what I wanted for the conky.   Well short answer is: it can but is a programming nightmare.  IE: Nope!

But one Remind Fan put me on to a nice little utility in our repos: dateutils

My conky is back, here's my test conky showing how this works:
2020-02-20-144357-S11.jpg

And the code needed to do it:

${color9}${swapbar 0}${color}
Birthday:
pre_exec conkyDateDiff 19490512
pre_exec conkyDaysDiff 19490512

  S11  12-05-49: ${pre_exec dateutils.ddiff 1949-05-12 'today' -f '%yy %mm %dd'}
       12-05-49: ${pre_exec dateutils.ddiff 1949-05-12 'today' -f '%y yrs'}
       12-05-49: ${pre_exec dateutils.ddiff 1949-05-12 'today' -f '%m mnths'}
       12-05-49: ${pre_exec dateutils.ddiff 1949-05-12 'today' -f '%w weeks'}
       12-05-49: ${pre_exec dateutils.ddiff 1949-05-12 'today' -f '%d days'}}

00-01-01 to 21/07/17 ${pre_exec dateutils.ddiff 2000-01-01 2021-07-17 -f '%d days'}
 ----
 (past: -date/time)
 Christmas past = 2019
 Xmas ${pre_exec dateutils.ddiff 'today' 2019-12-25 -f '%yy %mm %dd'}
 Xmas ${pre_exec dateutils.ddiff 'today' 2019-12-25 -f '%yy %ww %dd'}
 Xmas ${pre_exec dateutils.ddiff 'today' 2019-12-25 -f '%d days'}
 Christmas next = 2020
 Xmas ${pre_exec dateutils.ddiff 'today' 2020-12-25 -f '%yy %mm %dd'}
 Xmas ${pre_exec dateutils.ddiff 'today' 2020-12-25 -f '%yy %ww %dd'}
 Xmas ${pre_exec dateutils.ddiff 'today' 2020-12-25 -f '%d days'}
 Christmas future = 2021
 Xmas ${pre_exec dateutils.ddiff 'today' 2021-12-25 -f '%yy %mm %dd'}
 Xmas ${pre_exec dateutils.ddiff 'today' 2021-12-25 -f '%yy %ww %dd'}
 Xmas ${pre_exec dateutils.ddiff 'today' 2021-12-25 -f '%d days'}
${color9}${swapbar 0}${color}

Easier to use, but now defunct:

pre_exec conkyDateDiff 19490512
pre_exec conkyDaysDiff 19490512
man dateutils

tells you to check out

info dateutils

Trust me do it.

Seems other distros can use "ddiff" alone while Debian 10 wants: "dateutil.ddiff"

There are a LOT more things you can to with dateutils - check out: info dateutils

man page = 49 lines
info page = 1930 lines


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1296 2020-02-21 06:01:29

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

Re: Show us your conky

Sector11 wrote:
dateutils

Very nice!

dateadd
dateconv
datediff
dategrep
dateround
dateseq
datesort
datetest
datezone
strptime

Offline

#1297 2020-02-21 13:20:43

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

Thank you.

Did you try those commands?
Do they work for you?

If you can use datediff by itself go for it.

   $ datediff today 2042-02-29 -f '%yy %ww %dd'

The first person that told me about dateutils used exactly what the man dateutils page said to use, good for him:

	ddiff today 2042-02-29 -f '%yy %ww %dd'

yields the result:

	22y 1w 2d

man dateutils says (snipping out non-essentiatls for this post):

COMMANDS
       dadd(1)
           Add durations to dates or times
       dconv(1)
           Convert dates between calendars or time zones
       ddiff(1)
           Compute durations between dates and times
       dgrep(1)
           Find date or time matches in input stream
       dround(1)
           Round dates or times to designated values
       dseq(1)
           Generate sequences of dates or times
       dtest(1)
           Compare dates or times
       strptime(1)
           Command line version of the C function

It does not work here and it was a Debian user that told me how to use it on Debian.

In general, you can use dpkg-query to find out what files an installed deb
package provides:

    $ dpkg-query -L dateutils
    ...
    /usr/bin/dateutils.dadd
    /usr/bin/dateutils.dconv
    /usr/bin/dateutils.ddiff
    /usr/bin/dateutils.dgrep
    /usr/bin/dateutils.dround
    ...

So it looks like Debian installs the binaries with a special prefix.

So I checked in with: dpkg-query -L dateutils

   $ dpkg-query -L dateutils
{snip}
/usr/bin/dateutils.dadd
/usr/bin/dateutils.dconv
/usr/bin/dateutils.ddiff
/usr/bin/dateutils.dgrep
/usr/bin/dateutils.dround
/usr/bin/dateutils.dseq
/usr/bin/dateutils.dsort
/usr/bin/dateutils.dtest
/usr/bin/dateutils.dzone
/usr/bin/dateutils.strptime
{snip}

YUP! I got the prefix with what the man pages say to use.

even though "info dateutils" talks about the commands you mention:

* Menu:

* Introduction::        Motivation, background, etc.
* Calendars::           Calendar concepts and format specs
* Format specifiers and units:: How to control input and output
* Localised input and output::  Date/times specific to regions
* Algorithms::          Some notes on the algorithms used
* dateadd::             Add durations to dates or times
* dateconv::            Convert dates between calendars or time zones
* datediff::            Compute durations between dates and times
* dategrep::            Find date or time matches in input stream
* dateround::           Round dates or times to designated values
* dateseq::             Generate sequences of dates or times
* datesort::            Sort the contents of files chronologically
* datetest::            Compare dates or times
* datezone::            Convert date/times to timezones in bulk
* strptime::            Command line version of the C function

What does and doesn't work here:

 21 Feb 20 @ 10:13:43 ~
   $ ddiff today 2042-02-29 -f '%yy %ww %dd'
bash: ddiff: command not found
 
 21 Feb 20 @ 10:13:48 ~
   $ datediff today 2042-02-29 -f '%yy %ww %dd'
bash: datediff: command not found
 
 21 Feb 20 @ 10:13:55 ~
   $ dateutils.datediff today 2042-02-29 -f '%yy %ww %dd'
bash: dateutils.datediff: command not found
 
 21 Feb 20 @ 10:14:08 ~
   $ dateutils.ddiff today 2042-02-29 -f '%yy %ww %dd'
22y 1w 0d

The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1298 2020-02-21 16:38:07

unklar
Member
Registered: 2015-10-31
Posts: 1,027

Re: Show us your conky

Sector^ wrote:

VERY NICE unklar!  Love them all.

Thanks my friend, all learned from you  angel

On the subject:
where did you get the -f option ?
With me still a hyphen - is displayed

dateutils.ddiff today 1950-02-08 -f '%y %m %d'
-70 0 13

dateutils.ddiff today 1950-02-08 f '%y %m %d'
-25580
ddiff: cannot make sense of `f' using the given input formats
ddiff: cannot make sense of `%y %m %d' using the given input formats

dateutils.ddiff today 1950-02-08 -f '%yy %mm %dd'
-70y 0m 13d

For comparison

conkyDateDiff 19500208
70 yrs 13 days

conkyDaysDiff 19500208
25580

Aha, if I speak German wink

dateutils.ddiff heute 1950-02-08 -f '%yy %mm %dd'
ddiff: Error: reference DATE must be specified

Usage: datediff [OPTION]... DATE/TIME [DATE/TIME]...

Compute duration from DATE/TIME (the reference date/time) to the other
DATE/TIMEs given and print the result as duration.
If the other DATE/TIMEs are omitted read them from stdin.

DATE/TIME can also be one of the following specials
  - `now'           interpreted as the current (UTC) time stamp
  - `time'          the time part of the current (UTC) time stamp
  - `today'         the current date (according to UTC)
  - `tomo[rrow]'    tomorrow's date (according to UTC)
  - `y[ester]day'   yesterday's date (according to UTC)

Note: The output format of durations (specified via -f) takes all format
specifiers into account, i.e. specifying %M and %S for example prints the
duration in minutes and seconds, whereas specifying %S only prints the duration
in seconds.

See section `The refinement rule' in ddiff(1).

  -h, --help            Print help and exit
  -V, --version         Print version and exit
  -q, --quiet           Suppress message about date/time and duration
                        parser errors and fix-ups.
                        The default is to print a warning or the
                        fixed up value and return error code 2.
                        Also see -S|--skip-illegal to output an empty
                        line instead of leaving out the line altogether.
  -S, --skip-illegal    Output empty lines as placeholder for illegal
                        input, i.e. parser errors or date/times that
                        cannot be subtracted.
  -f, --format=STRING   Output format.  This can either be a specifier
                        string (similar to strftime()'s FMT) or the name
                        of a calendar.
  -i, --input-format=STRING...
                        Input format, can be used multiple times.
                        Each date/time will be passed to the input
                        format parsers in the order they are given, if a
                        date/time can be read successfully with a given
                        input format specifier string, that value will
                        be used.
  -b, --base=DT         For underspecified input use DT as a fallback to
                        fill in missing fields.  Also used for ambiguous
                        format specifiers to position their range on the
                        absolute time line.
                        Must be a date/time in ISO8601 format.
                        If omitted defaults to the current date/time.
  -e, --backslash-escapes
                        Enable interpretation of backslash escapes in the
                        output and input format specifier strings.
      --from-locale=LOCALE
                        Interpret dates on stdin or the command line as
                        coming from the locale LOCALE, this would only
                        affect month and weekday names as input formats
                        have to be specified explicitly.
      --from-zone=ZONE  Interpret dates on stdin or the command line as
                        coming from the time zone ZONE.


Report bugs to https://github.com/hroptatyr/dateutils/issues

Last edited by unklar (2020-02-21 16:45:50)

Offline

#1299 2020-02-21 17:38:26

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 5,879

Re: Show us your conky

unklar wrote:
Sector^ wrote:

VERY NICE unklar!  Love them all.

Thanks my friend, all learned from you  O:)

Well, in that case -  Danke.

On the subject:
where did you get the -f option ?

Check the code block right under your statement:

Aha, if I speak German ;) 

where it says:

  -f, --format=STRING   Output format.  This can either be a specifier
                        string (similar to strftime()'s FMT) or the name
                        of a calendar.

;)   ;)

With me still a hyphen - is displayed

dateutils.ddiff today 1950-02-08 -f '%y %m %d'
-70 0 13

dateutils.ddiff today 1950-02-08 f '%y %m %d'
-25580
ddiff: cannot make sense of `f' using the given input formats
ddiff: cannot make sense of `%y %m %d' using the given input formats

dateutils.ddiff today 1950-02-08 -f '%yy %mm %dd'
-70y 0m 13d

Forget conkyDateDiff or conkyDaysDiff  - they both show positive number when looking at
1. a date in the past to today
2. a date in the future to today

With dateutils it depends on where you put the dates you are using.  These are both a 1 day difference ... but one is negative indicating in the past.

 21 Feb 20 @ 14:14:11 ~
   $ dateutils.ddiff 2020-02-20 2020-02-21 -f '%yy %mm %dd'
0y 0m 1d
 
 21 Feb 20 @ 14:18:06 ~
   $ dateutils.ddiff 2020-02-21 2020-02-20 -f '%yy %mm %dd'
-0y 0m 1d

works with 'today' too

 21 Feb 20 @ 14:19:09 ~
   $ dateutils.ddiff 'today' 2020-02-22 -f '%yy %mm %dd'
0y 0m 1d
 
 21 Feb 20 @ 14:21:56 ~
   $ dateutils.ddiff 2020-02-22 'today' -f '%yy %mm %dd'
-0y 0m 1d

Better explained dateutils always calculates from "first date given" to "second date given"

so:
past date ---> any date up to 'today' or any future date = positive number
future date ---> any date back to 'today' or a past date = negative date
future date ---> to any date before the start 'future date'

 21 Feb 20 @ 14:33:52 ~
   $ dateutils.ddiff 2000-01-01 'today' -f '1 Jan 2000 was %y years %m months %d days ago'
1 Jan 2000 was 20 years 1 months 20 days ago
 
 21 Feb 20 @ 14:34:10 ~
   $ dateutils.ddiff 'today' 2000-01-01 -f '1 Jan 2000 was %y years %m months %d days ago'
-1 Jan 2000 was 20 years 1 months 20 days ago
 
 21 Feb 20 @ 14:34:21 ~
   $ 

Seems like the limits for dateutils is
past - nothing earlier than 1601-01-01
nothing after 4095-12-31

   $ dateutils.ddiff 1601-01-01 4095-12-31 -f '%y %m %d'
2494 11 30

I'm not to worried, I doubt I will be around.

Last edited by Sector11 (2020-02-21 18:09:27)


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.

Offline

#1300 2020-02-21 18:28:38

unklar
Member
Registered: 2015-10-31
Posts: 1,027

Re: Show us your conky

Sector11 wrote:
unklar wrote:

On the subject:
where did you get the -f option ?

Check the code block right under your statement:

where it says:

therefore I wrote "Aha..."

I get that.
My mother's age today is such that I bow to her

dateutils.ddiff 1920-03-03 today -f '%y %m %d'
99 11 18

dateutils.ddiff 1920-03-03 today -f '%yy %mm %dd'
99y 11m 18d

Here are examples of the variables

Offline

Board footer

Powered by FluxBB