分页: 1 / 1

菜鸟的一个问题。关于conky和lrcdis和一点点的shell知识。

发表于 : 2010-11-23 17:54
Ney
:em06 首先对进来看的人表示感谢。
我想在我都conky上加上rhythmbox的歌词显示。
看见论坛上又高人做的lrcdis,说是可以实现。
我研究来一下,发现可以从lrcdis上以fifo的形式输出到/dev/shm/lrcfifo
然后cat一下。
这个是我的思路,可是我发现这样子不行,希望你们知道的人帮助我一下。

附上我的conky监视rhythmbox的代码:

代码: 全选

${if_running rhythmbox}
${voffset -20}${color #ffd700}${hr 1}$font$color
${color #ffe7ba}Title: ${font WenQuanYi Zen Hei Sharp:size=8}$color${execi 20 rhythmbox-client --no-start --print-playing-format "%tt"}
  ${color #ffe7ba}Album: ${font WenQuanYi Zen Hei Sharp:size=8}$color${execi 20 rhythmbox-client --no-start --print-playing-format "%at"}$alignr${color #ffe7ba} CD:$color${execi 20 rhythmbox-client --no-start --print-playing-format "%aN"}
  ${color #ffe7ba}Artist:${font WenQuanYi Zen Hei Sharp:size=8}$color ${execi 20 rhythmbox-client --no-start --print-playing-format "%aa"}$alignr${color #ffe7ba}Track:$color${execi 20 rhythmbox-client --no-start --print-playing-format "%tN"}
  ${color #ffe7ba}Time:  ${color #0000ff}${execi 1 rhythmbox-client --no-start --print-playing-format "%te / %td"}$alignr${color #ffe7ba}Year: $color${execi 20 rhythmbox-client --no-start --print-playing-format "%ay"}
#  ${color #ba55d3}${execbar sh ~/.conky/rhythmboxbar.sh}
${color #ffd700}${hr 1}$font$color$endif

Re: 菜鸟的一个问题。关于conky和lrcdis和一点点的shell知识。

发表于 : 2010-11-24 10:26
eexpress
分这么多行。。 你不能执行一次,多输出几行?
比如“Title:\t%tt\n%at\nArtist\t%aa”

你的sh不行?还是上面的不行?

Re: 菜鸟的一个问题。关于conky和lrcdis和一点点的shell知识。

发表于 : 2010-11-24 13:22
Ney
eexpress 写了:分这么多行。。 你不能执行一次,多输出几行?
比如“Title:\t%tt\n%at\nArtist\t%aa”

你的sh不行?还是上面的不行?

上面的conky代码是完全可行的,只是我在lrcdis执行fifo模式输出的时候cat不到自己想要的结果。 :em06

Re: 菜鸟的一个问题。关于conky和lrcdis和一点点的shell知识。

发表于 : 2010-11-25 0:00
Ney
在我没弄懂之前你不要沉啊! :em09