You are not logged in.

#1501 2021-04-09 14:39:37

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

Re: Show us your conky

sleekmason wrote:

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 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.


Please use CODE tags for code.
Search youtube without a browser: repo | thread
BL quote proposals to this thread please.
my repos / my repos

Offline

#1502 2021-04-09 17:54:28

sleekmason
zoom
From: Ozarks
Registered: 2018-05-22
Posts: 575
Website

Re: Show us your conky

ohnonot wrote:

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

#1503 2021-04-09 18:31:04

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

Re: Show us your conky

unklar wrote:

^^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...   big_smile

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

The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#1504 2021-04-10 08:21:47

unklar
Member
From: #! BL
Registered: 2015-10-31
Posts: 1,439

Re: Show us your conky

You're right.  smile

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])

Source

Offline

#1505 2021-04-10 12:23:10

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

Re: Show us your conky

unklar wrote:

You're right.  smile
{snip}
Source

Once - every now and then, on rare occasions, I am.  cool
But now that conky will|should|maybe|might work  smile  smile


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#1506 2021-04-10 13:24:39

unklar
Member
From: #! BL
Registered: 2015-10-31
Posts: 1,439

Re: Show us your conky

I did without the python script and built in your calendar.  wink

The upper part was contaminated with ${offset's}, which caused the conky to "fidget" and could not keep its window stable.

before  OFAZ5Gqt.png  now  wdWB5obt.png

Offline

#1507 2021-04-10 13:47:49

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

Re: Show us your conky

OH! That calendar.  What is that one called? - if you didn't change the name I can find it..

I thought you were talking about Mrpeachy's YearClock.conky that I tweaked:
one
two

Black → Months
Grey → Days
White → Hours
Cyan → Minutes
Red → Seconds

My OOPS!


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

#1508 2021-04-10 15:33:33

unklar
Member
From: #! BL
Registered: 2015-10-31
Posts: 1,439

Re: Show us your conky

Sector11 wrote:

OH! That calendar.  What is that one called? - if you didn't change the name I can find it..

hm, I have changed it...  ops
maybe you find that after the date here (thanks to the wonderful right-click action, "Upload Image", this is no problem today)  big_smile

SehPovbt.jpg

Offline

#1509 2021-04-10 20:44:31

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

Re: Show us your conky

I will go looking.  The week number as the current day is a nice clue.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Offline

Board footer

Powered by FluxBB