has*_*sen 35 linux themes appearance
我正在运行 Xubuntu,(实际上是 linux mint,上面有 xfce,但我想它本质上是一样的)
我将外观主题设置为(MurrinaStormCloud 的修改版本),但是如果我运行 gitk,它会使用难看的字体渲染、难看的颜色、难看的小部件。
我认为 tcl 是这里的罪魁祸首,但我可以修复它吗?
下图对比当前主题下firefox和gitk的样子:
小智 12
tcl/tk 8.5 实际上是可主题化的,并且在 Windows 7 和 Mac 上看起来相当原生。在 linux 下为它编写主题引擎桥似乎不太注意,但你可以做三件事之一:
$echo '*TkTheme: clam' | xrdb -merge -
Run Code Online (Sandbox Code Playgroud)要使其在重新启动之间保持不变,请将行添加*TkTheme: clam
到~/.Xresources
,但我不确定是否已读取您是否使用startx
或不启动桌面环境。
上述问题的替代解决方案,由同一博客文章的作者在此页面上提供:https : //superuser.com/a/428563/107881
要让 tk 使用 qt 主题,您需要从以下位置签出并构建 tile-qt:git://tktable.git.sourceforge.net/gitroot/tktable/tile-qt
在 Ubuntu 11.04 下很容易,根据需要调整 tcl/tk 库路径(有些人报告说这些指令已经过时):
$./configure --with-tcl=/usr/lib/tcl8.5/ --with-tk=/usr/lib/tk8.5/
$make
$sudo checkinstall
Run Code Online (Sandbox Code Playgroud)
checkinstall
用于创建快速 .deb 而不是直接安装,保持系统整洁。
然后像上面一样,让 tk 使用你的 qt 主题:
$echo '*TkTheme: tileqt' | xrdb -merge -
Run Code Online (Sandbox Code Playgroud)
小智 10
要解决此问题的 Debian (Ubuntu) 方式:
$ sudo apt-get install tk8.5
$ sudo update-alternatives --config wish
Run Code Online (Sandbox Code Playgroud)
然后选择wish8.5 替代品。
Gabriel Morin 的帖子很好,但是 tile-qt 不再按照这些说明进行构建,尽管他链接到的博客帖子(顺便说一下,我的)仍然有效,但它不再是我所知道的最佳解决方案。
对于想要比“蛤蜊”主题更好的东西的人,PySolFC包含一个用于 Ttk的Clearlooks 主题,我写了另一篇博文解释了如何安装它。
以下是它的相关部分,适用于 Lubuntu 用户(我现在是):
# Get the theme
sudo apt-get install pysolfc
# Copy it into your user profile to not rely on PySolFC's presence
mkdir -p ~/.local/share/tkthemes
cp -r /usr/share/games/pysolfc/themes/clearlooks ~/.local/share/tkthemes/
# (optional) Remove PySolFC now
sudo apt-get remove pysolfc
sudo apt-get autoremove
# Add it to Ttk's search path
echo "export TCLLIBPATH=~/.local/share/tkthemes" >> ~/.xsessionrc
# Set the theme
echo "*TkTheme: clearlooks" >> ~/.Xresources
# Test it in this specific terminal window
export TCLLIBPATH=~/.local/share/tkthemes
xrdb -merge ~/.Xresources
git gui # gitk's "this isn't a repo" dialog is always ugly
# ...and then log out and back in to apply .xsessionrc for the whole desktop
Run Code Online (Sandbox Code Playgroud)
有一些小部件仍然很丑(菜单栏和SHA1 ID:
文本,需要在 gitk 中修补才能成为主题)但我不知道足够的 Tcl/Tk 来修补东西。
(我听说菜单栏没有主题化,因为它被委托给操作系统在 Windows 和 MacOS 上绘制)
你不能轻易地让 gitk 遵循你的其他主题,但它的外观是相当可定制的。
正如其他地方提到的,您可以手动选择字体。几乎所有颜色都可以在您的~/.gitk
. 确保修改此文件时 gitk 没有运行,因为它会覆盖退出时的内容。
这是我所拥有的(我的~/.gitk
文件):