你好,游客 登录 注册 搜索
阅读内容

Adium主题让你的Pidgin更美

运行环境:
授权方式:BSD
软件大小:M
下载量:
更新日期:2011-06-01
来源地址:
联系作者:Jesus1024

Pidgin用多了难免感觉它的chat窗口单调乏味,正好前几天体验Ubuntu 10.04时随便用了下Empathy,觉得它的chat主题挺新鲜(其实也不新鲜,只是Pidgin用太多了)。查了查原来是借用了adium的现成主题包。本打算就此转投empathy怀抱,但它的qq经常连不上很让人烦,还是只能老老实实用回pidgin。不过受empathy启发,折腾了一番把pidgin的chat也用adium主题包装,chatting感觉提升不少哦!

上图看看效果先

这是adium的Noteboard主题,聊天文字更新时还有动画效果哦,赞一个!下面是详细配置过程,俺的桌面系统是Fedora12。

第一步、安装必须的library

Ubuntu下要装的libray名字是pidgin, libnotify-bin, libpurple-dev, pidgin-dev, libwebkit-dev, bzr,F12下则是libnotify,libnotify-devel,pidgin-libnotify, libpurple, libpurple-devel, pidgin-devel, pywebkitgtk, webkitgtk, webkitgtk-devel, bzr;

第二步、生成adium-install.sh文件

文件内容如下,看了看比较短小精悍,学习ing...

  1. #!/bin/bash  
  2. # Adium theme AdiumMessageStyle installer for Empathy  
  3. # Originally © 2009 Antono Vasiljev  
  4. # Licensed under the same terms as Empathy  
  5. # http://antono.info/en/165-install-adium-themes-to-empathy  
  6. # Changed by Vertlo Oraerk (did not work with directories containing spaces in the names)  
  7. # Changed by h!v from ubuntuforums to work with Pidgin+libwebkit and Notifications  
  8. # On Ubuntu you need to install libwebkit and libnotify-bin to get it working properly  
  9. # Further info on how to get working adium themes in Pidgin at http://www.webupd8.org/2009/05/pidgin-webkit-plugin-adium-conversation.html  
  10. # 02-12-2010 - Support for Adium 1.0 sound themes added. Hooha!  
  11. # Sound themes are supported in 2.6.x versions. If there's no file set for event, Pidgin falls to default sound file.  
  12. #   IM  
  13. #Message Sent = send_im  
  14. #Message Received (New) = first_im_recv  
  15. #Message Received = im_recv  
  16. #   Chat  
  17. #Message Sent = send_chat_msg - you send a message in a chat   
  18. #Message Received (Group Chat) =  chat_msg_recv - someone else sends a message in a chat   
  19. #You Are Mentioned = nick_said - someone says your username in a chat  
  20. #   Status  
  21. #Contact Signed On = login  
  22. #Contact Signed Off = logoff  
  23. #Contact Joins = join_chat - a person enters a chat   
  24. #Contact Leaves = left_chat - a person leaves a chat    
  25. types[0]="<key>Message Sent</key>"  
  26. types[1]="<key>Message Received (New)</key>"  
  27. types[2]="<key>Message Received</key>"  
  28. types[3]="<key>Message Sent</key>"  
  29. types[4]="<key>Message Received (Group Chat)</key>"  
  30. types[5]="<key>You Are Mentioned</key>"  
  31. types[6]="<key>Contact Signed On</key>"  
  32. types[7]="<key>Contact Signed Off</key>"  
  33. types[8]="<key>Contact Joins</key>"  
  34. types[9]="<key>Contact Leaves</key>"  
  35. events[0]="im_sent"  
  36. events[1]="first_im_recv"  
  37. events[2]="im_recv"  
  38. events[3]="send_chat_msg"  
  39. events[4]="chat_msg_rec"  
  40. events[5]="nick_said"  
  41. events[6]="login"  
  42. events[7]="logoff"  
  43. events[8]="join_chat"  
  44. events[9]="left_chat" 
  45. # Creating a file   
  46. if [ -z $1 ]   
  47. then   
  48.     echo   
  49.     echo "Usage:"  
  50.     echo "`basename $0` adiumxtra://some.url.here/extra"  
  51.     echo   
  52.     exit 1   
  53. else  
  54.     TMPDIR=`mktemp -d`   
  55.     XTRAURL=`echo $1 | sed -e "s/^adiumxtra:/http:/"`   
  56.     DEST="$HOME/.purple/message_styles/"  
  57.        
  58.        
  59.     if [ ! -d $DEST ]   
  60.     then   
  61.         mkdir -v -p $DEST   
  62.     fi   
  63.     cd $TMPDIR   
  64.     notify-send "File this" \ "for Adium to be seems" --icon=pidgin   
  65.     wget --no-verbose -O xtra.zip $XTRAURL   
  66.     unzip -qq xtra.zip   
  67.     ls -d ./*.AdiumMessageStyle/ > themes_to_copy.lst   
  68.     ls -d ./*.AdiumSoundset/ > sound.lst   
  69.     num_bytes=`wc -c themes_to_copy.lst | sed 's# themes_to_copy.lst##'`    
  70.     sound=`wc -c sound.lst | sed 's# sound.lst##'`    
  71.     NAME=`cat themes_to_copy.lst | cut -f 2 --delimiter='.' | cut -f 2 --delimiter='/'`   
  72.     NAME_S=`cat sound.lst | cut -f 2 --delimiter='.' | cut -f 2 --delimiter='/'`   
  73.     if [ $num_bytes = 0 ]   
  74.     then   
  75.         if [ $sound = 0 ]   
  76.         then   
  77.             notify-send "All here I found" \ "gibberish was" --icon=pidgin   
  78.         else  
  79.             while read line_   
  80.             do  
  81.                 if [ ! -d $line_/Sounds.plist ]   
  82.                 then   
  83.                 notify-send "Found I theme" \ " $NAME_S " --icon=pidgin   
  84.                 DEST="$HOME/.purple/themes/$NAME_S/purple/sound/"  
  85.                 if [ ! -d $DEST ]   
  86.                 then   
  87.                     mkdir -v -p $DEST   
  88.             fi  
  89.                 # Creating a file   
  90.             touch theme.xml   
  91.             echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?> ">> $line_/theme.xml   
  92.             echo -e "<theme type=\"sound\" name=\"$NAME_S\">" >> $line_/theme.xml   
  93.             while read line   
  94.             do  
  95.                 if [ "$line" = "<key>Info</key>" ]   
  96.                 then   
  97.                     read line   
  98.                     inf=`echo $line | sed -e "s/<string>//" | sed -e "s/<\/string>//"`   
  99.                     echo -e "\t<description>$inf</description>" >> $line_/theme.xml   
  100.                 fi   
  101.                 for ((j=0; j<=9; j++))   
  102.                 do  
  103.                     if [ "$line" = "${types[j]}" ]   
  104.                     then   
  105.                         read line   
  106.                         file=`echo $line | sed -e "s/<string>//" | sed -e "s/<\/string>//"`   
  107.                         echo -e "\t<event name=\"${events[j]}\" file=\"$file\"/>" >> $line_/theme.xml   
  108.                     fi         
  109.                 done   
  110.             done < $line_/Sounds.plist   
  111.             echo -e "</theme>" >> $line_/theme.xml   
  112.             echo cp -r \'$line_\'* $DEST | sh              
  113.             else  
  114.                 notify-send "Use I force could" \ "none effect, that made" --icon=pidgin   
  115.             fi   
  116.             done < sound.lst   
  117.         fi           
  118.     else  
  119.         while read line    
  120.         do  
  121.             echo cp -r \'$line\' "$DEST" | sh   
  122.         done < themes_to_copy.lst   
  123.         echo   
  124.         notify-send "Installed I" \ " $NAME for you " --icon=pidgin   
  125.     fi   
  126.     rm -r xtra.zip       
  127.     rm -r $TMPDIR   
  128. fi   
  129. exit 0  

第三步、配置应用关联

假设adium-install.sh已放在/home/<username>/下,执行下列命令

[localhost ~]$ cd /home/<username>
[localhost ~]$ chmod 755 adium-install.sh
[localhost ~]$ gconftool-2 -t string -s /desktop/gnome/url-handlers/adiumxtra/command "/home/<username>/adium-install.sh %s"
[localhost ~]$ gconftool-2 -t bool -s /desktop/gnome/url-handlers/adiumxtra/enabled true
[localhost ~]$ gconftool-2 -t bool -s /desktop/gnome/url-handlers/adiumxtra/needs_terminal false

第四步、安装pidgin-webkit plugin with karmic fixes

终端中执行下列命令

[localhost ~]$ cd /home/<username>
[localhost ~]$ bzr branch lp:~spoidar/pidgin-webkit/karmic-fixes
[localhost ~]$ cd karmic-fixes
[localhost ~]$ make

如成功make,在/home/<username>/karmic-fixes/中会有webkit.so这个文件,copy此文件到/home/<username>/.purple/plugins目录下。

第五步、下载安装adium的主题

从这里 下载adium 主题。如果此前的adium-install.sh配置正确,当点击主题页面中的“Install”后,该脚本会自动下载主题并安装到/home/<username>/.purple/message_styles中(notification area还会有相应提示),当然也可以自己下载主题后解压到message_styles目录。

第六步、在Pidgin中配置webkit插件

最后,在pidgin的Tools > Plugins中,选中 "Webkit message styles"插件,点击“Configure plugin”选择已下载的主题,大功告成!

linux
相关资讯       pidgin 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款