Классика жанра:
# Use Xft?
use_xft yes
xftfont Sans:size=7
#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_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 200 0
maximum_width 300
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_graph_borders yes
# Stippled borders?
stippled_borders 0
# border margins
border_margin 5
# border width
border_width 5
# Default colors and also border colors
default_color 303030
#default_shade_color white
#default_outline_color black
own_window_colour 262626
# 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 10
gap_y 1
# 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 1
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 1
# 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
${image /etc/conky/scripts/tlo.png -p -1,0 -s 600x1023}
${color ff4848}${font OpenLogos:size=55}S${voffset -30}${color white}${font Arial Black:size=18}${offset 4}${time %H:%M}${color EE3A03}${font Arial Black:size=12}${time :%S}${font}
${color 98c2c7}${font Arial Black:size=10}${offset 60}${time %A %d %Y}${voffset 6}
${offset 35}${font Arial Black:size=8}${color white}$kernel $machine}${color white}
${font StyleBats:size=15}K${font} Core 0 ${alignr}${cpu cpu0}% ${cpugraph cpu0 cpu1 10,70 262626 CCCCCC}
${font StyleBats:size=15}k${font} Core 1 ${alignr}${cpu cpu1}% ${cpugraph cpu1 10,70 262626 CCCCCC}
${font StyleBats:size=15}y${font} RAM ${alignr}$memperc% ${memgraph 10,70 262626 CCCCCC}
${font PizzaDude Bullets:size=15}p${font} SWAP ${alignr}$swapperc% ${color white}${swapbar 10,70}${color white}${color white}
${font StyleBats:size=15}p${font} Uptime${alignr}${uptime}
${font Arial Black:size=8}TEMP ${hr 1}${color white}
${color DD0000}${font weather:size=45}y ${font}${color white} ${voffset -50}
#${offset 20}CPU Temp: ${alignr}${color white}${execi 4 sensors | grep -A 0 'temp2' | cut -c15-16}°C${color white}
#${offset 20}MB Temp: ${alignr}${color white}${execi 4 sensors | grep -A 0 'temp1' | cut -c15-16}°C${color white}
${offset 20}CPU Temp: ${alignr}${color white}${hwmon temp 1}°C${color white}
${offset 20}MB Temp: ${alignr}${color white}${hwmon temp 2}°C${color white}
${offset 20}Core 0: ${alignr}${color white}${execi 300 sensors | grep Core\ 0 | cut -c15-16 ;}°C${color white}
${offset 20}Core 1: ${alignr}${color white}${execi 300 sensors | grep Core\ 1 | cut -c15-16 ;}°C${color white}
${offset 20}HDD: ${pre_exec nc localhost 7634 | sed -e 's/|[[:digit:]]\{2,4\}|C|/\n/g' | grep sda | sed -e 's/|.*|//'} ${alignr} ${hddtemp /dev/sda}°C
${offset 20}GPU GTX: ${alignr}${color white}${execi 20 nvidia-settings -q gpucoretemp |grep Attribute |awk '{print $4}' |cut -c1-2}°C
${offset 20}CPU fan speed (об/мин): ${alignr}${color white}${hwmon fan 1}
${font Arial Black:size=8}HDD ${hr 1}
${font}Использование ${alignr}${fs_used /}/${fs_size /}
${fs_used_perc /}%${alignr}${fs_bar 7,120 /}
${diskiograph 15,160 262626 238B23}${color white}
${color A0D647}${font Martin Vogel's Symbols:size=20}m${font}${color white}${voffset -5}${offset 5}${font Arial Black:size=8} ${execi 1 /etc/conky/scripts/ip.sh} ${hr 1}${if_existing /proc/net/route wlan0}
${font PizzaDude Bullets:size=10}O${font} Up${alignr}${upspeed wlan0}kb/s${alignr}${upspeedgraph wlan0 10,70 262626 FF3C00}}
${font PizzaDude Bullets:size=10}U${font} Do${alignr}${downspeed wlan0}kb/s${alignr}${downspeedgraph wlan0 10,70 262626 3AE813}
${font PizzaDude Bullets:size=10}N${font} Upload:${alignr}${totalup wlan0}
${font PizzaDude Bullets:size=10}T${font} Download:${alignr}${totaldown wlan0}
${font PizzaDude Bullets:size=10}Z${font}${wireless_essid wlan0} Signal${alignr}${wireless_link_qual wlan0}%${wireless_link_bar 15,160 wlan0}
#${font PizzaDude Bullets:size=10}a${font}Local Ip:${alignr}${addr wlan0}
#${font PizzaDude Bullets:size=10}b${font}Public Ip:${alignr}${execi 1 /etc/conky/scripts/ip.sh}
${else}${if_existing /proc/net/route eth0}
${font PizzaDude Bullets:size=10}O${font}Исход${alignr}${upspeed eth0} kb/s ${alignr}${upspeedgraph eth0 10,70 262626 FF3C00}
${font PizzaDude Bullets:size=10}U${font}Вход${alignr}${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 10,70 262626 3AE813}
${font PizzaDude Bullets:size=10}N${font}Отдано: ${alignr}${totalup eth0}
${font PizzaDude Bullets:size=10}T${font}Получено: ${alignr}${totaldown eth0}
#${font PizzaDude Bullets:size=10}a${font}Local Ip:${alignr}${alignr}${addr eth0}
#${font PizzaDude Bullets:size=10}b${font}Public Ip:${alignr}${alignr}${execi 1 /etc/conky/scripts/ip.sh}${endif}${else}
${font PizzaDude Bullets:size=10:bold}4${voffset -2}${font}Network Unavailable ${endif}
${hr 1}
${if_running audacious2}${color 0784C2}${font Musicelements:size=25}p${font}${color white}${voffset -30}
${color white}${font Dialtone:size=15}${offset 15}AUDACIOUS${font}${color white}${voffset 12}${voffset -12}
${offset 40}your music, your way.${color white}${voffset 1}
${exec audtool2 --current-song | cut -b-32}
${exec audtool2 --current-song-bitrate-kbps} kbps ${alignr}${alignr}${exec audtool2 --current-song-output-length} / ${exec audtool2 --current-song-length}
${execbar expr 100 \* $(audtool2 --current-song-output-length-seconds) \/ $(audtool2 --current-song-length-seconds)}
${hr 1}
${endif}${color FFE515}${font Martin Vogel's Symbols:size=15}i${font}${color DB008B}${font Arial Black:size=8} Загрузка ЦП ${color white}${font}$alignr CPU% MEM%
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}
${top name 4}$alignr${top cpu 4}${top mem 4}
${top name 5}$alignr${top cpu 5}${top mem 5}
${hr 1}
${color FFE515}${font Martin Vogel's Symbols:size=15}i${font}${color DB008B}${font Arial Black:size=8} Загрузка ОЗУ ${color white}${font}$alignr CPU% MEM%
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}
${top_mem name 4}$alignr${top_mem cpu 4}${top_mem mem 4}
${top_mem name 5}$alignr${top_mem cpu 5}${top_mem mem 5}
${font Arial Black:size=8}Погода ${hr}
${if_existing /proc/net/route eth0}
${voffset -10}${alignr 56}${font ConkyWeather:style=Bold:size=40}${execi 600 conkyForecast --location=RSXX0412 --datatype=WF}${font}
${voffset -50}${font Weather:size=40}y${font} ${voffset -38}${font Arial black:size=26}${execi 600 conkyForecast --location=RSXX0412 --datatype=HT}${font}
${voffset 0}${alignc 48}${execpi 600 conkyForecast --location=RSXX0412 --datatype=DW --startday=1 --shortweekday} ${alignc 6}${execpi 600 conkyForecast --location=RSXX0412 --datatype=DW --startday=2 --shortweekday} ${alignc -38}${execpi 600 conkyForecast --location=RSXX0412 --datatype=DW --startday=3 --shortweekday} ${alignc -80}${execpi 600 conkyForecast --location=RSXX0412 --datatype=DW --startday=4 --shortweekday}
${voffset 0}${alignc 75}${font ConkyWeather:size=28}${execpi 600 conkyForecast --location=RSXX0412 --datatype=WF --startday=1 --endday=4 --spaces=2}${font}
${voffset 0}${font DejaVu Sans:size=8}${alignc 50}${execpi 600 conkyForecast --location=RSXX0412 --datatype=HT --startday=1 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=RSXX0412 --datatype=LT --startday=1 --hideunits --centeredwidth=3} ${alignc -12}${execpi 600 conkyForecast --location=RSXX0412 --datatype=HT --startday=2 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=RSXX0412 --datatype=LT --startday=2 --hideunits --centeredwidth=3} ${alignc -48}${execpi 600 conkyForecast --location=RSXX0412 --datatype=HT --startday=3 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=RSXX0412 --datatype=LT --startday=3 --hideunits --centeredwidth=3} ${alignr 2}${execpi 600 conkyForecast --location=RSXX0412 --datatype=HT --startday=4 --hideunits --centeredwidth=3}/${execpi 600 conkyForecast --location=RSXX0412 --datatype=LT --startday=4 --hideunits --centeredwidth=3}${font}
${endif}
${font Arial Black:size=8}Календарь ${hr}
${voffset 4}${font RsbillsDng:size=16}O${font} ${execp /etc/conky/scripts/ConkyCalendar.py}
${color white}${font Arial Black:size=8}Почта ${hr}
${offset 2}${font Webdings:size=16}ö${font} Почтовый ящик: ${alignr}${color white}${execpi 300 conkyEmail --servertype=POP --servername=pop.mail.ru --username=*****@**** --password=*******} новых писем${color white}
Скрипт ConkyCalendar.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, time, calendar
FORMATBEGIN = "${color f78c16}"
FORMATEND = "${color}"
def getMonthDaysFormatted():
today = int(time.strftime("%d"))
cal = calendar.Calendar(calendar.MONDAY)
month = cal.monthdayscalendar(int(time.strftime("%Y")), int(time.strftime("%m")))
for weekID in xrange(len(month)):
for dayID in xrange(7):
if month[weekID][dayID] == 0:
month[weekID][dayID] = " "
elif month[weekID][dayID] == today:
month[weekID][dayID] = "%s% 2s%s" % (FORMATBEGIN, month[weekID][dayID], FORMATEND)
else:
month[weekID][dayID] = "% 2s" % month[weekID][dayID]
month[weekID] = " ".join(month[weekID])
return "\n$alignc ".join(month)
def getCalendarHeader():
header = ""
monthYear = "%s %s" % (time.strftime("%B"), time.strftime("%Y"))
side = " "*((20-len(monthYear))/2)
monthYear = "%s%s%s" % (side, monthYear, side)
if len(monthYear) < 20:
monthYear = "%s " % monthYear
weekHeader = "$alignc Пн Вт Ср Чт Пт Сб Вс"
header = "%s\n%s\n" % (monthYear, weekHeader)
return header
def getFormattedCalendar():
header = "$alignc "+getCalendarHeader()
weeks = "$alignc "+getMonthDaysFormatted()
return "%s%s" % (header, weeks)
print(getFormattedCalendar())
Кстати может кто подскажет почему вот эти строчки на пашут:
Не выдает название жесткого диска: (стр.101)
${offset 20}HDD: ${pre_exec nc localhost 7634 | sed -e 's/|[[:digit:]]\{2,4\}|C|/\n/g' | grep sda | sed -e 's/|.*|//'} ${alignr} ${hddtemp /dev/sda}°C
Вот это строка ваще не понял зачем нужна: (стр.124)
${font PizzaDude Bullets:size=10:bold}4${voffset -2}${font}Network Unavailable ${endif}