[attachment=0:35ghzbqm]sss.png[/attachment:35ghzbqm]
현재는 왼쪽처럼 screenlets 의 perfectclock 을 추가해서 이렇게 쓰고 있구요
예전엔 오른쪽처럼 날씨를 넣어서 좀더 길게 썼습니다
왼쪽 건
[code:35ghzbqm]
background no
font Bandal:size=10
#xftfont Bandal:size=10
use_xft yes
xftalpha 0.9
update_interval 3.0
total_run_times 0
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_pager,skip_taskbar
own_window_colour ffffff
double_buffer yes
minimum_size 220 5
maximum_width 220
draw_shades yes
draw_outline no
draw_borders no
#border_width 5
#border_margin 10
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color green
alignment top_right
gap_x 5
gap_y 35
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
#uppercase yes # set to yes if you want all text to be in uppercase
TEXT
${font SDKwangSoo M:size=20}${time %B %d}일(${time %a})${font}${font Sequence BRK:size=20}${alignr}${time %H:%M}${font}
${font Bandal:size=11}${color gray}SYSTEM ${hr 1}${color}${font}
Hostname: ${alignr}${nodename}
Kernel: ${alignr}${kernel}
Uptime: ${alignr}${uptime}
Cpu: ${alignr}${freq} MHz
Processes: ${alignr}${processes} ($running_processes running)
Load: ${alignr}${loadavg}
Cpu1 ${alignr}${cpu cpu1}%
${cpubar cpu1 4}
Cpu2 ${alignr}${cpu cpu2}%
${cpubar cpu2 4}
${cpugraph cpu1 25,107} ${alignr}${cpugraph cpu2 25,107}
Ram ${alignr}${mem} / ${memmax} ($memperc%)
${membar 4}
Swap ${alignr}${swap} / ${swapmax} ($swapperc%)
${swapbar 4}
Highest CPU ${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}
Highest MEM ${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}
${font Bandal:size=11}${color gray}FILESYSTEM ${hr 1}${color}${font}
Root: ${alignr}${fs_free /} / ${fs_size /}
${fs_bar 4 /}
WINXP: ${alignr}${fs_free /media/WINXP} / ${fs_size /media/WINXP}
${fs_bar 4 /media/WINXP}
DATA: ${alignr}${fs_free /media/DATA} / ${fs_size /media/DATA}
${fs_bar 4 /media/DATA}
${font Bandal:size=11}${color gray}NETWORK ${hr 1}${color}${font}
IP: ${alignr}${addr eth0}
Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107} ${alignr}${upspeedgraph eth0 25,107}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}
${font Bandal:size=11}${color gray}${hr 1}${color}${font}
[/code:35ghzbqm]
그리고 날씨 포함된 오른쪽 건
[code:35ghzbqm]
background no
font Bandal:size=10
#xftfont Bandal:size=10
use_xft yes
xftalpha 0.9
update_interval 3.0
total_run_times 0
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_pager,skip_taskbar
own_window_colour ffffff
double_buffer yes
minimum_size 220 5
maximum_width 220
draw_shades yes
draw_outline no
draw_borders no
#border_width 5
#border_margin 10
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color green
alignment top_right
gap_x 5
gap_y 35
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
#uppercase yes # set to yes if you want all text to be in uppercase
TEXT
${font SDKwangSoo M:size=20}${time %B %e}일 (${time %a})${font}${font Sequence BRK:size=20}${alignr}${time %H:%M}${font}
${color white}SYSTEM ${hr 1}${color}
Hostname: $alignr$nodename
Kernel: ${alignr}${kernel}
Uptime: ${alignr}${uptime}
CPU: ${alignr}${freq} MHz
Processes: ${alignr}${processes} (${running_processes running})
Load: ${alignr}$l{oadavg}
CPU1 ${alignr}${cpu cpu1}%
${cpubar cpu1 4}
CPU2 ${alignr}${cpu cpu2}%
${cpubar cpu2 4}
${cpugraph cpu1 25,107} ${alignr}${cpugraph cpu2 25,107}
Ram ${alignr}${mem} / ${memmax} (${memperc}%)
${membar 4}
swap ${alignr}${swap} / ${swapmax} (${swapperc}%)
${swapbar 4}
Highest CPU ${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}
Highest MEM ${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}
${color white}FILESYSTEM ${hr 1}${color}
Root: ${alignr}${fs_free /} / ${fs_size /}
${fs_bar 4 /}
${color white}NETWORK ${hr 1}${color}
Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107} ${alignr}${upspeedgraph eth0 25,107}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}
${color white}WEATHER ${hr 1}${color}
Anyang
${execi 1800 ~/scripts/weather.sh KSXX0002}
Songnam
${execi 1800 ~/scripts/weather.sh KSXX0024}
Seoul
${execi 1800 ~/scripts/weather.sh KSXX0037}
[/code:35ghzbqm]
근데 날씨 포함했던 건 세로가 길어지다보니 뺀게 좀 있군요
사용하실 분은 적절히 골라서 편집하시면 될 것 같습니다
그리고 날씨 포한한 건 conky 만으로는 날씨가 안 나오구요
curl 을 설치하고( sudo apt-get install curl )
~/scripts/weather.sh 파일과
~/scripts/weather.xslt 파일이 필요합니다
weather.sh
[code:35ghzbqm]
#!/bin/sh
Grab weather data from weather.com and format it according to the given XSLT
Script written by boojit
Modified by Hellf[i]re
The orignal script and xslt can be downloaded from http://pondol.com/weather.tar.gz
Usage:
${execi 1800 /home/johan/.weather.sh SWXX0006}
Usage Example:
${execi 1800 /home/user/weather/weather.sh 03833}
your Location ID: use http://xoap.weather.com/search/search?where=[yourcity] to find it
U.S. users can just use their zip code; doubt that works for anyone else though (YMMV)
LOCID=$1
s=standard units, m=metric units
UNITS=m
where this script and the XSLT lives
RUNDIR=~/scripts
there’s probably other stuff besides CURL that will work for this, but i haven’t
tried any others.
you can get curl at http://curl.haxx.se/
CURLCMD=/usr/bin/curl
get it at http://xmlsoft.org/XSLT/
XSLTCMD=/usr/bin/xsltproc
you probably don’t need to modify anything below this point....
CURL url. Use cc=* for current forecast or dayf=10 to get a multi-day forecast
CURLURL="http://xoap.weather.com/weather/local/$LOCID?cc=*&unit=$UNITS&dayf=2"
The XSLT to use when translating the response from weather.com
You can modify this xslt to your liking
XSLT=$RUNDIR/weather.xslt
#filter (if you want to convert stuff to lower-case or upper case or something)
#FILTER="|gawk ‘{print(tolower($0));}’"
eval "$CURLCMD "$CURLURL" 2>/dev/null| $XSLTCMD $XSLT - $FILTER"
[/code:35ghzbqm]
weather.xslt
[code:35ghzbqm]
<!–
This XSLT is used to translate an XML response from the weather.com
XML API.
You can format this file to your liking. Two things you may feel
like doing:
1) Modify the layout of the fields or static text already defined
2) Add other fields from the XML response file that aren't referenced in this
XSLT. You can grab a full list by just doing a:
wget "http://xoap.weather.com/weather/local/$LOCID?cc=*&unit=$UNITS"
(change $LOCID and $UNITS to suit your needs)
–>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:output method="text" disable-output-escaping="yes"/>
<xsl:template match="weather">
<xsl:apply-templates select="cc"/>
<xsl:apply-templates select="dayf/day[@d=‘1’]"/>
</xsl:template>
<xsl:template match="cc">
<xsl:text> Temperature: </xsl:text><xsl:value-of select="tmp"/><xsl:value-of select="/weather/head/ut"/><xsl:if test="tmp != flik"> (Feel: <xsl:value-of select="flik"/><xsl:value-of select="/weather/head/ut"/>)</xsl:if>
<xsl:text>
Conditions: </xsl:text><xsl:value-of select="t"/>
<xsl:text>
Wind: </xsl:text>
<xsl:choose>
<xsl:when test="wind/s = ‘calm’"><xsl:text>0</xsl:text></xsl:when>
<xsl:otherwise><xsl:value-of select="wind/s"/></xsl:otherwise>
</xsl:choose>
<xsl:value-of select="/weather/head/us"/>
<xsl:choose>
<xsl:when test="wind/s = ‘calm’"><xsl:text>(0mph)</xsl:text></xsl:when>
<xsl:otherwise><xsl:text> (</xsl:text><xsl:value-of select="round(wind/s * 0.6214)"/><xsl:text>mph)</xsl:text></xsl:otherwise>
</xsl:choose>
<xsl:text> (</xsl:text><xsl:value-of select="wind/t"/>
<xsl:text>)</xsl:text>
</xsl:template>
<xsl:template match="dayf/day[@d='1']">
<xsl:text>
Tomorrow:
</xsl:text><xsl:value-of select="low"/><xsl:value-of select="/weather/head/ut"/>
<xsl:text> to </xsl:text><xsl:value-of select="hi"/><xsl:value-of select="/weather/head/ut"/>
<xsl:text>, </xsl:text><xsl:value-of select="part[@p=‘d’]/t"/>
</xsl:template>
</xsl:stylesheet>
[/code:35ghzbqm]
만든지 오래 된 파일이라서 세세한 내용은 잘 기억 안 나구요; 좀 지저분합니다