conky で日本語の表示ができたので、続けて FreeBSD サイトから、ニュースの RSS フィードを読み込んで、conky に表示してみる。
まずは、sysutils/conky を WITH_RSS=yes でコンパイルする。
# cd /usr/ports/sysutils/conky
# make config-recursive
# make install clean
続けて、.conkyrc を編集する。
conky に RSS フィードを表示するサンプルを作った。 .conkyrc は UTF-8 で保存する。
alignment top_left
double_buffer yes
border_width 1
draw_outline no
draw_shades no
default_color cornflowerblueuse_xft yes
override_utf8_locale yes
xftfont Kochi Gothic:style=Regular:size=12gap_x 5
gap_y 20
no_buffers yesupdate_interval 1.0
TEXT
${color}◆ ${rss http://www.freebsd.org/ja/news/rss.xml 15 feed_title}
${color}${hr 2}
${voffset 5} ${color grey30}${rss http://www.freebsd.org/ja/news/rss.xml 15 item_title 0}
${color}${stippled_hr 1}
${voffset 5} ${color grey30}${rss http://www.freebsd.org/ja/news/rss.xml 15 item_title 1}
${color}${stippled_hr 1}
${voffset 5} ${color grey30}${rss http://www.freebsd.org/ja/news/rss.xml 15 item_title 2}
${color}${stippled_hr 1}
${voffset 5} ${color grey30}${rss http://www.freebsd.org/ja/news/rss.xml 15 item_title 3}
${color}${stippled_hr 1}
${voffset 5} ${color grey30}${rss http://www.freebsd.org/ja/news/rss.xml 15 item_title 4}
${color}${hr 2}
結果は、下のような感じ。
conky による RSS フィードの表示方法には、下記のようなものがある。
- $rss uri interval_in_minutes feed_title
- $rss uri interval_in_minutes item_title 0~
- $rss uri interval_in_minutes item_desc 0~
- $rss uri interval_in_minutes item_tiles num space_in_front





