我有时会使用两个不同的桌面环境,比如Unity和Gnome Shell(进行比较、测试、截图等),但是Unity在使用Adwaita主题时看起来很糟糕,而这个主题与Gnome Shell和Ambiance主题相同。每次都要更改非常麻烦,而且有时候(虽然现在比以前少了)会崩溃(我正在使用Oneiric版本)。
#!/bin/bash
if [ "$XDG_CURRENT_DESKTOP" = "Unity" ]
then
gsettings set org.gnome.desktop.interface gtk-theme 'Ambiance'
gconftool-2 --set --type string /apps/metacity/general/theme 'Ambiance'
gsettings set org.gnome.desktop.interface icon-theme 'Faenza-Ambiance'
else
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'
gconftool-2 --set --type string /apps/metacity/general/theme 'Adwaita'
gsettings set org.gnome.desktop.interface icon-theme 'Faenza'
fi
#!/bin/bash
if [ "$XDG_CURRENT_DESKTOP" = "Unity" ]
then
gsettings set org.gnome.desktop.interface gtk-theme 'Ambiance'
gsettings set org.gnome.desktop.interface icon-theme 'ubuntu-mono-dark'
gsettings set org.gnome.desktop.wm.preferences theme 'Ambiance'
else
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'
gsettings set org.gnome.desktop.interface icon-theme 'gnome'
gsettings set org.gnome.desktop.wm.preferences theme 'Adwaita'
fi
sh path/to/script
)。使用启动应用程序(如Matteo建议的)并根据Mr Hyde的启动脚本进行调整:
#!/bin/bash
if [ "$XDG_CURRENT_DESKTOP" = "Unity" ]
then
gsettings set org.gnome.desktop.interface gtk-theme 'Ambiance'
gsettings set org.gnome.desktop.interface icon-theme 'ubuntu-mono-dark'
gsettings set org.gnome.desktop.interface cursor-theme 'DMZ-White'
gsettings set org.gnome.desktop.wm.preferences theme 'Ambiance'
else
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'
gsettings set org.gnome.desktop.interface icon-theme 'Adwaita'
gsettings set org.gnome.desktop.interface cursor-theme 'Adwaita'
gsettings set org.gnome.desktop.wm.preferences theme 'Adwaita'
fi