You are not logged in.
I'm going going crazy .. now it works for me to without editing my aliases.
? ? ? ? ? ?
29 Mar 21 @ 17:04:06 ~
$ curl 'wttr.in/buenos_aires_argentina?q?0T?Q'
\ / Sunny
.-. 21 °C
― ( ) ― ↖ 3 km/h
`-’ 10 km
/ \ 0.0 mm
29 Mar 21 @ 17:04:10 ~
$ caba2
\ / Sunny
.-. 21 °C
― ( ) ― ↖ 3 km/h
`-’ 10 km
/ \ 0.0 mm
29 Mar 21 @ 17:05:50 ~
$ caba
Buenos Aires, Argentina
Partly cloudy
T: +22°C ST: +25°C Hum: 65%
Wind: ↑11km/h BAR: 1016hPa Rain: 0.0mm
Dawn: 06:38:45 SunRise: 07:04:23
Zenith: 12:58:34
Sunset: 18:51:49 Dusk: 19:17:24
29 Mar 21 @ 17:06:00 ~
$
alias caba='curl wttr.in/buenos+aires?format="+Buenos+Aires,+Argentina\n+%C\n+T:+%t+ST:+%f+Hum:+%h\n+Wind:+%w+BAR:+%P+Rain:+%p\n+Dawn:+%D+SunRise:+%S\n+Zenith:+%z\n+Sunset:+%s+Dusk:+%d\n"'
alias caba2='curl wttr.in/Buenos+Aires+Argentina?q?0T?Q'
{shaking head as I walk off into the sunset}
NO Wait. there are differences!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
29 Mar 21 @ 17:17:05 ~
$ caba
Buenos Aires, Argentina
Partly cloudy
T: +22°C ST: +25°C Hum: 65%
Wind: ↑11km/h BAR: 1016hPa Rain: 0.0mm
Dawn: 06:38:45 SunRise: 07:04:23
Zenith: 12:58:34
Sunset: 18:51:49 Dusk: 19:17:24
29 Mar 21 @ 17:17:13 ~
$ caba2
\ / Sunny
.-. 21 °C
― ( ) ― ↖ 3 km/h
`-’ 10 km
/ \ 0.0 mm
29 Mar 21 @ 17:17:17 ~
$ caba3
buenos_aires_argentina
Partly cloudy
T: +22°C ST: +25°C Hum: 65%
Wind: ↑11km/h BAR: 1016hPa Rain: 0.0mm
Dawn: 06:38:45 SunRise: 07:04:23
Zenith: 12:58:34
Sunset: 18:51:49 Dusk: 19:17:24
29 Mar 21 @ 17:17:21 ~
$ caba4
\ / Sunny
.-. 21 °C
― ( ) ― ↖ 3 km/h
`-’ 10 km
/ \ 0.0 mm
29 Mar 21 @ 17:17:26 ~
$
##### WTTR #####
##### https://github.com/chubin/wttr.in/blob/master/README.md
##alias caba='curl -s 'wttr.in/buenos_aires_argentina?format=+%C+%t+%w+%P+%h+%m'' # Waether
alias caba='curl wttr.in/buenos+aires?format="+Buenos+Aires,+Argentina\n+%C\n+T:+%t+ST:+%f+Hum:+%h\n+Wind:+%w+BAR:+%P+Rain:+%p\n+Dawn:+%D+SunRise:+%S\n+Zenith:+%z\n+Sunset:+%s+Dusk:+%d\n"'
alias caba2='curl wttr.in/Buenos+Aires+Argentina?q?0T?Q'
alias caba3='curl wttr.in/buenos+aires?format="buenos_aires_argentina\n+%C\n+T:+%t+ST:+%f+Hum:+%h\n+Wind:+%w+BAR:+%P+Rain:+%p\n+Dawn:+%D+SunRise:+%S\n+Zenith:+%z\n+Sunset:+%s+Dusk:+%d\n"'
alias caba4='curl wttr.in/buenos_aires_argentina?q?0T?Q'
Time to hit that link. sane sww why the difference!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
I recently stumbled on a conky lua tutorial which made me realise just how flexible the new config format is - because it's just a lua script! Very powerful.
I wrote an article about it with more detail. You can see how I inject variables into the conky.config section.
There's also a lot to be said for conky templates - I should've started using them years ago... but it's the combination of lua + conky that really opens doors to new dimensions.
Last edited by ohnonot (2021-07-04 09:16:25)
Offline
^mrpeachy would have his true joy with it.
I didn't understand the LUA programming language even then.
In the end, Conky will then only be a Klicki-Bunti tool. 8.(
Offline
Well done ohnonot. KUDOS!
Yea, you're right unklar, mrpeachy, falldown and a few others would have really enjoyed that for sure.
Unfortunately I cannot wrap my head around coding so I'll stick with v1.9 as long as it works for me.
After that I guess I will bite the bullet and "copy someone else's work" and tweak it to fit.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
^ Thanks. It really isn't that different from shell scripting, except files and external commands require more handling (after all, a shell is mostly about these things).
mrpeachy would have his true joy with it.
Thanks for the link.
In the end, Conky will then only be a Klicki-Bunti tool. 8.(
Do you know that too ?
I understand neither the comment (isn't scripting the opposite of "colorful clicking"?) nor the question.
Offline
^ Thanks. It really isn't that different from shell scripting, except files and external commands require more handling (after all, a shell is mostly about these things).
And that is another place I have to ask a million questions and/or "tweak it til it breaks"
Shell scripting {shudders}
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
unklar wrote:In the end, Conky will then only be a Klicki-Bunti tool. 8.(
Do you know that too ?I understand neither the comment (isn't scripting the opposite of "colorful clicking"?) nor the question.
^Sorry, Both have nothing to do with each other - forget it. [deutsche Sprache, schwere Sprache]
The correct wording should be: "Do you know this too?"
Last edited by unklar (2021-04-07 09:31:02)
Offline
I recently stumbled on a conky lua tutorial which made me realise just how flexible the new config format is - because it's just a lua script! Very powerful.
I wrote an article about it with more detail. You can see how I inject variables into the conky.config section.
There's also a lot to be said for conky templates - I should've started using them years ago... but it's the combination of lua + conky that really opens doors to new dimensions.
---
Thank you for your article!
Trying to get this to work. Won't grab the colors.lua? ...
Opening conky in terminal shows no errors. (calling with both conky.conf, or renaming to "conky.lua" and calling with "conky -c conky.lua"
Here is what I have:
-- get current GTK theme
cmd = io.popen('grep "^[[:space:]]*gtk-theme-name" "$XDG_CONFIG_$HOME/.config/gtk-3.0/settings.ini" | cut -d\\= -f2')
theme = cmd:read('*a')
io.close(cmd)
-- try to find colors.lua in $HOME's GTK theme folder...
theme_file = os.getenv("HOME") .. '/.local/share/themes/' .. string.gsub(theme, '[\n]+', '') .. '/conky/colors.lua'
-- ...test if file exists and is readable
f = io.open(theme_file,"r")
if f~=nil then
io.close(f)
-- "source" it
dofile(theme_file)
else
-- fallback to default colors
foreground = "CB0D09"
-- ...
white0 = "CB0D09"
-- ...
white1 = "CB0D09"
-- etc. ...
end
-- more variables to be used inside conky.config
largefont = 'Cascadia Mono:style=ExtraLight:size=20'
conky.config = {
-- Window Settings
own_window = true,
own_window_type = 'desktop',
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky',
own_window_colour = '#182423',
own_window_class = 'Conky',
own_window_transparent = true,
-- own_window_argb_visual = true,
-- own_window_argb_value = 1000,
minimum_width = 180, minimum_height = 0,
maximum_width = 180,
gap_x = 2,-- left | right
gap_y = 28,-- up | down
alignment = 'top_right',
use_xft = true,
--font = 'DejaVu Sans regular:size=10',
xftalpha = 1,
-- Force UTF8
override_utf8_locale = true,
uppercase = false,
draw_shades = false,
default_shade_color = '000000',
draw_outline = false,
default_outline_color = '000000',
--default_color = '#617B80',
draw_borders = false,
stippled_borders = 0,
border_inner_margin = 5,
border_outer_margin = 0,
border_width = 1,
draw_graph_borders = true,
--default_graph_height = 15,
--default_graph_width = 40,
background = true,
use_spacer = 'none',
--text_buffer_size = 3114,
no_buffers = true,
short_units = true,
imlib_cache_size = 0,
double_buffer = true,
--max_user_text = 16384,
--temperature_unit = 'Fahrenheit',
-- Update interval in seconds
update_interval = 1,
-- End Miscellaneous Section
};
conky.text = [[
${font Dejavu Sans:Book:size=12}${execi 999999 lsb_release -is} $alignr${time %T}
${hr}
${font Dejavu Sans:Book:size=10}Kernel${alignr}${kernel}
Governor: ${alignr}${execpi 120 $HOME/.config/conky/scripts/gov}
IO Sched: ${alignr}${ioscheduler /dev/sda}
Uptime:${alignr}${uptime}
Total Installed: ${alignr}${execpi 360 $HOME/.config/conky/scripts/apps}
Processes:${alignr}${processes}
CPU:${alignr}${cpu cpu0}%
${cpubar 4 ,60}
${color}Ram:${alignr}$mem / $memmax
${membar 4}
${color}Swap:${alignr}$swap / $swapmax
${swapbar 4}
Root: $alignr ${fs_used /} / ${fs_size /}
${fs_bar 4 /}
Home: $alignr ${fs_used /home} / ${fs_size /home}
${fs_bar 4 /home}
Up: $alignr${upspeed wlp2s0}
$alignr${upspeedgraph wlp2s0 8,180}
Down: $alignr${downspeed wlp2s0}
$alignr${downspeedgraph wlp2s0 8,180}
Battery:$alignr${battery_percent BAT0}%
$alignr${battery_bar 4,180 BAT0}
${execi 3114 fortune -s | fold -s -w24}
${execpi 20 $HOME/.config/conky/scripts/drive}
${execpi 600 $HOME/.config/conky/scripts/bunsenweather.sh}
]];
And then made a folder:
/home/sleekmason/.local/share/themes/Lilidog-Clay/conky/colors.lua
Used the nordic colors you provided as a template, then changed the foreground/background to test.
Made everything executable.
Anyhow, I changed all colors to red to check both the colors.lua, and the fallback colors, but conky comes out "white" every time.
What am I missing?
Offline
^hm, as I understand it, you left out the [template].
But these are necessary for the red to show up for you.
Offline
^hm, as I understand it, you left out the [template].
But these are necessary for the red to show up for you.
----
ugh. I saw/deleted that part Didn't think it was relevant to the color change part.
Assuming this is what you are talking about?
-- header
-- \1 - header text
template0 = [[$color0${font ]]..largefont..[[}\1$font${voffset 8}$color]],
-- epsi-rns.github.io/desktop/2019/06/11/modularized-conky.html
template1 = os.getenv("HOME") .. '/documents/Notes/.conky-notes.txt',
Guess I have more to do here. The template part has lost me.
Last edited by sleekmason (2021-04-08 14:59:03)
Offline
Assuming this is what you are talking about?
Yes.
here @ononot defines the [color.lua] color
template0 = [[$color0${font ]]..largefont..[[}\1$font${voffset 8}$color]],
and
here he defines a text on his machine
template1 = os.getenv("HOME") .. '/documents/Notes/.conky-notes.txt',
below
TEXT in conkyrc (conky.text = [[ )
defines he his conky (the log of the journal)
${template0 Latest\ journal\ entries}
${journal 20}
Finally he defines the conditions to change the color,
depending on whether the journal or the text should be displayed.
${if_empty ${cat ${template1}}}\
$else\
${template0 Notes}
${cat ${template1}}${endif}
I confess, I have not been able to do this under lua either. :8
---------------
whereby, if I look at it again, he writes the journal after
/documents/Notes/.conky-notes.txt
to then, depending on the subject, change the color.
Anyway, he will explain...
Last edited by unklar (2021-04-08 18:12:26)
Offline
Hey @Sector11,
I stumbled across Crinos512 by chance this morning and had to realize, with python it unfortunately doesn't work anymore. We are yes at python3.
So I had to do the whole thing "on foot" and can tell you, your 1.9 you have created clean, which is why it also runs flawlessly with 1.10.
Offline
Interesting, I have 2 versions of python installed.
09 Apr 21 @ 10:04:14 ~
$ ls /usr/bin/python*
/usr/bin/python /usr/bin/python2 /usr/bin/python2.7 /usr/bin/python3 /usr/bin/python3.7 /usr/bin/python3.7m /usr/bin/python3m
09 Apr 21 @ 10:04:17 ~
$
Which of course means it still works here.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
^^Yeah, I can only serve with this
ls /usr/bin/python*
/usr/bin/python3 /usr/bin/python3.9
look again on the top left in my picture...
Offline
Trying to get this to work. Won't grab the colors.lua? ...
Opening conky in terminal shows no errors. (calling with both conky.conf, or renaming to "conky.lua" and calling with "conky -c conky.lua"
Here is what I have:
-- get current GTK theme cmd = io.popen('grep "^[[:space:]]*gtk-theme-name" "$XDG_CONFIG_$HOME/.config/gtk-3.0/settings.ini" | cut -d\\= -f2') theme = cmd:read('*a') io.close(cmd) -- try to find colors.lua in $HOME's GTK theme folder... theme_file = os.getenv("HOME") .. '/.local/share/themes/' .. string.gsub(theme, '[\n]+', '') .. '/conky/colors.lua' -- ...test if file exists and is readable f = io.open(theme_file,"r") if f~=nil then io.close(f) -- "source" it dofile(theme_file) else -- fallback to default colors foreground = "CB0D09" -- ... white0 = "CB0D09" -- ... white1 = "CB0D09" -- etc. ... end -- more variables to be used inside conky.config largefont = 'Cascadia Mono:style=ExtraLight:size=20' conky.config = { -- Window Settings own_window = true, own_window_type = 'desktop', own_window_hints = 'undecorated,below,skip_taskbar,skip_pager,sticky', own_window_colour = '#182423', own_window_class = 'Conky', own_window_transparent = true, -- own_window_argb_visual = true, -- own_window_argb_value = 1000, minimum_width = 180, minimum_height = 0, maximum_width = 180, gap_x = 2,-- left | right gap_y = 28,-- up | down alignment = 'top_right', use_xft = true, --font = 'DejaVu Sans regular:size=10', xftalpha = 1, -- Force UTF8 override_utf8_locale = true, uppercase = false, draw_shades = false, default_shade_color = '000000', draw_outline = false, default_outline_color = '000000', --default_color = '#617B80', draw_borders = false, stippled_borders = 0, border_inner_margin = 5, border_outer_margin = 0, border_width = 1, draw_graph_borders = true, --default_graph_height = 15, --default_graph_width = 40, background = true, use_spacer = 'none', --text_buffer_size = 3114, no_buffers = true, short_units = true, imlib_cache_size = 0, double_buffer = true, --max_user_text = 16384, --temperature_unit = 'Fahrenheit', -- Update interval in seconds update_interval = 1, -- End Miscellaneous Section }; conky.text = [[ ${font Dejavu Sans:Book:size=12}${execi 999999 lsb_release -is} $alignr${time %T} ${hr} ${font Dejavu Sans:Book:size=10}Kernel${alignr}${kernel} Governor: ${alignr}${execpi 120 $HOME/.config/conky/scripts/gov} IO Sched: ${alignr}${ioscheduler /dev/sda} Uptime:${alignr}${uptime} Total Installed: ${alignr}${execpi 360 $HOME/.config/conky/scripts/apps} Processes:${alignr}${processes} CPU:${alignr}${cpu cpu0}% ${cpubar 4 ,60} ${color}Ram:${alignr}$mem / $memmax ${membar 4} ${color}Swap:${alignr}$swap / $swapmax ${swapbar 4} Root: $alignr ${fs_used /} / ${fs_size /} ${fs_bar 4 /} Home: $alignr ${fs_used /home} / ${fs_size /home} ${fs_bar 4 /home} Up: $alignr${upspeed wlp2s0} $alignr${upspeedgraph wlp2s0 8,180} Down: $alignr${downspeed wlp2s0} $alignr${downspeedgraph wlp2s0 8,180} Battery:$alignr${battery_percent BAT0}% $alignr${battery_bar 4,180 BAT0} ${execi 3114 fortune -s | fold -s -w24} ${execpi 20 $HOME/.config/conky/scripts/drive} ${execpi 600 $HOME/.config/conky/scripts/bunsenweather.sh} ]];
And then made a folder:
/home/sleekmason/.local/share/themes/Lilidog-Clay/conky/colors.lua
Used the nordic colors you provided as a template, then changed the foreground/background to test.
Made everything executable.Anyhow, I changed all colors to red to check both the colors.lua, and the fallback colors, but conky comes out "white" every time.
What am I missing?
Does it pick up the theme from ~/.config/gtk-3.0/settings.ini? Should be "Lilidog-Clay".
But more importantly, you aren't "injecting" the sourced colors anywhere.
See this bit:
conky.config = {
default_color = '#' .. foreground,
color0 = '#' .. white0,
Assuming colors.lua contains at least "foreground=..." and "color0=...".
These are just string variables, you have to tell conky, or rather lua, what to do with them. It doesn't somehow magically "understand" that they are supposed to be conky colors.
Last edited by ohnonot (2021-05-27 18:00:58)
Offline
But more importantly, you aren't "injecting" the sourced colors anywhere.
See this bit from the article:conky.config = { default_color = '#' .. foreground, color0 = '#' .. white0,
Assuming colors.lua contains at least "foreground=..." and "color0=...".
These are just string variables, you have to tell conky, or rather lua, what to do with them. It doesn't somehow magically "understand" that they are supposed to be conky colors.
---
Brilliant! Adding the section above did the trick! All is red now. Still have to theme and check:) This is really cool.
Offline
^^Yeah, I can only serve with this
ls /usr/bin/python* /usr/bin/python3 /usr/bin/python3.9
look again on the top left in my picture...
It looks like Debian 11 (Bullseye) still has access to python 2:
python-all (2.7.18-2)
package depending on all supported Python2 runtime versions
python-all-dev (2.7.18-2)
package depending on all supported Python2 development packages
python-apt-common (2.1.7)
Python interface to libapt-pkg (locales)
python-apt-dev (2.1.7)
Python interface to libapt-pkg (development files)
python-babel-localedata (2.8.0+dfsg.1-6)
tools for internationalizing Python applications - locale data files
Try:
aptitude search python2
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
You're right.
sudo apt install -s python2
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden zusätzlichen Pakete werden installiert:
libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib python2-minimal python2.7 python2.7-minimal
Vorgeschlagene Pakete:
python2-doc python-tk python2.7-doc binutils binfmt-support
Die folgenden NEUEN Pakete werden installiert:
libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib python2 python2-minimal python2.7 python2.7-minimal
0 aktualisiert, 7 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Inst libpython2.7-minimal (2.7.18-6 Debian:testing [amd64])
Inst python2.7-minimal (2.7.18-6 Debian:testing [amd64])
Inst python2-minimal (2.7.18-2 Debian:testing [amd64])
Inst libpython2.7-stdlib (2.7.18-6 Debian:testing [amd64])
Inst python2.7 (2.7.18-6 Debian:testing [amd64])
Inst libpython2-stdlib (2.7.18-2 Debian:testing [amd64])
Conf libpython2.7-minimal (2.7.18-6 Debian:testing [amd64])
Conf python2.7-minimal (2.7.18-6 Debian:testing [amd64])
Conf python2-minimal (2.7.18-2 Debian:testing [amd64])
Inst python2 (2.7.18-2 Debian:testing [amd64])
Conf libpython2.7-stdlib (2.7.18-6 Debian:testing [amd64])
Conf python2.7 (2.7.18-6 Debian:testing [amd64])
Conf libpython2-stdlib (2.7.18-2 Debian:testing [amd64])
Conf python2 (2.7.18-2 Debian:testing [amd64])
Offline
You're right.
![]()
{snip}
Source
Once - every now and then, on rare occasions, I am.
But now that conky will|should|maybe|might work
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline