Návod:
1) treba nainstalovať niekoľko balíkov - samozrejme conky, a okrem nich conkyforecast, conkyemail, conky exaile. Conky sú samozrejme v rezitároch. Pre dalšie balíky treba pridať zdroj:
sudo wget -q http://www.kaivalagi.com/ubuntu/ppa/m-buck-conky-jaunty.list -O /etc/apt/sources.list.d/m-buck-conky-jaunty.list
ďalej treba pridať klúč pre prístup k zdroju
wget -q http://www.kaivalagi.com/ubuntu/ppa/m-buck-conky-key.gpg -O- | sudo apt-key add -
Obnoviť zdroje a nainstalovať vyššie uvedené balíky.
2) Ďalej treba doplniť fonty: PizzaDude Bullets, StyleBats, Pie charts for maps, ConkyWeather. Niektoré sú súčasťou balíčkov, ostatné sa dajú nájsť a stiahnuť na
http://www.dafont.com/ Treba ich uložiť do domáceho priečinka do skrytej zložky "fonts"
3) všetko spúšťam startovacím scriptom, ktorý je ako skrytý súbor uložený v mojom domácom priečinku a spúšťam ho pri startu
#!/bin/sh
sleep 30 && conky -c /home/pavel/.conkyrc |conky -c /home/pavel/.conkyrc3 |conky -c /home/pavel/.conkyrc1 &
Je potrebné nastaviť mu spustiteľný príznak.
4) systémový script
# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
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 250 0
#maximum_width 250
# 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_margin 5
# border width
border_width 1
# Default colors and also border colors
default_color 626262
#default_shade_color black
#default_outline_color white
own_window_colour white
# 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 5
gap_y 17
# 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
${color 0066FF}${font ae_AlMothnna:size=10:weight=bold}SYSTÉM ${hr 2}${font}${color}
${color #adde79}${voffset 2}${font OpenLogos:size=16}u${font} Kernel:${color} ${alignr}${kernel}
${color #adde79}${font StyleBats:size=16}A${font} CPU1:${color} ${cpu cpu0}% ${alignr 5}Temp:${acpitemp}˚C ${alignr}${cpubar cpu0 8,60}
${color #adde79}${font StyleBats:size=16}A${font} CPU2:${color} ${cpu cpu1}% ${alignr 5}Temp:${acpitemp}˚C ${alignr}${cpubar cpu1 8,60}
${color #adde79}${font StyleBats:size=16}g${font} RAM:${color} $memperc% ${alignr}${membar 8,60}
${color #adde79}${font Webdings:size=16}~${font} Batéria:${color} ${battery_percent BAT0}% ${alignr}${battery_bar 8,60 BAT0}
${color 0066FF}${font ae_AlMothnna:size=10:weight=bold}TOP PROCESY ${hr 2}${font}${color}
${color #adde79}${top_mem name 1}${color} ${alignr}${top mem 1} %
${color #adde79}${top_mem name 2}${color} ${alignr}${top mem 2} %
${color #adde79}${top_mem name 3}${color} ${alignr}${top mem 3} %
${color #adde79}${top_mem name 4}${color} ${alignr}${top mem 4} %
${color 0066FF}${font ae_AlMothnna:size=10:weight=bold}DÁTUM a ČAS ${hr 2}${font}${color}${voffset 5}
${color #adde79}${alignc 35}${font :size=26}${time %H:%M}${font}${color}
${alignc}${time %A, %e. %B %Y}
${font monospace:size=10}${execpi 3600 cal -m | awk 'NR>1' | sed -e 's/ / /g' -e 's/[^ ] /& /g' -e 's/..*/ & /' -e 's/ \('`date | awk '{print $3}'`'\) /\ $\{color blue\}'`date | awk '{print $3}'`'\$color /'}$font
${color 0066FF}${font ae_AlMothnna:size=10:weight=bold}HDD ${hr 2}${font}${color}
${color #adde79}${voffset 4}${font Pie charts for maps:size=14}7${font} ${voffset -5}Root:${color}
${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
${color #adde79}${font Pie charts for maps:size=14}7${font} ${voffset -5}Home:${color}
${voffset 4}${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}
${color 0066FF}${font ae_AlMothnna:size=10:weight=bold}SIEŤ ${hr 2}${font}${color}
${if_existing /proc/net/route wlan0}
${color #adde79}${voffset -6}${font PizzaDude Bullets:size=14}O${font} Up:${color} ${upspeed wlan0} ${alignr}${upspeedgraph wlan0 8,60 3465A4 729FCF}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down:${color} ${downspeed wlan0} ${alignr}${downspeedgraph wlan0 8,60 3465A4 729FCF}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}Z${font} Signal:${color} ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}a${font} Local Ip:${color} ${alignr}${addr wlan0}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}b${font} Public Ip:${color} ${alignr}${execi 1 ~/.scripts/ip.sh}
${else}${if_existing /proc/net/route ppp0}
${color #adde79}${voffset -6}${font PizzaDude Bullets:size=14}O${font} Up:${color} ${upspeed ppp0} ${alignr}${upspeedgraph ppp0 8,60 3465A4 729FCF}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down:${color} ${downspeed ppp0} ${alignr}${downspeedgraph ppp0 8,60 3465A4 729FCF}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}a${font} Local Ip:${color} ${alignr}${addr ppp0}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}b${font} Public Ip:${color} ${alignr}${execi 1 ~/.scripts/ip.sh}
${else}${if_existing /proc/net/route eth0}
${color #adde79}${voffset -6}${font PizzaDude Bullets:size=14}O${font} Up:${color} ${upspeed eth0} ${alignr}${upspeedgraph eth0 8,60 3465A4 729FCF}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down:${color} ${downspeed eth0} ${alignr}${downspeedgraph eth0 8,60 3465A4 729FCF}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}a${font} Local Ip:${color} ${alignr}${addr eth0}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}b${font} Public Ip:${color} ${alignr}${execi 1 ~/.scripts/ip.sh}
${else}${if_existing /proc/net/route eth1}
${color #adde79}${voffset -6}${font PizzaDude Bullets:size=14}O${font} Up:${color} ${upspeed eth1} ${alignr}${upspeedgraph eth1 8,60 3465A4 729FCF}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}U${font} Down:${color} ${downspeed eth1} ${alignr}${downspeedgraph eth1 8,60 3465A4 729FCF}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}Z${font} Signál:${color} ${wireless_link_qual eth1}% ${alignr}${wireless_link_bar 8,60 eth1}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}a${font} Local Ip:${color} ${alignr}${addr eth1}
${color #adde79}${voffset 4}${font PizzaDude Bullets:size=14}b${font} Public Ip:${color} ${alignr}${execi 1 ~/.scripts/ip.sh}
${else}
${color #adde79}${font PizzaDude Bullets:size=14}4${font} Sieť nedostupná${color}
${endif}${endif}${endif}${endif}
${color 0066FF}${font ae_AlMothnna:size=10:weight=bold}E-MAIL ${hr 2}${font}${color}
${voffset 5}${color #adde79}Amimail:${color} ${goto 130}${font}${execi 600 conkyEmail --servertype=POP --servername=xxxx --username=xxxx --password=xxxx --ssl}
${color #adde79}Gmail:${color} ${goto 130}${font}${execi 600 conkyEmail --servertype=IMAP --servername=xxxx --username=xxxx --password=xxxx --ssl}
${color #adde79}VOG:${color} ${goto 130}${font}${execi 600 conkyEmail --servertype=POP --servername=xxx --username=xxx --password=xxxx}
Namiesto xxx treba samozrejme vyplniť potrebné údaje k mailboxom. Script uložiť ako skrytý do domáceho priečinka pod názvom conkyrc a nastaviť spustiteľný príznak.
5) Script
#!/bin/bash
# eigene öffentliche ip anzeigen
wget http://checkip.dyndns.org/ -q -O - |
grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'
treba uložiť ako ip.sh a uložiť v domácom priečinku do skrytého priečinka "scripts". Tento skriptík zisťuje verejnú ip adresu.
6)Skript Počasie
# System Weather
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer left
# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048
# Update interval in seconds
update_interval 3.0
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
border_margin 9
# border width
border_width 10
# Default colors
default_color 626262
# Text alignment, other possible values are commented
alignment bottom_left
# Gap between borders of screen
gap_x 10
gap_y -250
TEXT
${color 0066FF}${font ae_AlMothnna:size=10:weight=bold}POČASIE ${hr 2}${font}${color}
${goto 130}${execi 300 conkyForecast --location=LOXX0009 --datatype=CN --locale=sk}, ${execi 300 conkyForecast --location=LOXX0009 --datatype=CO}
${goto 130}Aktualizácia: ${alignr} ${execi 300 conkyForecast --location=LOXX0009 --hideunits --datatype=LU -m 0 }
${voffset -40}${color #a6a6a6}${font ConkyWeather:size=85}${execi 300 conkyForecast --location=LOXX0009 --datatype=WF}$color
$font${voffset -167}${goto 130}Vietor: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=WS} ${execi 300 conkyForecast --datatype=WD}
${goto 130}Tlak vzduchu: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --hideunits --datatype=BR}
${goto 130}Tendencia: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=BD}
${goto 130}Vlhkosť: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=HM}
${goto 130}Riziko zrážok: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --startday=0 --datatype=PC}
${goto 130}Východ slnka: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=SR}
${goto 130}Západ slnka: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=SS}
${goto 35}${voffset 10}${color #adde79} ${font :size=20}${execi 300 conkyForecast --location=LOXX0009 --datatype=HT}${color} $font ${voffset -25}${goto 130}Pocitová teplota: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=LT}
${stippled_hr}
${goto 72}${color #adde79}${font :size=12}${execi 300 conkyForecast --location=LOXX0009 --datatype=DW --startday=1}:${font} ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=HT --startday=1} / ${execi 300 conkyForecast --location=LOXX0009 --datatype=LT --startday=1}${color}
${goto 72}${execi 300 conkyForecast --location=LOXX0009 --datatype=CC --startday=1}
${goto 72}Vietor: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=WD --startday=1} / ${execi 300 conkyForecast --location=LOXX0009 --datatype=WS --startday=1}
${goto 72}Vlhkosť: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=HM --startday=1}
${goto 72}Riziko zrážok: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=PC --startday=1}
${voffset -60}${color #a6a6a6}${font ConkyWeather:size=40}${execi 300 conkyForecast --location=LOXX0009 --datatype=WF --startday=1}$font${color}
${stippled_hr}
${goto 72}${color #adde79}${font :size=12}${execi 300 conkyForecast --location=LOXX0009 --datatype=DW --startday=2}:${font} ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=HT --startday=2} / ${execi 300 conkyForecast --location=LOXX0009 --datatype=LT --startday=2}${color}
${goto 72}${execi 300 conkyForecast --location=LOXX0009 --datatype=CC --startday=2}
${goto 72}Vietor: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=WD --startday=2} / ${execi 300 conkyForecast --location=LOXX0009 --datatype=WS --startday=2}
${goto 72}Vlhkosť: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=HM --startday=2}
${goto 72}Riziko zrážok: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=PC --startday=2}
${voffset -60}${color #a6a6a6}${font ConkyWeather:size=40}${execi 300 conkyForecast --location=LOXX0009 --datatype=WF --startday=2}$font${color}
${stippled_hr}
${goto 72}${color #adde79}${font :size=12}${execi 300 conkyForecast --location=LOXX0009 --datatype=DW --startday=3}:${font} ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=HT --startday=3} / ${execi 300 conkyForecast --location=LOXX0009 --datatype=LT --startday=3}${color}
${goto 72}${execi 300 conkyForecast --location=LOXX0009 --datatype=CC --startday=3}
${goto 72}Vietor: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=WD --startday=3} / ${execi 300 conkyForecast --location=LOXX0009 --datatype=WS --startday=3}
${goto 72}Vlhkosť: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=HM --startday=3}
${goto 72}Riziko zrážok: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=PC --startday=3}
${voffset -60}${color #a6a6a6}${font ConkyWeather:size=40}${execi 300 conkyForecast --location=LOXX0009 --datatype=WF --startday=3}$font${color}
${stippled_hr}
${goto 72}${color #adde79}${font :size=12}${execi 300 conkyForecast --location=LOXX0009 --datatype=DW --startday=4}:${font}${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=HT --startday=4} / ${execi 300 conkyForecast --location=LOXX0009 --datatype=LT --startday=4}${color}
${goto 72}${execi 300 conkyForecast --location=LOXX0009 --datatype=CC --startday=4}
${goto 72}Vietor: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=WD --startday=4} / ${execi 300 conkyForecast --location=LOXX0009 --datatype=WS --startday=4}
${goto 72}Vlhkosť: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=HM --startday=4}
${goto 72}Riziko zrážok: ${alignr}${execi 300 conkyForecast --location=LOXX0009 --datatype=PC --startday=4}
${voffset -60}${color #a6a6a6}${font ConkyWeather:size=40}${execi 300 conkyForecast --location=LOXX0009 --datatype=WF --startday=4}$font${color}
Samozrejme treba upraviť. Treba sa zaregistrovať na
http://www.weather.com/services/xmloap.html Na mail prídu potrebné údaje, na stránke
www.weather. com sa dá nájsť kód lokality, pre ktorú chcem zobrazovať počasie. V mojom prípade je kód LOXX0009, čo je Sliač, lebo Banská Bystrica vlastný kód nemá.
Nájdeným kódom prepísať všetky LOXX0009. Upravený skript uložiť ako skrytý do domáceho priečinka pod názvom conkyrc1
7) V domácom priečinku sa nachádza skrytý súbor conkyforecast.config Treba ho upraviť, dopísať do neho Partner_ID a LICENCE_KEY, ktoré nám na mail prídu po registrácii z Weather.com. Pre istotu je možné aj LOCALE = sk.
A zostáva nám skript hudba
# Music
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer right
# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048
# Update interval in seconds
update_interval 3.0
# Minimum size of text area
minimum_size 250 5
maximum_width 250
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
border_margin 9
# border width
border_width 10
# Default colors
default_color 626262
# Text alignment, other possible values are commented
alignment top_left
# Gap between borders of screen
gap_x 5
gap_y 17
# Possible variables to be used:
#
# Variable Arguments Description
# acpiacadapter ACPI ac adapter state.
# acpifan ACPI fan state
# acpitemp ACPI temperature.
# adt746xcpu CPU temperature from therm_adt746x
# adt746xfan Fan speed from therm_adt746x
# battery (num) Remaining capasity in ACPI or APM
# battery. ACPI battery number can be
# given as argument (default is BAT0).
# buffers Amount of memory buffered
# cached Amount of memory cached
# color (color) Change drawing color to color
# cpu CPU usage in percents
# cpubar (height) Bar that shows CPU usage, height is
# bar's height in pixels
# downspeed net Download speed in kilobytes
# downspeedf net Download speed in kilobytes with one
# decimal
# exec shell command Executes a shell command and displays
# the output in torsmo. warning: this
# takes a lot more resources than other
# variables. I'd recommend coding wanted
# behaviour in C and posting a patch :-).
# execi interval, shell Same as exec but with specific interval.
# command Interval can't be less than
# update_interval in configuration.
# fs_bar (height), (fs) Bar that shows how much space is used on
# a file system. height is the height in
# pixels. fs is any file on that file
# system.
# fs_free (fs) Free space on a file system available
# for users.
# fs_free_perc (fs) Free percentage of space on a file
# system available for users.
# fs_size (fs) File system size
# fs_used (fs) File system used space
# hr (height) Horizontal line, height is the height in
# pixels
# i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev
# may be omitted if you have only one I2C
# device. type is either in (or vol)
# meaning voltage, fan meaning fan or temp
# meaning temperature. n is number of the
# sensor. See /sys/bus/i2c/devices/ on
# your local computer.
# kernel Kernel version
# loadavg (1), (2), (3) System load average, 1 is for past 1
# minute, 2 for past 5 minutes and 3 for
# past 15 minutes.
# machine Machine, i686 for example
# mails Mail count in mail spool. You can use
# program like fetchmail to get mails from
# some server using your favourite
# protocol. See also new_mails.
# mem Amount of memory in use
# membar (height) Bar that shows amount of memory in use
# memmax Total amount of memory
# memperc Percentage of memory in use
# new_mails Unread mail count in mail spool.
# nodename Hostname
# outlinecolor (color) Change outline color
# pre_exec shell command Executes a shell command one time before
# torsmo displays anything and puts output
# as text.
# processes Total processes (sleeping and running)
# running_processes Running processes (not sleeping),
# requires Linux 2.6
# shadecolor (color) Change shading color
# stippled_hr (space), Stippled (dashed) horizontal line
# (height)
# swapbar (height) Bar that shows amount of swap in use
# swap Amount of swap in use
# swapmax Total amount of swap
# swapperc Percentage of swap in use
# sysname System name, Linux for example
# time (format) Local time, see man strftime to get more
# information about format
# totaldown net Total download, overflows at 4 GB on
# Linux with 32-bit arch and there doesn't
# seem to be a way to know how many times
# it has already done that before torsmo
# has started.
# totalup net Total upload, this one too, may overflow
# updates Number of updates (for debugging)
# upspeed net Upload speed in kilobytes
# upspeedf net Upload speed in kilobytes with one
# decimal
# uptime Uptime
# uptime_short Uptime in a shorter format
#
# seti_prog Seti@home current progress
# seti_progbar (height) Seti@home current progress bar
# seti_credit Seti@hoome total user credit
#
#
# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument
#
# stuff after 'TEXT' will be formatted on screen
TEXT
${color 0066FF}${font ae_AlMothnna:size=10:weight=bold}MUSIC ${hr 2}${font}${color}
${if_existing /home/pavel/.exaile/music.db-journal}
${voffset -20}
${color #adde79}${font :size=12}Teraz hrá: $alignr ${color #a6a6a6}${execi 5 conkyExaile -n --datatype=AR} $font${color}
Album: $alignr ${execi 5 conkyExaile -n --datatype=AL}
Skladba: $alignr ${execi 5 conkyExaile -n --datatype=TI}
Progress: $alignr ${execi 1 conkyExaile --datatype=PT}/${execi 5 conkyExaile --datatype=LE} (${execi 5 conkyExaile --datatype=PP}%)$alignr$endif
${if_running audacious}
Teraz hrá:${alignr}${color 00ff66}${exec audtool --current-song }${color}
${execi 0.5 audtool --current-song-output-length}/${exec audtool --current-song-length}
${execibar 0.5 expr 100 \* $(audtool --current-song-output-length-seconds) \/ $(audtool --current-song-length-seconds) }$endif
Uložiť do domáceho priečinka ako skrytý súbor conkyrc3 a samozrejme nastaviť spustiteľný príznak.
A to je vše, malo by to fungovať.
Ak som na niečo zabudol, ozvite sa, doplním.