--[[
Conky, a system monitor, based on torsmo

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 = 'top_right',
    background = true,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'grey50',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'Source Code Pro:size=12:bold',
    gap_x = 15,
    gap_y = 45,
    minimum_height = 5,
    minimum_width = 5,
    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_type = desktop,
    own_window_argb_visual = true,
	own_window_argb_value = 0,
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[
${color snow}System:$color $kernel
${color snow}Host:$color X360
${color snow}Time:$color $utime
${color snow}Uptime:$color $uptime

CPU$hr
${color snow}Info:$color Intel i5-7200U (4)
${color snow}Frequency:$color $freq MHz${tab 30} ${color snow}Temp:$color ${hwmon 4 temp 1}°C
${color snow}Usage:$color $cpu% ${cpubar 8}
${cpugraph 50,350 000000 ffffff}
${color snow}CPU01:$color ${cpu cpu1}%${goto 110}${cpubar cpu1 8,245}
${color snow}CPU02:$color ${cpu cpu2}%${goto 110}${cpubar cpu2 8,245}
${color snow}CPU03:$color ${cpu cpu3}%${goto 110}${cpubar cpu3 8,245}
${color snow}CPU04:$color ${cpu cpu4}%${goto 110}${cpubar cpu4 8,245}
$font
RAM$hr
${color snow}Usage:$color ${exec echo "scale=2;`free -m |grep 'Mem'| awk -F ' ' '{print $3}'`/1000" |bc}GiB/$memmax - ${exec echo "`free -m |grep 'Mem'| awk -F ' ' '{print $3}'`*100/`free -m |grep 'Mem'| awk -F ' ' '{print $2}'`" |bc}% ${execbar 4 echo "`free -m |grep 'Mem'| awk -F ' ' '{print $3}'`*100/`free -m |grep 'Mem'| awk -F ' ' '{print $2}'`" |bc}
${color snow}Buffer:$color $buffers${tab 30}${color snow}Cached:$color $cached

File systems$hr
${color snow}SSD $color${fs_used /}/${fs_size /} ${fs_bar 6 /}

IO$hr
${color snow}SSD:$color${diskio /dev/nvme0n1}/S${tab 85}${color snow}
${color snow}Read:$color${diskio_read /dev/nvme0n1}/S${tab 85}${color snow}
${color snow}Write:$color${diskio_write /dev/nvme0n1}/S${tab 85}${color snow}

Networking$hr
${color snow}Down:$color ${downspeed wlp58s0}/S ${color snow}${tab 85}Up:$color ${upspeed wlp8s0}/S
${downspeedgraph wlp58s0 32,150 000000 ffffff}  ${upspeedgraph wlp8s0 32,150 000000 ffffff}

TOP$hr
${color snow}Name              PID   CPU%   MEM%$color
${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]
