ubuntu 11.10 的theme 和icon

2011年10月14日 11:08

Ubuntu 11.10升级好了,十分顺利,比10.10升11.04的时候好多了。

安装后桌面主题变了,需要自行设置。

Theme:Elegant_Brit
http://grvrulz.deviantart.com/art/Elegant-Brit-gnome3-208925032
下载后解压到~/.themes
不过panel面板居然是black,需要自己修改下
vim ~/.themes/Elegant_Brit/gtk-3.0/gtk.css
    @define-color os_chrome_bg_color black;
修改成自己想要的颜色就行了。

Icon:Faenza
http://tiheum.deviantart.com/art/Faenza-Icons-173323228

Theme和Icon设置
sudo apt-get install gnome-tweak-tool
运行后在theme里修改相应选项就行了
    
 

Tags: ubuntu
评论(0) 阅读(3314)

对banshee当前播放曲目评分的python脚本

2011年9月07日 19:09

直接通过command line 似乎有bug.只能通过dbus

import dbus,sys,subprocess
import commands
bus = dbus.SessionBus()
banshee = bus.get_object ("org.bansheeproject.Banshee", "/org/bansheeproject/Banshee/PlayerEngine")
engine_interface=dbus.Interface (banshee, "org.bansheeproject.Banshee.PlayerEngine")
album=engine_interface.GetCurrentTrack()['album']
artist=engine_interface.GetCurrentTrack()['artist']
title=engine_interface.GetCurrentTrack()['name']

if len(sys.argv) == 2: 
    engine_interface.SetRating (dbus.Byte (int(sys.argv[1])))
    subprocess.call(["notify-send","Rate to: "+str(sys.argv[1]),artist+"\n"+title])
    
else:
    subprocess.call(["notify-send","Rate to: 0",artist+"\n"+title])
    engine_interface.SetRating (dbus.Byte (0))

使用:

>python bansheerating.py [1/2/3/4/5]

我是直接用easystroke的手势来运行的。

 

 

Tags: python ubuntu
评论(0) 阅读(2641)