居然又折腾了下conky。moc显示歌词的脚本

不同视角、不同观点、深度探讨,禁止人品和道德攻击
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

居然又折腾了下conky。moc显示歌词的脚本

#1

帖子 eexpress » 2010-01-14 15:16

无聊的。

加了一个歌词显示的脚本。

代码: 全选

● cat mocp-lrc.pl 
#!/usr/bin/perl

use utf8;
@info=`mocp -i`;
%hinfo=map{split /: /} @info;

print $hinfo{Title};
$_=$hinfo{State}; print,exit if ! /PLAY/;       #不是播放状态
$_=$hinfo{File}; s/(ogg|mp3)$/lrc/; chomp;
if(! -s){print "==无歌词文件==";exit 0;}        #无歌词文件
#print "==无歌词文件==",exit if ! -s; ????? why

$_=`grep \'$hinfo{CurrentTime}\' $_`;
if (! $_)               #无新歌词,不更新输出
{
open (OUT, "/tmp/mocp-last-lrc");
print <OUT>;close OUT;exit;
}
s/\xd//; s/\[.*\]//g;
print;
open (OUT, ">/tmp/mocp-last-lrc"); print OUT; close OUT;
设置如下。

代码: 全选

● g mocp .conkyrc 
${if_running mocp}${color0}moc${color} ${alignr}${exec ~/应用/脚本/mocp-lrc.pl}${endif}
效果。
44.jpg
44.jpg (4.64 KiB) 查看 3102 次
● 鸣学
delectate
帖子: 18311
注册时间: 2008-01-09 22:41

Re: 居然又折腾了下conky

#2

帖子 delectate » 2010-01-14 15:24

追随神的脚步……
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 居然又折腾了下conky

#3

帖子 eexpress » 2010-01-15 10:43

谁移动帖子的哦。
我放pk。想比较下实现相同功能的时候,其他语言的情况。谁来。
● 鸣学
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 居然又折腾了下conky

#4

帖子 leeaman » 2010-01-15 10:45

支持mpd的歌词显示就要,不然拉倒
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
tenzu
论坛版主
帖子: 36924
注册时间: 2008-11-21 20:26

Re: 居然又折腾了下conky

#5

帖子 tenzu » 2010-01-15 11:03

神,加个草榴新贴的脚本吧 :em04
头像
hcym
帖子: 15634
注册时间: 2007-05-06 2:46

Re: 居然又折腾了下conky

#6

帖子 hcym » 2010-01-15 11:07

草榴rss订阅啊

我都是Google Reader

涛阁的一举一动尽在把握

:em06
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 居然又折腾了下conky

#7

帖子 leeaman » 2010-01-15 11:10

:em06
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
tenzu
论坛版主
帖子: 36924
注册时间: 2008-11-21 20:26

Re: 居然又折腾了下conky

#8

帖子 tenzu » 2010-01-15 11:11

驴大,你。。。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 居然又折腾了下conky

#9

帖子 eexpress » 2010-01-15 11:25

草榴新贴?
rss?
那不适合conky的哦。
作成oss滚动,才可能好看些。
改我现成的rss.pl。只是我现在没兴趣啊。
● 鸣学
头像
tenzu
论坛版主
帖子: 36924
注册时间: 2008-11-21 20:26

Re: 居然又折腾了下conky

#10

帖子 tenzu » 2010-01-15 12:28

神,做个自动下载草榴新品的脚本吧 :em11
头像
qiang_liu8183
论坛版主
帖子: 10699
注册时间: 2006-09-10 22:36
系统: Arch Debian
来自: 北京

Re: 居然又折腾了下conky

#11

帖子 qiang_liu8183 » 2010-01-15 12:57

老男人喜欢听老男人的歌~~~
看破、放下、自在、随缘、念佛
真诚、清净、平等、正觉、慈悲
头像
tpli
帖子: 250
注册时间: 2007-01-16 16:14
来自: 郑州

Re: 居然又折腾了下conky

#12

帖子 tpli » 2010-01-15 19:37

ee好多fans啊。 :em11
delectate
帖子: 18311
注册时间: 2008-01-09 22:41

Re: 居然又折腾了下conky

#13

帖子 delectate » 2010-01-15 19:57

tenzu 写了:神,做个自动下载草榴新品的脚本吧 :em11
头像
princelai
帖子: 920
注册时间: 2007-01-06 21:00
联系:

Re: 居然又折腾了下conky

#15

帖子 princelai » 2010-01-15 21:30

唉,现在的神,以后的帝,未来的哥,膜拜,走人 :em04
回复