conky config

This commit is contained in:
Alexander Yakovlev 2018-12-11 20:07:15 +07:00
parent 8f0deca164
commit 858b4d3159
2 changed files with 95 additions and 0 deletions

65
.conkyrc Normal file
View file

@ -0,0 +1,65 @@
conky.config = {
use_xft= true,
xftalpha = .1,
update_interval= 5,
total_run_times= 0,
background= true,
own_window= true,
own_window_type= 'dock',
own_window_transparent= false,
own_window_hints= 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_argb_visual= true,
double_buffer= true,
minimum_width= 270,
maximum_width= 270,
minimum_height= 10,
draw_shades= false,
draw_outline= false,
draw_borders= false,
draw_graph_borders= false,
own_window_argb_value= 30,
own_window_colour= '000000',
default_color= 'aec0ff',
color1 = 'a67fff',
color2 = 'ffffff',
default_shade_color= '333333',
default_outline_color= 'black',
alignment= 'top_right',
gap_x= 50,
gap_y= 50,
no_buffers= true,
text_buffer_size = 2048,
uppercase= false,
cpu_avg_samples= 4,
net_avg_samples = 2,
override_utf8_locale= true,
font= 'IBM Plex Sans:style=medium:size=12'
}
conky.text = [[
${color1}
${voffset 20}
${alignr}${font IBM Plex Sans:style=Medium:pixelsize=50}${time %H:%M}${font}
${voffset 10}
${alignr}${font IBM PLex Sans:style=Medium:pixelsize=13}${time %A %d %B %Y}${font}
${color1}Uptime:$color $uptime
${color1}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color1} ${font FontAwesome}${font} CPU Usage:$color $cpu% ${cpubar 4}
$hr
${color1}Name PID CPU% MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
$hr
${font PT Mono:style=medium:size=20}${color2}${execi 30 php ~/.weeklog.php}
]]

30
.weeklog.php Normal file
View file

@ -0,0 +1,30 @@
<?php
$hours = 0;
$chunks = 1;
$hours = $hours + ($chunks * 0.167);
// количество в строке
$row = 5;
// минимальная цель
$min = $row * 3;
// разделитель в строке
$row_delimiter = ' ';
$offset = ' ';
$currow = 1;
$max = $min;
if ($hours > $min) {
$max = $row * ceil($hours / $row);
}
echo $offset;
for ($i = 1; $i <= $max; $i++) {
if ($i <= $hours) {
echo '+';
} else {
echo '-';
}
echo $row_delimiter;
if ($i % $row === 0) {
echo PHP_EOL.$offset;
}
}