You are not logged in.

#751 2017-10-23 21:48:45

misko_2083
Member
Registered: 2016-05-24
Posts: 75

Re: Show us your conky

After reading the freedesktop specifications
I came up with this:

#!/bin/bash

while read -r win_id <&3
  do
     if xprop -id $win_id | grep -e "^_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL" \
                                 -e "^_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG" &>/dev/null
     then
         wm_class=$(xprop -id $win_id | grep "^WM_CLASS(STRING)" | awk -F '"' '{print $4}')

         if [[ "${wm_class}" == "Wrapper" ]]
         then
             xprop -id $win_id | grep "^_NET_WM_NAME(UTF8_STRING)" | awk -F '"' '{print $2}'
         else
             echo "$wm_class"
         fi
     fi
done 3< <(wmctrl -l -x | awk '{print $1}')

exec 3<&-

Probably needs more testing and/or work.
wmctrl -l prints all windows so we filter out these two atoms:
_NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE_DIALOG
They are most likely to display in window list.

Offline

#752 2017-10-24 06:26:38

Head_on_a_Stick
Moderator
From: London
Registered: 2015-09-29
Posts: 8,683
Website

Re: Show us your conky

^ No need for grep if you're already using awk smile

So this:

wm_class=$(xprop -id $win_id | grep "^WM_CLASS(STRING)" | awk -F '"' '{print $4}')

Can be replaced with:

wm_class=$(xprop -id $win_id | awk -F'"' '/^WM_CLASS\(STRING\)/{print $4}')

This also seems to work:

wm_class=$(xprop -id $win_id | awk -F'"' '/WM_CLASS/{print $4}')

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Online

#753 2017-10-24 08:57:49

nore
>2⁹
From: Lakeland
Registered: 2015-09-29
Posts: 350

Re: Show us your conky

Snowball keeps rolling.  smile Excellent job, misko.

What I (read we) need to do next is document the whole thing. I can't understand half of what the script is doing monkey atm, but it surely is looking good.

(Going to read xprop manual.)

Last edited by nore (2017-10-24 09:18:37)

Offline

#754 2017-10-29 10:41:30

unklar
Member
Registered: 2015-10-31
Posts: 668

Re: Show us your conky

@Teo, if you have time, please check why the script doesn't update the data anymore.
Thank you very much!  smile

Offline

#755 2017-10-30 16:48:02

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 659

Re: Show us your conky

Because the page has unfortunately stopped updating since last May unklar.
Bad luck.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#756 2017-10-30 17:28:57

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

Re: Show us your conky

Too bad it was such a nice idea too.  OH well, time to edit it, removing the Chinese connection and use the times and dates with cloud cover and sunlight and night time shadow.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#757 2017-10-31 03:29:50

misko_2083
Member
Registered: 2016-05-24
Posts: 75

Re: Show us your conky

Head_on_a_Stick wrote:

^ No need for grep if you're already using awk smile

smile thanks

@nore here it is

#!/bin/bash

# With process substitution output from "wmctrl -l | awk '{print $1,$2}'" is redirected to file descriptor 3
# while loop reads  "win_id" and "display" variables from file descriptor 3

while read -r win_id display <&3
  do
     # Check if window with win_id has X window properties of type normal or dialog
     # this is also a filter
     if xprop -id $win_id | grep -e "^_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL" \
                                 -e "^_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG" &>/dev/null
     then
         # Get WM_CLASS X window property
         wm_class=$(xprop -id $win_id | awk -F'"' '/^WM_CLASS/{print $4}')

         # if WM_CLASS is a "Wrapper"
         if [[ "${wm_class}" == "Wrapper" ]]
         then
             printf "%s" "$display"
             # Get WM_CLASS X window property _NET_WM_NAME
             xprop -id $win_id | awk -F '"' '/^_NET_WM_NAME/{print $2}'
         else
             # print display and wm_class
             echo "$display $wm_class"
         fi
     fi
done 3< <(wmctrl -l | awk '{print $1,$2}')

# Close file descriptor 3
exec 3<&-

This one prints out workspace/display number too

0 Firefox-esr
0 Xfce4-terminal
0 Mousepad
1 Ristretto

Offline

#758 2017-10-31 03:54:40

misko_2083
Member
Registered: 2016-05-24
Posts: 75

Re: Show us your conky

Sector11 wrote:

Too bad it was such a nice idea too.  OH well, time to edit it, removing the Chinese connection and use the times and dates with cloud cover and sunlight and night time shadow.

I've played with this cloud-based microservice to get weather info.
http://thisdavej.com/consuming-web-api- … conditions
Just needs jq (sudo apt install jq)
"jq" is sed for the structured data like JSON data.

With wget is much simpler

wget --spider --user-agent="Mozilla/5.0 Gecko/20100101" --timeout=30 -q "https://f.stdlib.com/thisdavej/weather/current?loc=San Diego, CA&deg=C" -O - | jq -r '. | "\(.temperature)°\(.degType) \(.skytext)"'

Output:
17°C Mostly Cloudy

wget --spider --user-agent="Mozilla/5.0 Gecko/20100101" --timeout=30 -q "https://f.stdlib.com/thisdavej/weather/forecast?loc=San Diego, CA&deg=C" -O - | jq -r '.[] | "\(.shortday) \(.low)-\(.high)°\(.degType) \(.skytextday) ~ Rain: \(.precip)% \(if (.precip | tonumber > 20) then "(Bring umbrella!)" else "" end)"'

Output:
Sun 17-21°C Cloudy ~ Rain: 0%
Mon 17-20°C Mostly Cloudy ~ Rain: 80% (Bring umbrella!)
Tue 17-20°C Cloudy ~ Rain: 80% (Bring umbrella!)
Wed 16-20°C Partly Sunny ~ Rain: 20%
Thu 15-20°C Sunny ~ Rain: 20%

Offline

#759 2017-10-31 08:15:30

unklar
Member
Registered: 2015-10-31
Posts: 668

Re: Show us your conky

TeoBigusGeekus wrote:

Because the page has unfortunately stopped updating since last May unklar.
Bad luck.

^^Oh, man, I could've figured that out myself. On this page I never scrolled to the bottom of the page.

Thanks, Teo, for your help.  smile

Offline

#760 2017-10-31 14:11:46

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 659

Re: Show us your conky

Anytime unklar wink


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#761 2017-10-31 15:27:22

nore
>2⁹
From: Lakeland
Registered: 2015-09-29
Posts: 350

Re: Show us your conky

misko_2083 wrote:

@nore here it is
This one prints out workspace/display number too

Great job, misko, thank you! Script squirreled.

Offline

#762 2017-11-27 17:34:52

PackRat
Member
Registered: 2015-10-02
Posts: 700

Re: Show us your conky

sshot-123212_2017-11-27.th.png


It is difficult to get a man to understand something when his salary depends upon his not understanding it.
                                                                                                                                       Upton Sinclair

Offline

#763 2017-12-05 16:29:13

unklar
Member
Registered: 2015-10-31
Posts: 668

Re: Show us your conky

Today very bad weather....
So it's obvious to deal with Conky. wink

Here I found a very interesting, individual configuration .

Conky Version 1.10

conky -v
conky 1.10.6_pre compiled Tue Nov 21 19:25:25 UTC 2017 for Linux 4.13.8-1-ARCH x86_64

Compiled in features:

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


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * MPD
  * MOC

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256

After a few adjustments, the first start with the "known errors"appears, if lua-scripte application find here, which call cairo.

conky1.10 in archlinux

conky -c /DATEN/francescoPC/Conky/derivantArt/urgo/conky/.conkyrc &
[1] 25862
[unklar@archhost ~]$ conky: llua_load: ...N/francescoPC/Conky/derivantArt/urgo/conky/.lua/urgo.lua:11: module 'cairo' not found:
	no field package.preload['cairo']
	no file '/usr/share/lua/5.3/cairo.lua'
	no file '/usr/share/lua/5.3/cairo/init.lua'
	no file '/usr/lib/lua/5.3/cairo.lua'
	no file '/usr/lib/lua/5.3/cairo/init.lua'
	no file './cairo.lua'
	no file './cairo/init.lua'
	no file '/usr/lib/conky/libcairo.so'
	no file '/usr/lib/lua/5.3/cairo.so'
	no file '/usr/lib/lua/5.3/loadall.so'
	no file './cairo.so'
conky: desktop window (2000012) is subwindow of root window (4a5)
conky: window type - normal
conky: drawing to created window (0x3c00002)
conky: drawing to double buffer
conky: Unknown setting 'pozycja_y'
conky: Unknown setting 'pozycja_x'
conky: forked to background, pid is 25863

conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
conky: llua_do_call: function conky_main execution failed: attempt to call a nil value

I'd really like to know what package is missing. I haven't found out yet.
If I rewrite the configuration to version 1.9, it works fine. big_smile
ugro1.th.jpg ugro2.th.jpg

.conkyrc9

# conky-version1.9
    background yes
    use_xft yes
    font monofur:size=10
    xftalpha 1 
    update_interval 1.0
    total_run_times 0
    own_window yes
    own_window_transparent yes
    own_window_type normal
    own_window_hints undecorated,below,skip_taskbar,skip_pager  #sticky,
    double_buffer yes
    minimum_size 800 900
#minimum_height = 900,
#maximum_width = 900,
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders no
    default_color 48192D
    default_shade_color 000000
    default_outline_color 828282
    alignment top_left
    no_buffers yes
    uppercase no
    cpu_avg_samples 2
    net_avg_samples 1
    temperature_unit celsius
    override_utf8_locale yes
    imlib_cache_size 0
    default_color FFFFFF
    color0 FFFFFF
    color1 48192D
    color2 333333
    color3 414569
    color4 1994D1
    color5 000000
    color6 C22E14
    template9 de_DE.UTF-8
#own_window_argb_value = 0,
    own_window_argb_visual yes
#own_window_colour = '000000',
    gap_x 50
    gap_y 20
    if_up_strictness address
#pozycja_x=400,
#pozycja_y=400,
    lua_load /media/DATEN/francescoPC/Conky/derivantArt/urgo/conky/.lua/urgo.lua
    lua_draw_hook_post main


TEXT
${font monofur:weight=Bold:size=90}${color4}\
${alignc}${time %H:%M}\
${font}${color}
${font Liberation Sans Narrow:weight=Bold:size=28}${color4}\
${voffset 10}\
${alignc}${execi 10 LANG=${template9} LC_TIME=${template9} date +"%A, %d. %B"}\
${font}${color}


#${color4}SYSTEM ${hr 2}
#${offset 15}$sysname $kernel
#${offset 15}$nodename
#${offset 15}Uptime: $uptime
#${offset 120}${cpugraph 40,183 666666 666666}${voffset -25}



#Battery: ${battery_percent BAT1}% ${battery_bar BAT1}
#${offset 90}ETHERNET
#${offset 15}Up: ${upspeed enp2s0} / ${totalup}
#${offset 15}${upspeedgraph enp2s0 40,285 4B1B0C FF5C2B 100 -l}
#${offset 15}Down: ${downspeed enp2s0} / ${totaldown}
#${offset 15}${downspeedgraph enp2s0 40,285 324D23 77B753 100 -l}
#${offset 15}Up: ${upspeed wlp3s0} / ${totalup}
#${offset 15}Down: ${downspeed wlp3s0} / ${totaldown}
#${color4}${hr 2}
 

Last edited by unklar (2017-12-06 14:29:18)

Offline

#764 2017-12-07 10:08:01

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

Re: Show us your conky

hello

@ unklar i permice me to change  your conky (1.09) a little  beat .

A little french  & hard drive temp & card temp .It look like this

1512641213.png


1512641489.png



@+

Last edited by loutch (2017-12-07 10:12:01)

Offline

#765 2017-12-07 14:31:52

unklar
Member
Registered: 2015-10-31
Posts: 668

Re: Show us your conky

loutch wrote:

hello

@ unklar i permice me to change  your conky (1.09) a little  beat .

Hello, my friend, it's an honor to  smile

and this on Mandriva, the distribution that brought me to Linux in 2009

Offline

#766 2017-12-07 14:40:45

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

Re: Show us your conky

unklar wrote:
loutch wrote:

hello

@ unklar i permice me to change  your conky (1.09) a little  beat .

Hello, my friend, it's an honor to  smile

and this on Mandriva, the distribution that brought me to Linux in 2009

Not mandriva (it's also this distribution that makes me come to linux) just any mageia who look like , a little revamped (a little moment of nostalgia) .

@+

Last edited by loutch (2017-12-07 14:42:47)

Offline

#767 2017-12-07 14:47:46

unklar
Member
Registered: 2015-10-31
Posts: 668

Re: Show us your conky

I knew it   lol  lol

Offline

#768 2017-12-08 11:22:39

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 891

Re: Show us your conky

I need to steal ... errrrrr, borrow ? Errrr, respectfully appropriate some of these good looking conky's ! Dang ! big_smile

Offline

#769 2017-12-17 16:45:02

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

Re: Show us your conky

h6VisBjs.png

I saw another Rainmeter skin that I liked, and I have approximated it in conky. See this skin, and also this

If you can, please try out and test the following code. It needs a bit of adjustment to get everything to fit just right. Currently, there are config options for every element. I might remove them in favour of a single global config, which simplifies it but takes away some customization.

Note that the ':' separator, and AM/PM are drawn from the conky.conf

conky.conf

conky.config = {
    -- Conky settings
    background = false,
    update_interval = 1,
    cpu_avg_samples = 2,
    net_avg_samples = 2,
    override_utf8_locale = true,
    double_buffer = true,
    no_buffers = true,
    short_units = true,
    text_buffer_size = 2048,
    imlib_cache_size = 0,
    use_xft = true,
    font = 'sans:size=50',
    xftalpha = 1,
    own_window_type = 'desktop',
    own_window_hints = 'undecorated,sticky,skip_taskbar,skip_pager,below',
    own_window = true,
    own_window_transparent = true,
    -- own_window_argb_visual = true,
    -- own_window_colour = '303030',
    default_color = '5dacba',
    border_inner_margin = 0,
    border_outer_margin = 0,

    minimum_width = 1350,
    minimum_height = 720,
    alignment = 'top_left',
    gap_x = 10,
    gap_y = 30,

    -- Graphics settings
    draw_shades = false,
    draw_outline = false,
    draw_borders = false,
    draw_graph_borders = false,

    -- Lua load
    lua_load = 'running_clock.lua',
    lua_draw_hook_pre = 'main',
};

-- we set the ':' and AM/PM here
conky.text = [[
${voffset 125} ${goto 955}: \
${voffset 5}${goto 1060}${time %p}
]];

running_clock.lua It could use a better name

--[[
running_clock.lua
lua script for running_clock conky
easysid
Sunday, 17 December 2017 15:57 IST

Based on the Sasuke Theme Rainmeter by Quantum99 (http://fav.me/d6ykk0m)

Credits:
* mrpeachy, for the out() function
* rainmeter skin http://fav.me/d6ykk0m
--]]

require 'cairo'

--
-- There are two tables
-- settings_t1 draws the date, and time
-- settings_t2 draws the day, and month
-- IMPORTANT - The separator ':' for Hours and minutes, as well as AM/PM,
-- is drawn in the conkyrc. This might be fixed in the future
--

settings_t1 = { -- This table draws the vertical text - date and time
    {
    arg='%d',                   -- date. See man date, or strftime
    max = 31,                   -- maximum value
    x = 400,                    -- x position
    y = 520,                    -- y position
    font = 'sans',              -- font face
    size = '25',                -- font size
    text_color = {0x5dacba, 1}, -- color for the actual text
    base_color = {0x404040, 1}, -- color for the trail
    trail = 7,                  -- number of trail after the text
    trail_back = nil;           -- trail before text. nil value means all the remaining trail
    },
    {
    arg='%I',                   -- hours in 12hr format. See man date, or strftime
    max = 12,
    x = 950,
    y = 200,
    font = 'sans',
    size = '60',
    text_color = {0x5dacba, 1},
    base_color = {0x202020, 0.7},
    justify='r',                 -- text justification - right (default left)
    trail = 2,
    trail_back = 2;
    },
    {
    arg='%M',                   -- Minutes. See man date, or strftime
    max = 60,
    x = 980,
    y = 200,
    font = 'sans',
    size = '60',
    text_color = {0x5dacba, 1},
    base_color = {0x202020, 0.7},
    trail = 2,
    trail_back = 2;
    }
} -- end settings_t1

settings_t2 = { -- This table draws the horizontal text - day, and month
    {
    arg='%m',                   -- month in decimal format. See man date, or strftime
    max=12,
    x = 440,
    y = 520,
    font = 'sans',
    size = '25',
    text_color = {0x5dacba, 1},
    base_color = {0x404040, 1},
    trail = 45,
    left_pad = 60,              -- left side padding to make space for date
    -- translate the following table for your own language
    names = {"JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY",
                "AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"}
    },
    {
    arg='%u',                   -- day of the week. See man date, or strftime
    max=7,
    x = 440,
    y = 560,
    font = 'sans',
    size = '38',
    text_color = {0x5dacba, 1},
    base_color = {0x404040, 1},
    trail = 26,
    left_pad = 60,              -- left side padding to make space for date
    -- translate the following table for your own language
    names = {"SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY",
                "THURSDAY", "FRIDAY", "SATURDAY"}
    }
} -- end settings_t2

-- ********** You should not need to change anything below this **********


-- main function.
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}'))
    -- Code here
    if updates > 2 then
        for i in ipairs(settings_t1) do
            draw_date(settings_t1[i])
        end --for
        for i in ipairs(settings_t2) do
            draw_day(settings_t2[i])
        end --for
    end
    -- Code here
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
end

function draw_date(t)
   local just = t.justify or "l"
   local value = tonumber(os.date(t.arg))
   if t.trail_back == nil then t.trail_back = t.max - t.trail - 1 end
   local dy = 1.2*get_extents(t.font, t.size, value, nil)
   -- draw main text
   out({x=t.x, y=t.y, fs=t.size, f=t.font, c=t.text_color, txt=value, hj=just})
   -- draw forward trail
   for i = 1, t.trail do
       local v = value + i
       if v > t.max then v = v%t.max end
       out({x=t.x, y=t.y+i*dy, fs=t.size, f=t.font, c=t.base_color, txt=v, hj=just})
   end
   -- draw back trail
   for i = 1, t.trail_back  do
       local v = value - i
       if v < 1 then v = v + t.max end
       out({x=t.x, y=t.y-i*dy, fs=t.size, f=t.font, c=t.base_color, txt=v, hj=just})
   end
end --end draw_date

function draw_day(t)
   local value = tonumber(os.date(t.arg))
   local s=''
   for i = value+1, #t.names do s = s..t.names[i] end
   for i = 1, value -1 do s = s..t.names[i] end
   local rhs = s:sub(1, t.trail)
   local lhs = s:sub(t.trail+1)
   s = t.names[value]
   local dx = get_extents(t.font, t.size, s, 'width')
   out({x=t.x, y=t.y, fs=t.size, f=t.font, c=t.text_color, txt=s})
   out({x=t.x+dx, y=t.y, fs=t.size, f=t.font, c=t.base_color, txt=rhs})
   out({x=t.x-t.left_pad, y=t.y, fs=t.size, f=t.font, c=t.base_color, txt=lhs, hj='r'})
end --end draw_day

function get_extents(font, size, text, ext)
    local extents=cairo_text_extents_t:create()
    local e = 0
    tolua.takeownership(extents)
    cairo_select_font_face (cr,font)
    cairo_set_font_size(cr,size)
    cairo_text_extents(cr,text,extents)
    if ext == 'width' then
        e = extents.width
    else
        e = extents.height
    end
    return e
end --end get_extents

function out(txj)
   -- Taken from mrpeachy's wun.lua
   -- args: c,a,f,fs,face,x,y,txt,hj,vj,ro,sxo,syo,sfs,sface,sc,sa
    local extents=cairo_text_extents_t:create()
    tolua.takeownership(extents)
    local function justify(jtxt,x,hj,y,vj,f,face,fs)
        if face=="normal" then
            face={f,CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL}
        elseif face=="bold" then
            face={f,CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_BOLD}
        elseif face=="italic" then
            face={f,CAIRO_FONT_SLANT_ITALIC,CAIRO_FONT_WEIGHT_NORMAL}
        elseif face=="bolditalic" then
            face={f,CAIRO_FONT_SLANT_ITALIC,CAIRO_FONT_WEIGHT_BOLD}
        else
            print ('face not set - "normal","bold","italic","bolditalic"')
        end
        cairo_select_font_face (cr,face[1],face[2],face[3])
        cairo_set_font_size(cr,fs)
        cairo_text_extents(cr,jtxt,extents)
        local wx=extents.x_advance
        local wd=extents.width
        local hy=extents.height
        local bx=extents.x_bearing
        local by=extents.y_bearing+hy
        local tx=x
        local ty=y
        --set horizontal alignment - l, c, r
        if hj=="l" then
            x=x-bx
        elseif hj=="c" then
            x=x-((wx-bx)/2)-bx
        elseif hj=="r" then
            x=x-wx
        else
            print ("hj not set correctly - l, c, r")
        end
        --vj. n=normal, nb=normal-ybearing, m=middle, mb=middle-ybearing, t=top
        if vj=="n" then
            y=y
        elseif vj=="nb" then
            y=y-by
        elseif vj=="m" then
            y=y+((hy-by)/2)
        elseif vj=="mb" then
            y=y+(hy/2)-by
        elseif vj=="t" then
            y=y+hy-by
        else
            print ("vj not set correctly - n, nb, m, mb, t")
        end
        return face,fs,x,y,rad,rad2,tx,ty
    end--justify local function #################
    --set variables
    local c=txj.c 			or {0xffffff, 1}
    local a=txj.a 			or 1
    local f=txj.f 			or "monospace"
    local fs=txj.fs 	    or 12
    local x=txj.x 		    or 100
    local y=txj.y 			or 100
    local txt=txj.txt 		or "text"
    local hj=txj.hj 		or "l"
    local vj=txj.vj 		or "n"
    local face=txj.face		or "normal"
    --print text ################################
    local face,fs,x,y=justify(txt,x,hj,y,vj,f,face,fs)
    cairo_select_font_face (cr,face[1],face[2],face[3])
    cairo_set_font_size(cr,fs)
    cairo_move_to (cr,x,y)
    cairo_set_source_rgba (cr,rgba_to_r_g_b_a(c))
    cairo_show_text (cr,txt)
    cairo_stroke (cr)
    return nx
end--function out

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

Last edited by easysid (2017-12-17 16:57:44)

Offline

#770 2017-12-17 17:12:37

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

Re: Show us your conky

easysid wrote:

I saw another Rainmeter skin that I liked, and I have approximated it in conky.

Hopefully will be more active in forums come January.

Have this bookmarked to test, looks really nice!!
  Thank youi


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: s12 Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4)
Desktop: Openbox 3.5.2 dm: (startx) Distro: Debian GNU/Linux 8

Offline

#771 2017-12-17 20:31:46

unklar
Member
Registered: 2015-10-31
Posts: 668

Re: Show us your conky

@easysid
It is rare here that conky1.10 works immediately.  angel

This is my result  (scrot. moe is broken at the moment)
06bfc9691189093.jpg

: AM/PM   have I not yet understood

PS: not yet correct   wink
bd1f7d691228803.jpg

...
${voffset 5}${goto 1060}${time %p}
..

ought to be wrong


PS2: hm, I can comment out the code line (#) big_smile  still I miss the number 0 (e. g. 22:09)

Last edited by unklar (2017-12-18 10:40:48)

Offline

#772 2017-12-18 03:07:51

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,217

Re: Show us your conky

I'd like to ask a question. There is a strange pixel showing in conky, after the gateway number:
conk.png

Code is something like this:

${if_up wlp0}${color grey}Net:
${color grey}Down: $color${downspeed wlp0}${alignr}${downspeedgraph wlp0 20,160 474747 E9E9E9}
${color grey}Total Down: $color$alignr${totaldown wlp0}
${color grey}Up: $color${upspeed wlp0}${alignr}${upspeedgraph wlp0 20,160 474747 E9E9E9}
${color grey}Total Up: $color$alignr${totalup wlp0}
${color grey}Local IP:$color$alignr${addr wlp0} 
${color grey}Gateway:$color$alignr${gw_ip wlp0}${endif}

Any ideas maybe why it is there?

Offline

#773 2017-12-18 10:22:21

unklar
Member
Registered: 2015-10-31
Posts: 668

Re: Show us your conky

^ martix, I would have guessed now on the "MATLAB-Script/Function" of the Conky.
But it's not. I can't see a "strange pixel" here.

e3c59f691672583.jpg


Images with mrneilypops scrot.moe still does not work
I can't see your picture!
   sad

Offline

#774 2017-12-18 14:16:48

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,217

Re: Show us your conky

^The image works for me here in the thread with scrot.moe, all of the pictures look ok. Maybe it's got something to do with a forum setting.

Thank you for testing. That pixel is really annoying on the desktop and I have no idea why it is there. That part of conky looks basically the same for me, the end of the local IP line is not aligned correctly to the right. If I close conky, that pixel goes away.

Last edited by martix (2017-12-18 14:19:53)

Offline

#775 2017-12-18 15:25:01

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

Re: Show us your conky

@unklar, @Sector11

Thanks smile

Offline

Board footer

Powered by FluxBB