--[[
Conky, a system monitor, based on torsmo
# 54 own_window_type = 'desktop',
Any original torsmo code is licensed under the BSD license

All code written since the fork of torsmo is licensed under the GPL

Please see COPYING for details

Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2019 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
]]

conky.config = {
    alignment = 'bottom_right',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'lightgray',
    default_outline_color = 'green',
    default_shade_color = 'red',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'DejaVu Sans:size=11',
    gap_x = 3,
    gap_y = 0,
    minimum_height = 5,
    minimum_width = 180,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_x = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'sticky',
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    update_interval = 2.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
}

conky.text = [[


$color${font}${font Open Sans:size=40}$alignc ${time %H:%M}$font$color${font Open Sans:size=12}
$alignc ${color3}${time %a}, ${time %d %b %Y}$font$color
$hr
${font Open Sans:Bold:size=10}${color E07A1F}SYS $alignr${color}${font}Void 20210930
DE ${alignr}LXQt 1.0.0
#DE2 ${alignr}LXDE 0.5.0
Installed ${alignr}21.02.2021
Reinstalled ${alignr}05.12.2021
Hostname $alignr $nodename
Kernel $alignr$kernel
Uptime $alignr $uptime
Display ${alignr}${execi 60 xdpyinfo | sed -n -r "s/^\s*dimensions:.*\s([0-9]+x[0-9]+).*/\1/p"}
Workspace ${alignr}${desktop_name}
${font Open Sans:Bold:size=10}${color E07A1F}CPU $color${font}$alignr Intel C1037U
# Для большого неттопа заменить на:
#${font Open Sans:Bold:size=10}${color E07A1F}CPU $color${font}$alignr Intel Core i5 3317U
${color}C1 ${color yellow}${execi 30 sensors | grep 'Core 0' | awk '{print $3}' | sed 's/+//' | sed 's/\.0//g'} ${alignr}${color}${cpu cpu1} % ${color blue}${cpubar cpu1 10,70}
${color}C2 ${color yellow}${execi 30 sensors | grep 'Package' | awk '{print $4}' | sed 's/+//' | sed 's/\.0//g'} ${alignr}${color}${cpu cpu2} % ${color blue}${cpubar cpu2 10,70}
#${font Open Sans:Bold:size=10}${color E07A1F}MEM ${alignr}${font}${color}from ${memmax}
${font Open Sans:Bold:size=10}${color E07A1F}MEM ${alignr}${font}${color}total ${alignr}${color yellow}${execi 2 free -m | grep 'Mem:' | awk '{print $2}'}Mi
#${font}${color}used_full ${color yellow}${font}${mem} ${alignr}${color darkgreen}${membar 10,70}
${font}${color}used ${alignr}${color yellow}${font}${execi 2 free -h  | grep 'Mem:' | awk '{print $3}'} ${alignr}${color darkgreen}${membar 10,70}
#${color}cached ${alignr}${color lightgray}${cached}
${color}cached ${alignr}${color lightgray}${execi 2 free -h  | grep 'Mem:' | awk '{print $6}'}
#${color}shared ${alignr}${color lightgray}${execi 2 free -h  | grep 'Mem:' | awk '{print $5}'}
#swap ${alignr}${color lightgray}${swap}
swap ${alignr}${color lightgray}${execi 2 free -h  | grep 'Swap:' | awk '{print $3}'}
#free ${alignr}${color yellow}${memfree}
#free ${alignr}${execi 2 free -h  | grep 'Mem:' | awk '{print $4}'}
available ${alignr}${color yellow}${execi 2 free -m  | grep 'Mem:' | awk '{print $7}'}Mi
${font Open Sans:Bold:size=10}${color E07A1F}TOP CPU${font}
${color lightgrey}${top name 1}${alignr}${top cpu 1}
${color lightgrey}${top name 2}${alignr}${top cpu 2}
${color lightgrey}${top name 3}${alignr}${top cpu 3}
${font Open Sans:Bold:size=10}${color E07A1F}TOP MEM${font}
${color lightgrey}${top name 1}${alignr}${top mem 1}
${color lightgrey}${top name 2}${alignr}${top mem 2}
${color lightgrey}${top name 3}${alignr}${top mem 3}
${font Open Sans:Bold:size=10}${color E07A1F}FREE SPACE
$color${font}/ ${color yellow}${fs_free /} ${alignr}${color}${fs_bar 6,70 /}
$color${font}home ${color yellow}${fs_free /home} ${alignr}${color}${fs_bar 6,70 /home}
Res ${color yellow}${fs_free /run/media/vvv/Res-vvv}${alignr}${color}${fs_bar 6,70 /run/media/vvv/Res-vvv}
${font Open Sans:Bold:size=10}${color E07A1F}NETWORK
$color${font}enp1s0 ${alignr}${addr enp1s0}
T: ${totaldown enp1s0} ${alignr}${totalup enp1s0}
D: ${downspeed enp1s0}${alignr}U: ${upspeed enp1s0}
]]
