June 2007 Archives

【ZT】英文界面下使用fcitx

| No Comments | No TrackBacks

首先修改/etc/X11/Xsession.d/95xinput内容为

export XIM=FCITX
export XMODIFIERS=@im=FCITX
fcitx

(千万不要加上GTK QT,fcitx在这点上不同于scim)

接下来修改/etc/gtk-2.0/gtk.immodules把下面的部分

"/usr/lib/gtk-2.0/2.4.0/immodules/im-xim.so"
"xim""X Input Method""gtk20""/usr/share/locale""ko:ja:th:zh"

改为

"/usr/lib/gtk-2.0/2.4.0/immodules/im-xim.so"
"xim""X Input Method""gtk20""/usr/share/locale""en:ko:ja:th:zh"

这样所有GTK程序会默认用xim为输入法

最后,注销,登入即可

For Ubuntu 7.10 修改:/usr/lib/gtk-2.0/2.10.0/immodule-files.d/libgtk2.0-0.immodules 加入en

Color Your Log

| No Comments | No TrackBacks

通过perl来给log里带有特殊单词的行加上颜色,带颜色的log更易于识别和阅读。

#!/usr/bin/env perl
while(<STDIN>) {
    s/($ARGV[0])/\033[1m\033[45m\1\033[0m/g if $ARGV[0];
    print "\033[1m\033[37m\033[41m" if /error/i;
    print "\033[1m\033[32m" if /info/i;
    print "\033[1m\033[32m" if /notice/i;
    print "\033[1m\033[36m" if /warn/i;
    print $_;
    print "\033[0m";
}

October 2008

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Friends' Links

Recent Comments

  • jianingy: test read more
  • mmx: thank u very much ! read more
  • FW: pls contact me with email.about APIHook. read more
  • jianingy: 这个lc是啥意思? -------- read more
  • cnhackTNT: 晕,被过滤掉了,再试试: s/(?<!\\)\$NICK/lc/e; 汗,过滤了小于符号,只好写<了呵呵 read more
  • cnhackTNT: s/(? 这样可以少打几个字呵呵 read more
  • R.Q.: 酱紫哦,了了 -------- read more

Archives

Powered by Movable Type 4.21-en