Conky и все что с ними связано
Добавлено: 17 мар 2018, 01:18
Подскажите, как подключить информацию о температуре. Может сенсор не работает?
${color #ff9966}Температура на ЦП: ${alignr}${color white}${execi 2 sensors | grep temp1 | cut -c 15-16}°С
temp1
у тебя норм. В коньках +3 потому что ты выдернул криво вот и все. Нужно поправить в коньках.выдернул по-другому с ключом f , получилось вот так показывает верно, но что-то много лишнего
Код: Выделить всё
${execi 5 sensors | grep id | awk '{ print $4 }' | sed 's#+##'}
Код: Выделить всё
${execi 5 sensors | grep temp1 | head -1 | awk '{ print $2 }'}
skew_x
, но поигравшись в разных ракурсах результата не добилсяКод: Выделить всё
# "Info Panel" theme for Conky by Victor Dobrov, занимает одну клетку Рабочего стола (значки 64х64)
double_buffer yes
alignment middle_right
border_width 2
cpu_avg_samples 2
default_color white
default_outline_color black
default_shade_color black
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
border_inner_margin 1
border_outer_margin 0
# Desktop 1920x1080
gap_x 2
gap_y 120
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
minimum_size 120 0
maximum_width 120
stippled_borders 0
own_window yes
own_window_transparent no
own_window_colour 083061
own_window_argb_visual no
own_window_argb_value 128
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
update_interval 2.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
use_xft yes
xftalpha 0.1
short_units yes
font DejaVuSans:pixelsize=10
color0 808080 #серый
color1 60A0FF #ярко-синий
color2 FFA800 #оранжевый
color3 F0E800 #жёлтый
color4 FFB0c0 #светло-фиолетовый
color5 F8D040 #swap
color6 50D030 #зелёный
color7 FF6040 #красный
color8 00F0F0 #ярко-фиолетовый
top_name_width 15
TEXT
${voffset -3}${color2}${cpubar cpu0 4}
# загрузка CPU:
${color6}${if_match ${cpu cpu0}>20}${color8}${endif}${if_match ${cpu cpu0}>50}${color3}${endif}${if_match ${cpu cpu0}>70}${color2}${endif}${voffset -5}${font :pixelsize=10:bold}CPU${font} ${cpu cpu0}${if_match ${cpu cpu0}<100}%${endif}\
# температура CPU:
$alignr ${font DejaVuSansCondensed:pixelsize=10}${color2}${if_empty ${hwmon 2 temp 1}}${if_empty ${hwmon 1 temp 1}}${if_empty ${hwmon 0 temp 1}}??${else}${hwmon 0 temp 1}${endif}${else}${hwmon 1 temp 1}${endif}${else}${hwmon 2 temp 1}${endif}℃ ${font}$alignr${color2}${voffset -1}${cpugraph cpu0 10,40 20b040 f0e0f0 -l -t}
# топ процессов, загружающих CPU:
${color4}${voffset -1}${font :pixelsize=10:bold}${top name 1}${font}$alignr ${top cpu 1}%
# пропустить имя процесса:
${voffset -3}${font :pixelsize=9}${color white}${if_match "${top_name 2}" != "conky"}${top name 2}$alignr ${top cpu 2}${else}${top name 3}$alignr ${top cpu 3}${endif}%${font}
${voffset -5}${color6}${if_match ${memperc}>50}${color5}${endif}${if_match ${memperc}>90}${color7}${endif}${membar 3}
# RAM
${voffset -5}${font :pixelsize=10:bold}RAM ${mem} $alignr${color gray}${voffset -1}◀${voffset 1} ${memeasyfree}${font}
# $alignr${color6}${membar 7,22}
# Кэш
${voffset -5}${color white}${font Fira Sans Condensed:size=10}${if_match ${memperc}>90}${color7}${endif}${execi 20 mem=$(free -m | sed 's/ */ /g;2!d' | cut -d ' ' -f3); if test $mem -ge 1000; then echo $(echo "scale=2;$mem/1024" |bc)G; else echo "$mem"M; fi} ${color D0D0F0}${font Fira Sans:pixelsize=10}Кэш ${color white}${buffers}${color5}${font Fira Sans Condensed:pixelsize=10}$alignr SWAP ${font}${voffset 0}${swapbar 6,15}
# топ процессов, загружающих память:
${voffset -2}${color4}${font :pixelsize=10:bold}${top_mem name 1}${font}$alignr ${top_mem mem_res 1}
# ${color4}${scroll 9 1 ${top_mem name 1}} ${top_mem mem_res 1} $alignr${scroll 4 1 ${top_mem name 2}}
${voffset -7}$alignr${color 607080}${swapbar 0,43}
${voffset -8}${color2}Задач: $running_processes $alignr${color7}в Фоне: $processes
${voffset -2}${color white}${font Nimbus Sans Narrow:size=10}Home ${font}${voffset 0}${color gray}${fs_free /home}$alignr ${color e0d000}${voffset -2}${font Fira Sans Condensed:size=9}Data ${font}${color gray}${voffset 0}${fs_free /home/user/Downloads}
# синий цвет - есть Интернет (google), иначе красный
${voffset -2}${color lightskyblue}${if_empty ${execi 60 ping -w1 -c1 8.8.8.8>/dev/null&& echo 0}}${color violet}${endif}СЕТЬ${color white}${voffset 0}${font Nimbus Sans Narrow:size=9}$alignr${downspeedf enp0}Kb ${color gray}${voffset -1}${downspeedgraph enp0 8,45}
${voffset -42}
Код: Выделить всё
# Use Xft?
use_xft yes
xftfont DejaVu Sans Mono:size=17
xftalpha 0.8
text_buffer_size 2048
# Update interval in seconds
update_interval 1
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
own_window_class conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
background no
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 180
#maximum_width 200
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
# border width
border_width 1
# Default colors and also border colors
default_color gray
default_shade_color gray
default_outline_color gray
own_window_colour gray
color1 gray
# Text alignment, other possible values are commented
alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 15
gap_y 12
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer none
TEXT
${alignc 40}${font URW Gothic L:size=70}${time %k:%M:%S}${font}
${font DejaVu Sans Mono:size=15}${execpi 60 DJS=`date +%_d`; ncal -C -h | sed 's/^/${goto 60}/' | sed s/"\(^\|[^0-9]\)$alignr$DJS"'\b'/'\1${color f49c04}'"$DJS"'$color'/}${font}
${font Goudy Bookletter 1911:style=Bold:size=17}ОС ${font}${hr 2}
Время работы: $alignr${uptime}
Доступные обновы: $alignr${execi 360 apt-get --just-print upgrade | grep '^Inst ' | wc -l} шт
${font Goudy Bookletter 1911:style=Bold:size=17}ЦП, ОЗУ${font} ${hr 2}
Частота: (${cpu cpu0}%) $alignr${cpubar cpu0 17,120}
Ядро1: (${cpu cpu1}%) ${alignr}${cpubar cpu1 17,120}
Ядро2: (${cpu cpu2}%) ${alignr}${cpubar cpu2 17,120}
Ядро3: (${cpu cpu3}%) ${alignr}${cpubar cpu3 17,120}
Ядро4: (${cpu cpu4}%) ${alignr}${cpubar cpu2 17,120}
ОЗУ: $mem/$memeasyfree $alignr${membar 17,120}
${font Goudy Bookletter 1911:style=Bold:size=17}Трафик${font} ${hr 2}
Принято: ${alignr}${totaldown enp0s7}
Отдано: ${alignr}${totalup enp0s7}
${font Goudy Bookletter 1911:style=Bold:size=17}Процессы${font} ${hr 2}
${top_mem name 1}$alignr${top_mem mem_res 1}
${top_mem name 2}$alignr${top_mem mem_res 2}
${top_mem name 3}$alignr${top_mem mem_res 3}
${top_mem name 4}$alignr${top_mem mem_res 4}
${top_mem name 5}$alignr${top_mem mem_res 5}
${top_mem name 6}$alignr${top_mem mem_res 6}
${top_mem name 7}$alignr${top_mem mem_res 7}