1
10
2012
8

清理字体

以前觉得字体多了好,这样访问不同网页就能看到不同的效果了。

后来发现不少字体Linux下的效果就是一坨儿…… 比如宋体吧,Windows下看着好好的,在Linux下用看着虚得很。虽然经过复杂地配置能搞定,但一个一个字体都这么弄,还是太费事了。

于是我想,把字体清理一下,只留下那些看着效果好的字体和必须的字体。

  1. Liberation字体删除了,因为英语“R”右下角一捺显示太虚。
  2. Nimbus无衬线和等宽字体禁用了,无衬线字体原因同上,等宽字体太烂了。
  3. Windows字体大多被删除,除了雅黑看着不错,其他无论中英文效果都很糟糕。
  4. 多余的韩文、日文CJK字体删除了。
  5. 基本用不着的小语种字体删除了。

目前留下的字体:

CJK:

  1. 文鼎的宋体、楷体,显示文档也许有用
  2. 文泉驿正黑、微米黑
  3. hannom,衬线字体,支持的汉字比较多
  4. 花园明朝,无衬线字体,支持的汉字比较多
  5. 雅黑宋体(修改版M$雅黑)
  6. 几个装点门面的艺术字体。

英语:

  1. Bitstream Vera
  2. Dejavu
  3. 谷歌的Droid字体
  4. Ubuntu字体,装点门面

其他:

  1. mph-2b-damase 支持些额外的字符。

目前感觉好极了…… 至少不用为了乱七八杂的字体纠结了。

 

Category: 计算机 | Tags: 字体 美化 linux
1
2
2012
10

供同学们膜拜的 Linux

随便截图若干。

 

常规操作

1. 用强大的Vim写代码

屏幕截图 - 2012年01月02日 - 08时30分00秒.png

2. IBus输入法,以及记事本:

屏幕截图 - 2012年01月02日 - 08时32分47秒.png

3. 支持HTML5的Firefox:

屏幕截图 - 2012年01月02日 - 11时21分00秒.png

 

中国特色

4. 用python-webqq登陆扣扣:

屏幕截图 - 2012年01月02日 - 11时41分26秒.png

5. WebQQ弱爆了?来个TM2009,还带迅雷:

屏幕截图 - 2012年01月02日 - 08时38分46秒.png

6. 哪里的网络最自由?:

屏幕截图 - 2012年01月02日 - 12时05分57秒.png

 

娱乐

7. 听歌+歌词插件:

屏幕截图 - 2012年01月02日 - 11时18分34秒.png

 

8. 黑白的命令行放彩色电影:

9. Linux下打星际:

10. Linux下打使命召唤6

  

 

 

面子工程

11. Stellarium观天象:

屏幕截图 - 2012年01月02日 - 11时56分29秒.png

12. 十年前的Geforce2都能带动的特效:

13 & 14. 最新G3科技

 

11
19
2011
0

基本断网,设计conky

他丫的广电Cable猫上网又必须用Win-only客户端了,多次交涉无果,准备换电信联通的。

不开客户端只能随机地上一小部分网站,可喜的是包括google、is-programmer。开着网页代理能维持基本上网需要。

 

周末了无聊,就设计conky。连不上网缺乏素材啊缺乏素材~~~,所以也没设计啥高端功能:

 

下面是conkyrc,严重依赖我的硬件:

own_window yes
own_window_type desktop
own_window_transparent yes
own_window_argb_visual true
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
out_to_console no
use_xft yes
override_utf8_locale yes
xftfont Droid Sans Mono:size=10
update_interval 2
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 10
border_width 1
default_color white
default_shade_color white
default_outline_color white
alignment top_right
gap_x 12
gap_y 37
use_spacer left
no_buffers yes

TEXT
${image /usr/share/icons/Faenza/places/48/distributor-logo-archlinux.png -s 40x40 -p 0 0}         ${color gray}${font Comic Sans MS:size=12}Welcome to use ${color #35a3da}Arch Linux${color} ^_-${font}${color}
      ${font Claire Hand:size=16}${color white}${nodename}${font}${alignr} ${color pink}${time %F %a %R}
${font where stars shine the brightest:size=32}${color white}Sensors ${hr}${font}${color grey}
 CPU: ${execi 2000 cat /sys/bus/pci/drivers/k8temp/0000:00:18.3/temp1_input | head -c -4}/${execi 2000 cat /sys/bus/pci/drivers/k8temp/0000:00:18.3/temp3_input | head -c -4}°C ${alignr} Freq: ${freq}MHz
 GPU:${nvidia temp}°C ${alignr} VCore:  ${execi 2000 ~/.conky/getnum /tmp/.conky/hwmon/in0_input 3 1000}V
 MB:  ${execi 2000 ~/.conky/getnum /tmp/.conky/hwmon/temp2_input 0 1000}°C ${alignr} CPUFAN: ${execi 2000 cat /tmp/.conky/hwmon/fan2_input}RPM
${font where stars shine the brightest:size=32}${color white}CPU ${hr}${font}
 ${font Monaco:size=10}${color yellow}Load: ${loadavg} ${alignr} Usage: ${cpu 0}%${font}
 ${color grey}NAME              PID     CPU%   TIME${color grey}
 ${top name 1} ${top pid 1}  ${top cpu 1} ${top time 1}
 ${top name 2} ${top pid 2}  ${top cpu 2} ${top time 2}
 ${top name 3} ${top pid 3}  ${top cpu 3} ${top time 3}
 ${top name 4} ${top pid 4}  ${top cpu 4} ${top time 4}
${font where stars shine the brightest:size=24}${color white}Memory & Swap ${hr}${font}
${font Monaco:size=10}${color yellow}$mem/$memmax($memperc%)${alignr}$swap/$swapmax($swapperc%)${font}
 ${color grey}NAME              PID     MEM%   TIME${color grey}
 ${top_mem name 1} ${top_mem pid 1}  ${top_mem mem 1} ${top time 1}
 ${top_mem name 2} ${top_mem pid 2}  ${top_mem mem 2} ${top time 2}
 ${top_mem name 3} ${top_mem pid 3}  ${top_mem mem 3} ${top time 3}
 ${top_mem name 4} ${top_mem pid 4}  ${top_mem mem 4} ${top time 4}
${font where stars shine the brightest:size=30}${color white}Disk ${hr}${font}
 ${font Monaco:size=10}${color yellow}Read: ${diskio_read} ${alignr} Write: ${diskio_write} ${color grey}${font}
 LABEL      FREE         TOTAL${alignr}USED
   /      ${fs_free /}       ${fs_size /}${alignr}${fs_used_perc /}%
  VHD     ${fs_free /mnt/VHD}       ${fs_size /mnt/VHD}${alignr}${fs_used_perc /mnt/VHD}%
  tmp     ${fs_free /tmp}       ${fs_size /tmp}${alignr}${fs_used_perc /tmp}%
${font where stars shine the brightest:size=30}${color white}Network ${hr}${font}
   ${font Monaco:size=10}${color yellow}IP - ${addr eth0}${color grey}${font}
 Down: ${downspeed} (${totaldown})
   Up: ${upspeed} (${totalup})
   

 

我的系统上有两个hwmon(监控硬件状态)设备,开机时内核分配的编号不确定,所以无法用conky的hwmon解决。就写了个脚本,在运行conky前先调用这个脚本,选择适当hwmon链接到一个固定目录:

#!/bin/sh

mkdir -p /tmp/.conky
rm -rf /tmp/.conky/hwmon
if [ -e "/sys/class/hwmon/hwmon0/name" ]; then
    ln -s "/sys/class/hwmon/hwmon0" /tmp/.conky/hwmon
else
    ln -s "/sys/class/hwmon/hwmon1" /tmp/.conky/hwmon
fi

 

工具getnum是用来从文本文件中读取数字的,用法是:getnum 文件 A B,最后输出的结果是文件中读取的浮点数字N/B,保留A位输出。

在网上看到的例子是用cat和echo解决的,但我怕效率低,就自己写了个:

#include <stdio.h>
#include <stdlib.h>

int main (int argc, char *argv[])
{
    freopen(argv[1], "r", stdin);

    if (argc != 4)
        exit(1);

    float num;
    scanf("%f", &num);
    num /= atoi(argv[3]);

    char fm[8];
    snprintf(fm, 8, "%%.%sf", argv[2]);
    printf(fm, num);

    return 0;
}
Category: 生活 | Tags: conky linux 美化 桌面

| Theme: Aeros 2.0 by TheBuckmaker.com