Установка conky на Ubuntu

Поставим для облегчения визуальной настройки приложение Conky Manager http://www.teejeetech.in/p/conky-manager.html

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install conky-manager


Выберем необходимый конфиг и внесем изменения так как необходимо
Мой файл конфигурации conky, который помимо нагрузки отображает также и другую информацию



ls@ls-note:~/.conky/TeejeeTech$ cat Process\ Panel
# **********************************************************************
# "CPU Panel (8-core)" theme for Conky by Tony George (teejee2008@gmail.com)
#
# Webpage: http://teejeetech.blogspot.in/
# **********************************************************************


background yes
double_buffer yes

alignment top_left

border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no

gap_x 100
gap_y 100
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no

own_window yes
own_window_type normal
own_window_transparent yes
own_window_colour 000000
own_window_argb_visual yes
own_window_argb_value 0
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

minimum_size 50 0
stippled_borders 0
update_interval 15
uppercase no
use_spacer none

show_graph_scale no
show_graph_range no

use_xft yes
xftalpha 0.1
xftfont Droid Sans:size=10
color0 white
color1 EAEAEA
color2 FFA300
color3 grey

TEXT
${color2}Current time${color0}${alignr}${time %k:%M}

${color2}File systems${color0}
/ ${alignr}${fs_free /}/${fs_size /}
${fs_bar /}

/home ${alignr}${fs_free /home}/${fs_size /home}
${fs_bar /home}

${color2}CPU ${color0}${alignr}${cpu cpu0}%
${cpubar cpu0 5,}
${top name 1} $alignr ${top cpu 1}%
${top name 2} $alignr ${top cpu 2}%
${top name 3} $alignr ${top cpu 3}%
${top name 4} $alignr ${top cpu 4}%
${top name 5} $alignr ${top cpu 5}%
${top name 6} $alignr ${top cpu 6}%
${top name 7} $alignr ${top cpu 7}%
${top name 8} $alignr ${top cpu 8}%
${top name 9} $alignr ${top cpu 9}%
${top name 10} $alignr ${top cpu 10}%

${color2}RAM ${color0}${alignr}${mem}
${membar 5,}
${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}
${top_mem name 8} $alignr ${top_mem mem_res 8}
${top_mem name 9} $alignr ${top_mem mem_res 9}
${top_mem name 10} $alignr ${top_mem mem_res 10}

${color2}CPU Temperature${color0}
Core0:    ${execi 60 sensors | grep 'Core 0' | cut -c 18-24}
Core1:    ${execi 60 sensors | grep 'Core 1' | cut -c 18-24}

${color2}Public IP:${color0}${execi 3600 wget -q -O /dev/stdout http://checkip.dyndns.org/ | cut -d : -f 2- | cut -d \< -f -1}


Также можно настроить отображение текущей погоды - добавьте в файл конфигурации conky строку которая вызывает weather.sh

${color2}Weather forecast${color0}
${execi 600 /home/ls/bin/weather.sh "Irkutsk"}


И сам скрипт

ls@ls-note:~$ cat /home/ls/bin/weather.sh
#!/bin/sh
#AccuWeather (r) RSS weather tool for conky
#
#USAGE: weather.sh <locationcode>
#
#(c) Michael Seiler 2007

METRIC=1 #Should be 0 or 1; 0 for F, 1 for C

if [ -z $1 ]; then
echo
echo "USAGE: weather.sh <locationcode>"
echo
exit 0;
fi

curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1"; }'

Комментариев нет:

Отправить комментарий