Conky + Amarok
ScreenletsのNowPlayingを使っていたけど、Amarokを立ち上げてからじゃないと反映されないことが多い。反映されるようにするにはNowPlayingの設定でAmarokも一緒に起動する。しかしそのやりかたで「システム起動時」にScreenletsのNowPlayingが起動してAmarokも起動すると、Amarokがうまく起動できない事が多い。ようするにNowPlayingを起動するのに、Amarokを起動して、Screenletsを起動してからNowPlayingを起動を...という工程をしろということだ。これは非常に面倒だ。というわけでNowPlayingを「Conky」で表示する事にした。
Conkyを使う人達は、システム情報を表示させる事が目的なのかもしれないけど、デスクトップはシンプルでいたいので、「Artist - Title Album」だけの表示にした(デスクトップの左上の文字列です)。この際ジャケット表示は割り切った。AmarokFSでも良いしね。Screenltsは休業。
まずはSynapticからConkyのインストール「.conkyrc」というファイルが「/home」に必要なんだけど、デフォルトでは置かれないので、まずはインストールされるサンプルを置く。「/usr/share/doc/conky/examples/conky.conf.gz」こいつを展開して出来上がったファイル「conky.conf」を「.conkyrc」にRenameして「/home」に置く。
起動は末端を開いて「conky」と打ち込めば起動する。やっぱりデフォルトの見た目では満足できないので、conkyの見本、用語説明、GnomeLook.orgで「Conky」で検索....などを参考にして変えれば自分好みになると思う。ちなみにconkyの見本のamarokのやつは外部のscriptを作って読み込ませるんだけど、どうもうまく動かない。起動した時の曲は表示されるんだけど次の曲に移っても反映されないし、すぐに落ちるし....。だからscriptを参考にconkyrcのみで表示されるようにしてみた。以下は自分のconkyrc。シンプルなものです。
毎回起動したい場合は、セッションに「conky」と登録する。
# Conky configuration以下は、その他のAmarokから吐き出しているデータ。参考になるかもしれないので置いておきます。改変しやすいように飾り気は無し。
background no
use_xft yes
xftfont Bitstream Vera Sans:size=9
total_run_times 0
update_interval 2
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
stippled_borders 0
border_margin 0
border_width 0
default_color e0e0e0
default_shade_color 262729
default_outline_color 262729
alignment top_left
gap_x 15
gap_y 35
override_utf8_locale yes
use_spacer yes
minimum_size 1200 20
maximum_width 1245 20
TEXT
${color e0e0e0}${exec dcop amarok player title} - ${exec dcop amarok player artist} ${color adadad}${font Bitstream Vera Sans:size=8}${exec dcop amarok player album}
Now Playing Information
${exec dcop amarok player nowPlaying}
Artist: ${exec dcop amarok player artist}
Title: ${exec dcop amarok player title}
Album: ${exec dcop amarok player album}
Year: ${exec dcop amarok player year}
Genre: ${exec dcop amarok player genre}
Collection Information
Total Artists: ${exec dcop amarok collection totalArtists}
Total Albums: ${exec dcop amarok collection totalAlbums}
Total Tracks: ${exec dcop amarok collection totalTracks}
Total Genres: ${exec dcop amarok collection totalGenres}
Total Compilations: ${exec dcop amarok collection totalCompilations}
More Information
Most Songs by Artist: ${exec dcop amarok collection query 'SELECT t1.name FROM artist t1 INNER JOIN tags t2 ON t1.id = t2.artist GROUP BY t2.artist ORDER BY COUNT(t2.artist) DESC LIMIT 1;'}
Most Songs by Artist Number: ${exec dcop amarok collection query 'SELECT count(t2.artist) FROM artist t1 INNER JOIN tags t2 ON t1.id = t2.artist GROUP BY t2.artist ORDER BY COUNT(t2.artist) DESC LIMIT 1;'}
Most Songs are Genre: ${exec dcop amarok collection query 'SELECT t1.name FROM genre t1 INNER JOIN tags t2 ON t1.id = t2.genre GROUP BY t2.genre ORDER BY COUNT(t2.genre) DESC LIMIT 1;'}
Most Songs are Genre Number: ${exec dcop amarok collection query 'SELECT count(t2.genre) FROM genre t1 INNER JOIN tags t2 ON t1.id = t2.genre GROUP BY t2.genre ORDER BY COUNT(t2.genre) DESC LIMIT 1;'}
Most Songs During Year: ${exec dcop amarok collection query 'SELECT t1.name FROM year t1 INNER JOIN tags t2 ON t1.id = t2.year GROUP BY t2.year ORDER BY COUNT(t2.year) DESC LIMIT 1;'}
Most Songs During Year Number: ${exec dcop amarok collection query 'SELECT count(t2.year) FROM year t1 INNER JOIN tags t2 ON t1.id = t2.year GROUP BY t2.year ORDER BY COUNT(t2.year) DESC LIMIT 1;'}
Most Albums by Artist: ${exec dcop amarok collection query 'SELECT name FROM artist WHERE id=(SELECT t1.artist from (SELECT artist FROM tags GROUP BY album) AS t1 GROUP BY t1.artist ORDER BY count(artist) DESC LIMIT 1);'}
Most Albums by Artist Number: ${exec dcop amarok collection query 'SELECT count(artist) from (SELECT artist FROM tags GROUP BY album) AS t1 GROUP BY t1.artist ORDER BY count(artist) DESC LIMIT 1;'}
Most Albums are Genre: ${exec dcop amarok collection query 'SELECT name FROM genre WHERE id=(SELECT t1.genre from (SELECT genre FROM tags GROUP BY album) AS t1 GROUP BY t1.genre ORDER BY count(genre) DESC LIMIT 1);'}
Most Albums are Genre Number: ${exec dcop amarok collection query 'SELECT count(genre) from (SELECT genre FROM tags GROUP BY album) AS t1 GROUP BY t1.genre ORDER BY count(genre) DESC LIMIT 1;'}
Most Albums During Year: ${exec dcop amarok collection query 'SELECT name FROM year WHERE id=(SELECT t1.year from (SELECT year FROM tags GROUP BY album) AS t1 GROUP BY t1.year ORDER BY count(year) DESC LIMIT 1);'}
Most Albums During Year Number: ${exec dcop amarok collection query 'SELECT count(year) from (SELECT year FROM tags GROUP BY album) AS t1 GROUP BY t1.year ORDER BY count(year) DESC LIMIT 1;'}
0 Comments:
Subscribe to:
Post Comments (Atom)