Author Topic: Conky Support, Codes and Screenshots  (Read 161126 times)

PackRat

  • Posts: 2124
    • View Profile
    • PackRat configs on github
Re: Conky Support, Codes and Screenshots
« Reply #420 on: July 04, 2015, 09:19:48 PM »
Quote
(I hope a certain Someone11 is shitting bricks)

I was actually thinking that as well - or at least he will be.  :D

To add to dizzie's list there is also xosview - it's in the repos, highly customizable; but only vertical layout I believe.

Another option would be to get the conky 1.9.0 tarball and use that as the default install. Building from source would require adding the dev files; or could you not install the deb file (it's still in Debian Testing) and apt pin it so it will not get updated?
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

PackRat

  • Posts: 2124
    • View Profile
    • PackRat configs on github
Re: Conky Support, Codes and Screenshots
« Reply #421 on: July 04, 2015, 09:55:59 PM »
Quote
BTW, I am always open to any replacements in VSIDO. The conky default can be replaced at anytime, just shoot me the config and lets vote on it

basic information, some color changes, no graphics, no lua (using lua messes it up if you decide the dock conky in the fluxbox slit):

Code: [Select]
##############################################
# Settings
##############################################
background yes
use_xft yes
# xftfont Cursive Sans:bold:size=6
xftfont Source Sans Pro:bold:size=10
xftalpha 1.0
update_interval 1.0
update_interval_on_battery 30.0
total_run_times 0

own_window yes
own_window_colour 1E1D1D
own_window_transparent no
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class ConkyVsido
own_window_title ConkyInfo
##############################################
# Compositing tips:
# Conky can play strangely when used with
# different compositors. I have found the
# following to work well, but your mileage
# may vary. Comment/uncomment to suit.
##############################################
##
#own_window_argb_visual yes
#own_window_argb_value 2

## xcompmgr
# own_window_argb_visual yes
# own_window_argb_value 120

## cairo-compmgr
#own_window_type desktop
#own_window_argb_visual yes
##############################################

no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
short_units yes
imlib_cache_size 0
pad_percents 1
max_specials 2048
max_user_text 3200
text_buffer_size 1024
no_buffers yes
uppercase no
if_up_strictness address
double_buffer yes
minimum_size 800 0
maximum_width 800
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
border_inner_margin 1
border_outer_margin 1

default_color DAC79C
default_shade_color 000000
default_outline_color 828282
color0 FFFFFF
color1 000000
color2 FF0000 # - red
color3 FFFF00 # - yellow
color4 0000FF # - blue
color5 00FF00 # - green
color6 FFA500 # - orange
color7 00CDCD # - cyan3
color8 FFD700 # - gold
color9 F00F16 # - reddish

alignment tl
gap_x 0
gap_y 0

# -- doesn't seem to work when docked in the slit --#
# lua_load ~/conky/transbg.lua
# lua_draw_hook_pre draw_bg 0 0 0 0 0 0x140C0B 0.10

TEXT
${goto 24}${time %a  %e  %b %k:%M}${offset 24}|${offset 24}\
Uptime:${offset 8}${uptime_short}${offset 24}|${offset 24}\
CPU:${offset 8}${if_match ${cpu}<=50}${color7}${else}${if_match ${cpu}<=70}${color8}${else}${if_match ${cpu}>70}${color9}${endif}${endif}${endif}${cpu cpu0}%${color}${offset 8}${loadavg 1}${offset 8}${loadavg 2}${offset 8}${loadavg 3}${offset 16}${offset 24}|${offset 24}\
Memory:${offset 8}${if_match ${memperc}<=50}${color7}${else}${if_match ${memperc}<=70}${color8}${else}${if_match ${memperc}>70}${color9}${endif}${endif}${endif}${memperc}%${color}



Edit - comment out own_window_argb_visual needs to be:

Code: [Select]
#own_window_argb_visual yes
for a transparent window to work.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

zephyr

  • Posts: 125
  • Never lost, no matter where, you are there.
    • View Profile
    • https://sourceforge.net/projects/crowz/
Re: Conky Support, Codes and Screenshots
« Reply #422 on: July 04, 2015, 10:03:41 PM »
Xlent!:)
CROWZ / STAR / Devuan / refracta / VSIDO

VastOne

  •      v-ger
  • Posts: 4129
    • View Profile
    • VSIDO Community
Re: Conky Support, Codes and Screenshots
« Reply #423 on: July 04, 2015, 10:14:56 PM »
I likes....

thanks RatMan
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4129
    • View Profile
    • VSIDO Community
Re: Conky Support, Codes and Screenshots
« Reply #424 on: July 05, 2015, 08:33:32 PM »
I have made changes to the original .conkyrc so that they are what PackRat's conky shows... I have kept the colors and image the same

Building ISO's now and will post a scrot when done

Thanks
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

Snap

  • Posts: 483
    • View Profile
Re: Conky Support, Codes and Screenshots
« Reply #425 on: July 06, 2015, 07:00:15 AM »
Great. I totally favor the change. Thanks, folks.

jedi

  • DEFCON 1
  • Posts: 1593
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Re: Conky Support, Codes and Screenshots
« Reply #426 on: July 07, 2015, 03:36:53 AM »
Minimal indeed!  Looks great...  8)
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

PackRat

  • Posts: 2124
    • View Profile
    • PackRat configs on github
Re: Conky Support, Codes and Screenshots
« Reply #427 on: July 08, 2015, 05:33:38 PM »
Logged into dwm and spectrwm and conky was wacked - started the default conky.conf file. Tried a couple things and conky 1.10 apparently does not like the no-x configuration files for tiling wm's.

So it's good-bye to conky 1.10 from the repos and back to conky 1.9.x compiled from source.

So yeah, fanden Conky.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

VastOne

  •      v-ger
  • Posts: 4129
    • View Profile
    • VSIDO Community
Re: Conky Support, Codes and Screenshots
« Reply #428 on: July 09, 2015, 05:33:43 AM »
So yeah, fanden Conky.

^ Caused a milk through the nose snort of laughter

 8)
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

PackRat

  • Posts: 2124
    • View Profile
    • PackRat configs on github
Re: Conky Support, Codes and Screenshots
« Reply #429 on: July 13, 2015, 03:23:39 PM »
Appears that the upgrade is not going too well -

Conky 1.10.0 upgrade on Arch Linux.

Double buffering disabled by default - looks like it needs to be enabled when compiled; interesting decision there.

screenshot - conky 1.9 top, conky 1.10 right (working config from arch linux thread) -



if I get bored enough, I may translate my conkyrc's to lua format.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

dizzie

  • DEFCON 1
  • Posts: 729
  • Bastard Operator From Hell
    • View Profile
Re: Conky Support, Codes and Screenshots
« Reply #430 on: July 13, 2015, 04:48:14 PM »



Config:


Code: [Select]
conky.config = {
alignment = 'top_left',
background = true,
color2 = '888888',
cpu_avg_samples = 2,
default_color = 'FFFFFF',
double_buffer = true,
font = 'Caviar Dreams:size=8',
gap_x = 25,
gap_y = 13,
minimum_width = 200,
no_buffers = true,
own_window = true,
own_window_type = 'override',
own_window_transparent = true,
update_interval = 1.0,
short_units = yes,
use_xft = true,
}
conky.text = [[


${voffset 8}$color2${font Caviar Dreams:size=16}${time %A}$font${voffset -8}$alignr$color${font Caviar Dreams:size=38}${time %e}$font
$color${voffset -30}$color${font Caviar Dreams:size=18}${time %b}$font${voffset -3} $color${font Caviar Dreams:size=20}${time %Y}$font$color2$hr
#
${voffset 20}${goto 40}${color}CPU${font Caviar Dreams:bold:size=8}$alignr$cpu%
${voffset 5}${goto 40}$font$color2${top name 1}$alignr$color${top cpu 1}%
${goto 40}$color2${top name 2}$alignr$color${top cpu 2}%
${goto 40}$color2${top name 3}$alignr$color${top cpu 3}%
${goto 40}$color2${top name 4}$alignr$color${top cpu 4}%
${goto 40}$color2${top name 5}$alignr$color${top cpu 5}%
#
${voffset 10}${goto 40}${color}RAM${font Caviar Dreams:bold:size=8}$alignr$mem$font
${goto 40}${voffset 5}$color2${top_mem name 1}$alignr$color${top_mem mem_res 1}
${goto 40}$color2${top_mem name 2}$alignr$color${top_mem mem_res 2}
${goto 40}$color2${top_mem name 3}$alignr$color${top_mem mem_res 3}
${goto 40}$color2${top_mem name 4}$alignr$color${top_mem mem_res 4}
${goto 40}$color2${top_mem name 5}$alignr$color${top_mem mem_res 5}
#
${voffset 20}${goto 40}${color}DRIVES${font Caviar Dreams:bold:size=8}$alignr
${voffset 5}${goto 40}${font}${color2}root $alignr$color${fs_size /} (${fs_used /})
${goto 40}${color2}home $alignr$color${fs_size /home} (${fs_used /home})
${goto 40}${color2}data $alignr$color${fs_size /mnt/data} (${fs_used /mnt/data})
${goto 40}${color2}NAS $alignr$color${fs_size /mnt/share} (${fs_used /mnt/share})
#
${voffset 20}${goto 40}${color}NET${font Caviar Dreams:bold:size=8}$alignr
${voffset 5}${goto 40}${font}${color2}down $alignr$color${downspeedf enp3s0} Kb/s
${goto 40}${color2}up $alignr$color${upspeedf enp3s0} Kb/s


#
${voffset 20}${goto 40}${color}WEATHER ${font Caviar Dreams:bold:size=8}$alignr
${voffset 5}${goto 40}${color2}Silkeborg $alignr$color${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=556914&u=c" -o ~/.cache/weather.xml} ${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°C




#${voffset 20}$alignr$color${execi 5000 awk -F= '/ID=/{printf $2" "} /RELEASE=/{printf $2" "} /NAME=/{print $2}' /etc/lsb-release}
${voffset 5}${color2}${alignr}${execi 1200 whoami}@${nodename}
${alignr}${color2}${font Caviar Dreams:size=8}uptime: ${color}${uptime_short}
${color2}${font Caviar Dreams:size=8}${alignr}kernel: ${color}4.1.1-1
]]

Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |


PackRat

  • Posts: 2124
    • View Profile
    • PackRat configs on github
Re: Conky Support, Codes and Screenshots
« Reply #431 on: July 13, 2015, 05:44:56 PM »


config

Code: [Select]
conky.config = {
out_to_console = true,
out_to_x = false,
background = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
no_buffers = true,
out_to_stderr = false,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
};

conky.text =
[[ Uptime: ${uptime_short}  |  CPU: ${hwmon 2 temp 1} °C   CPU: ${hwmon 2 temp 2} °C  |  CPU%: ${cpu cpu0}%  ${loadavg}  |  Mem: ${memperc}%  | Eth0: Down - ${downspeedf wlp3s0} kb/s  Up - ${upspeedf wlp3s0} kb/s   |   ${time %A %e %b  %k:%M} ]]

@dizzie - have you located any new documentation? Looks like some of the variables are no longer supported - wireless stuff in my configs.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

dizzie

  • DEFCON 1
  • Posts: 729
  • Bastard Operator From Hell
    • View Profile
Re: Conky Support, Codes and Screenshots
« Reply #432 on: July 13, 2015, 06:54:27 PM »
Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |


PackRat

  • Posts: 2124
    • View Profile
    • PackRat configs on github
Re: Conky Support, Codes and Screenshots
« Reply #433 on: July 13, 2015, 07:31:36 PM »
It seems to be a bug - objects like wireless_link_qual, wireless_bitrate, etc .. are not always working. The Arch users think it has to do with IPv6 being disabled (with the kernel parameter) but I'm not using that. Enabled wireless when I build conky-1.10 from source. Just looks to be a few bugs to worked out for conky 1.10.1.

I don't know if this script is installed from the deb repos so I'll post it. It's in the conky-1.10 tar file; lua script that will convert old .conkyrc to new lua format:

Code: [Select]
#! /usr/bin/lua

local usage = [[
Usage: convert.lua old_conkyrc [new_conkyrc]

Tries to convert conkyrc from the old v1.x format to the new, lua-based format.

Keep in mind that there is no guarantee that the output will work correctly
with conky, or that it will be able to convert every conkyrc. However, it
should provide a good starting point.

Altough you can use this script with only 1 arg and let it overwrite the old
config, it's suggested to use 2 args so that the new config is written in a new
file (so that you have backup if something went wrong).

For more information about the new format, read the wiki page
<http://wiki.conky.be/index.php?title=conky2rc_format>
]];

local function quote(s)
    if not s:find("[\n'\\]") then
        return "'" .. s .. "'";
    end;
    local q = '';
    while s:find(']' .. q .. ']', 1, true) do
        q = q .. '=';
    end;
    return string.format('[%s[\n%s]%s]', q, s, q);
end;

local bool_setting = {
    background = true, disable_auto_reload = true, double_buffer = true, draw_borders = true,
    draw_graph_borders = true, draw_outline = true, draw_shades = true, extra_newline = true,
    format_human_readable = true, no_buffers = true, out_to_console = true,
    out_to_ncurses = true, out_to_stderr = true, out_to_x = true, override_utf8_locale = true,
    own_window = true, own_window_argb_visual = true, own_window_transparent = true,
    short_units = true, show_graph_range = true, show_graph_scale = true,
    times_in_seconds = true, top_cpu_separate = true, uppercase = true, use_xft = true
};

local num_setting = {
    border_inner_margin = true, border_outer_margin = true, border_width = true,
    cpu_avg_samples = true, diskio_avg_samples = true, gap_x = true, gap_y = true,
    imlib_cache_flush_interval = true, imlib_cache_size = true,
    max_port_monitor_connections = true, max_text_width = true, max_user_text = true,
    maximum_width = true, mpd_port = true, music_player_interval = true, net_avg_samples = true,
    own_window_argb_value = true, pad_percents = true, stippled_borders = true,
    text_buffer_size = true, top_name_width = true, total_run_times = true,
    update_interval = true, update_interval_on_battery = true, xftalpha = true
};

local split_setting = {
    default_bar_size = true, default_gauge_size = true, default_graph_size = true,
    minimum_size = true
};

local colour_setting = {
    color0 = true, color1 = true, color2 = true, color3 = true, color4 = true, color5 = true,
    color6 = true, color7 = true, color8 = true, color9 = true, default_color = true,
    default_outline_color = true, default_shade_color = true, own_window_colour = true
};

local function alignment_map(value)
    local map = { m = 'middle', t = 'top', b = 'bottom', r = 'right', l = 'left' };
    if map[value] == nil then
        return value;
    else
        return map[value];
    end;
end;

local function handle(setting, value)
    setting = setting:lower();
    if setting == '' then
        return '';
    end;
    if split_setting[setting] then
        local x, y = value:match('^(%S+)%s*(%S*)$');
        local ret = setting:gsub('_size', '_width = ') .. x .. ',';
        if y ~= '' then
            ret = ret .. ' ' .. setting:gsub('_size', '_height = ') .. y .. ',';
        end;
        return '\t' .. ret;
    end;
    if bool_setting[setting] then
        value = value:lower();
        if value == 'yes' or value == 'true' or value == '1' or value == '' then
            value = 'true';
        else
            value = 'false';
        end;
    elseif not num_setting[setting] then
        if setting == 'alignment' and value:len() == 2 then
            value = alignment_map(value:sub(1,1)) .. '_' .. alignment_map(value:sub(2,2));
        elseif colour_setting[setting] and value:match('^[0-9a-fA-F]+$') then
            value = '#' .. value;
        elseif setting == 'xftfont' then
            setting = 'font';
        end;
        value = quote(value);
    end;
    return '\t' .. setting .. ' = ' .. value .. ',';
end;

local function convert(s)
    local setting, comment = s:match('^([^#]*)#?(.*)\n$');
    if comment ~= '' then
        comment = '--' .. comment;
    end;
    comment = comment .. '\n';
    return handle(setting:match('^%s*(%S*)%s*(.-)%s*$')) ..  comment;
end;

local input;
local output;

if conky == nil then --> standalone program
    -- 1 arg: arg is input and outputfile
    -- 2 args: 1st is inputfile, 2nd is outputfile
    -- 0, 3 or more args: print usage to STDERR and quit
    if #arg == 1 or #arg == 2 then
        input = io.input(arg[1]);
    else
        io.stderr:write(usage);
        return;
    end;
else
    -- we are called from conky, the filename is the first argument
    input = io.open(..., 'r');
end;


local config = input:read('*a');
input:close();

local settings, text = config:match('^(.-)TEXT\n(.*)$');

local converted = 'conky.config = {\n' .. settings:gsub('.-\n', convert) .. '};\n\nconky.text = ' ..
                quote(text) .. ';\n';

if conky == nil then
    if #arg == 2 then
        output = io.output(arg[2]);
    else
        output = io.output(arg[1]);
    end
    output:write(converted);
    output:close();
else
    return assert(loadstring(converted, 'converted config'));
end;

in terminal:

Code: [Select]
convert.lua old_conkyrc_file new_conkyrc_file
works well on basic conkyrc files.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

jedi

  • DEFCON 1
  • Posts: 1593
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Re: Conky Support, Codes and Screenshots
« Reply #434 on: July 13, 2015, 08:26:50 PM »
Nice find PackRat!  It is indeed installed when doing a dist-upgrade.  It can be found in /usr/share/doc/conky-all/convert.lua (or /usr/share/doc/conky1.10*)
It needs to be set executable to use and it does a fairly good job converting your orig conkys to the new format.  I have a separate /home/jedi/Conky directory for example.  To use the convert.lua, I went into the above mentioned /usr* directory and changed the permissions to executable.  Then from the terminal, in my case, just as an example;

Code: [Select]
sudo /usr/share/doc/conky-all/convert.lua /home/jedi/Conky/Weather/.conkyrc
So far, it has successfully converted all my conkys EXCEPT for the arclance weather script which extensively uses lua.  I don't believe it to be a problem converting the conkyrc file, but rather a lua issue with how conky now calls it and the X configuration.  (my head is bleeding quite severely from the brick wall I've been banging it into trying to figure this out, so I've taken a time out to soothe my wounds!)  ???

IMO, this has been the stupidest conky upgrade since 1.81 (I think).  That they have so drastically changed the basics is to me inconceivable!!!  But hey, I'm just an end user, so what difference does what I think make?  ::)  >:(  :(  :'(
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous