# HG changeset patch # User kent # Date 1226676742 -32400 # Node ID 6d5c73fe5744c5813683e6d145427353268e369f Go over to mercurial from CVS. diff -r 000000000000 -r 6d5c73fe5744 Xdefaults --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Xdefaults Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,62 @@ +UXTerm*background: Black +UXTerm*foreground: White + + +!XTerm*faceName: Monaco +!XTerm*faceName: 'xft:Monaco:pixelsize=12' +!XTerm*faceNameDoublesize: OsakaMono +!XTerm*faceNameDoublesize: 'xft:OsakaMono:pixelsize=14:antialias=true' +!UXTerm*faceNameDoublesize: 'xft:Kochi Gothic:size=14:antialias=true' +!UXTerm*faceSize: 12 +!XTerm*termName: xterm-256color +UXTerm*TermName: xterm-color +UXTerm*metaSendsEscape: true +UXTerm*color255: false +UXTerm*scrollBar: true +UXTerm*saveLines: 500 +UXTerm*VT100.translations: #override\n\ + :scroll-back(1,line)scroll-back(1,line)scroll-back(1,line)\n\ + :scroll-forw(1,line)scroll-forw(1,line)scroll-forw(1,line)\n + + +!UXTerm*font: -ipagothic-gothic-medium-r-normal--14-*-*-*-*-*-iso10646-1 +!UXTerm*font: -ipagothic-gothic-medium-r-normal--14-*-*-*-*-*-iso8859-1 +!UXTerm*font: -ipagothic-gothic-medium-r-normal--16-*-*-*-*-*-*-* +!UXTerm*wideFont: -ipagothic-gothic-medium-r-normal--14-*-*-*-*-*-*-* +!UXTerm*wideFont: -ipagothic-gothic-medium-r-normal--14-*-*-*-*-*-iso10646-1 + +!UXTerm*faceName: xft:IPAGothic-14:antialias=true +UXTerm*utf8: 1 +UXTerm*wideChars: true +UXTerm*locale: true +UXTerm*fontDoublesize: true +!UXTerm*cjkWidth: true + + +!! RXVT +!URxvt*font: xft:Kochi Gothic:antialias=true:size=14:spacing=20 +URxvt*font: xft:IPAGothic-14:antialias=true +URxvt*lineSpace: 1 +URxvt*foreground: White +URxvt*background: Black +URxvt*termName: xterm +!URxvt*colorBD: default +!URxvt*colorBD: LavenderBlush +URxvt*colorBD: MistyRose +URxvt*cursorBlink: true +URxvt*tintColor: Green +!!! red green blue cyan yellow magenta +URxvt*inheritPixmap: true +URxvt*shading: 30 + +URxvt.scrollstyle: next +URxvt.scrollBar_right: true + +URxvt.geometry: 80x24 + + +!!! Kinput2 +Kinput2*ConversionStartKeys: \ + Mod2space +Kinput2*font xft:Kochi Gothic:antialias=true:size=14:spacing=20 + diff -r 000000000000 -r 6d5c73fe5744 bash_profile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bash_profile Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,5 @@ + +if [ -r ~/.profile ] + then . ~/.profile; +fi + diff -r 000000000000 -r 6d5c73fe5744 bashrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bashrc Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,7 @@ + + +if [ -r ~/.shrc ] + then . ~/.shrc +fi + + diff -r 000000000000 -r 6d5c73fe5744 bcrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bcrc Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,30 @@ +define atan(a){ + return a(a) +} +define log_e(a){ + return l(a) +} +define log(a,b){ + return l(b)/l(a) +} +define sin(a){ + return s(a) +} +define cos(a){ + return c(a) +} +define exp(a){ + return e(a) +} +define pow(a,b){ + return e(b*l(a)) +} +define fact(n){ + if(n>1) { + return n*fact(n-1); + }else{ + return 1; + } +} + +pi = 4*atan(1); diff -r 000000000000 -r 6d5c73fe5744 dir_colors --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dir_colors Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,105 @@ +# Configuration file for the color ls utility +# This file goes in the /etc directory, and must be world readable. +# You can copy this file to .dir_colors in your $HOME directory to override +# the system defaults. + +# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not +# pipes. 'all' adds color characters to all output. 'none' shuts colorization +# off. +COLOR tty + +# Extra command line options for ls go here. +# Basically these ones are: +# -F = show '/' for dirs, '*' for executables, etc. +# -T 0 = don't trust tab spacing when formatting ls output. +OPTIONS -F -T 0 + +# Below, there should be one TERM entry for each termtype that is colorizable +TERM linux +TERM console +TERM con132x25 +TERM con132x30 +TERM con132x43 +TERM con132x60 +TERM con80x25 +TERM con80x28 +TERM con80x30 +TERM con80x43 +TERM con80x50 +TERM con80x60 +TERM cons25 +TERM xterm +TERM rxvt +TERM xterm-color +TERM color-xterm +TERM vt100 +TERM dtterm +TERM color_xterm +TERM ansi +TERM screen +TERM screen.linux +TERM kon +TERM kterm +TERM gnome +TERM konsole + +# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output) +EIGHTBIT 1 + +# Below are the color init strings for the basic file types. A color init +# string consists of one or more of the following numeric codes: +# Attribute codes: +# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed +# Text color codes: +# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white +# Background color codes: +# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white +NORMAL 00 # global default, although everything should be something. +FILE 00 # normal file +#DIR 01;34 # directory +DIR 01;31 # directory +LINK 01;36 # symbolic link +FIFO 40;33 # pipe +SOCK 01;35 # socket +BLK 40;33;01 # block device driver +CHR 40;33;01 # character device driver +ORPHAN 01;05;37;41 # orphaned syminks +MISSING 01;05;37;41 # ... and the files they point to + +# This is for files with execute permission: +EXEC 01;32 + +# List any file extensions like '.gz' or '.tar' that you would like ls +# to colorize below. Put the extension, a space, and the color init string. +# (and any comments you want to add after a '#') +.cmd 01;32 # executables (bright green) +.exe 01;32 +.com 01;32 +.btm 01;32 +.bat 01;32 +.sh 01;32 +.csh 01;32 +.tar 01;31 # archives or compressed (bright red) +.tgz 01;31 +.arj 01;31 +.taz 01;31 +.lzh 01;31 +.zip 01;31 +.z 01;31 +.Z 01;31 +.gz 01;31 +.bz2 01;31 +.bz 01;31 +.tz 01;31 +.rpm 01;31 +.cpio 01;31 +.jpg 01;35 # image formats +.gif 01;35 +.bmp 01;35 +.xbm 01;35 +.xpm 01;35 +.png 01;35 +.tif 01;35 +.eps 01;35 +.ps 01;35 +.pdf 01;35 diff -r 000000000000 -r 6d5c73fe5744 emacs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emacs Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,206 @@ + +;;; 言語環境の指定 +(set-language-environment "Japanese") + +;;; 漢字コードの指定 +(set-default-coding-systems 'utf-8) +(set-buffer-file-coding-system 'utf-8) +(set-keyboard-coding-system 'utf-8) +(set-terminal-coding-system 'utf-8) +;(set-file-name-coding-system 'utf-8) +;(set-clipboard-coding-system 'sjis-mac) +(set-selection-coding-system 'utf-8) +(if (eq window-system 'mac) (progn + (set-keyboard-coding-system 'sjis-mac) + (set-clipboard-coding-system 'sjis-mac) +)) +;;;文字コードを指定して開く場合、 +;; C-x C-m c "文字コード" --で、次のコマンドの文字コードを指定する +;; C-x C-f "ファイル名" + + +;;; フォントの設定(気に入らないなら消しても良い) +;(create-fontset-from-fontset-spec +; (concat "-*-fixed-medium-r-normal-*-12-*-*-*-*-*-fontset-monaco12," +; "japanese-jisx0208:-apple-osaka-medium-r-normal--14-140-*-m-140-jisx0208.1983-sjis," +; "ascii:-apple-monaco-medium-r-normal-*-12-*-*-*-*-*-mac-roman")) +;(set-default-font "fontset-monaco12") +;(setq default-frame-alist (append '((font . "fontset-monaco12")))) + + +;;; cannna設定 +;(load-library "canna") +;(canna) + +;;; GLOBAL設定 +;;; /usr/local/share/emacs/site-list/にgtags.elがあること +(load-library "gtags") +;(setq load-path (cons "/usr/share/emacs/site-lisp/" load-path)) +(autoload 'gtags-mode "gtags" "" t) + + +;; Terminal から起動する場合は MenuBar 非表示 +;(if window-system (menu-bar-mode 1) (menu-bar-mode -1)) + +;; C-hをバックスペースに +(global-set-key "\C-h" 'backward-delete-char) +;; デフォルトメジャーモードをtext-modeにする +(setq default-major-mode 'text-mode) +;; スクロールを1行単位にする +(setq scroll-step 1) +;; 選択領域の反転 +(setq transient-mark-mode t) +;; スクロールバー表示 +;(scroll-bar-mode t) +;; ツールバー表示 +;(tool-bar-mode nil) +;; optionキーをMETAキーとして使う +(setq mac-option-modifier 'meta) +;; 括弧のハイライト表示 +(show-paren-mode t) +;; *scratch*バッファの初期メッセージ +(setq initial-scratch-message nil) +;; スタートアップメッセージ +(setq inhibit-startup-message t) + + +;; 行を折り返さない +(setq truncate-lines t) +;; 同じくwindowを縦に分割した場合も折り返さない +(setq truncate-partial-width-windows t) + + + + +;; カラー設定 +(if window-system (progn + (require 'font-lock) + (global-font-lock-mode t) + + ;; 文字の色を設定します。 + (set-foreground-color "white") + ;(set-foreground-color "black") + ;; 背景色を設定します。 + (set-background-color "black") + ;(set-background-color "white") + ;; モードラインの文字の色を設定します。 + (set-face-foreground 'modeline "white") + ;; モードラインの背景色を設定します。 + (set-face-background 'modeline "MediumPurple2") + ;; カーソルの色を設定します。 + (set-cursor-color "MediumPurple2") + ;; マウスポインタの色を設定します。 + (set-mouse-color "MediumPurple2") +)) + + +;;;;window透明度 +;; アクティブウィンドウ +;(set-frame-parameter (selected-frame) 'active-alpha 0.95) +;; 非アクティブウィンドウ +;(set-frame-parameter (selected-frame) 'inactive-alpha 0.7) + +;;;; モードライン +;; 時刻表時 +(display-time) +;; 行番号表示 +(line-number-mode 1) +;; 行の文字位置 +(column-number-mode 1) + + +;; Yatex の設定 +;; +;(setq load-path (cons "/usr/local/share/emacs/site-lisp/yatex" load-path)) +;(setq auto-mode-alist/?___ +;(cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist)) +;(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) +;; kanji code 1=sjis, 2=jis, 3=euc(default=2), 4=UTF-8 +;(setq YaTeX-kanji-code 4) + +;; perlモードの設定 +; perl-modeでなくcperl-modeを使用する +;(autoload 'perl-mode "cperl-mode" "alternate mode for editing Perl programs" t) +; +;(add-hook 'cperl-mode-hook '(lambda () + ;(setq tab-width 4) + ;(setq cperl-indent-level 4) + ;(setq cperl-continued-statement-offset 4) + ;(setq cperl-comment-column 40) +;) t) + + +;; javaの設定 +;(add-hook 'java-mode-hook '(lambda () + ;(setq tab-width 4) +;) t) +;;; C 言語モードの設定 +(add-hook 'c-mode-hook '(lambda () + (cond ((boundp 'MULE) + (load "c-mode.el") + )) + + ( c-set-style "gnu") + ( setq c-basic-offset 4) +; ( setq c-tab-width 4 ) + (setq indent-tabs-mode t) ; インデントにtabを使わない +; ( setq c-argdecl-indent 0) ; 関数の引数行のインデント + ;; 但し引数行で明示的にタブを押さない + ;; 場合は、インデントしない + (setq c-auto-newline nil) ; 自動改行 + (setq c-continued-statement-offset 0) ; { を書く時のインデント +; (setq c-continued-statement-offset 4) ; { を書く時のインデント + (setq c-indent-level 4) ; { を書いた後のインデント + (setq c-label-offset -2) ; ラベルの深さ + (setq c-tab-always-indent t) ; タブ記号を押した時にユーザーが + ; 任意にタブ記号を入れることは不可 + (setq tab-width 4) ; タブ記号のインデント深さ + ;(setq c-brace-imaginary-offset 0) ; 不明 + ;(setq c-brace-offset 0) ; 不明 +) t) + +;M-x indent-region で選択範囲内をインデント処理 + + +;;; TABをgray表示、行末の空白をblueスコア、など +;(defface my-face-b-1 '((t (:background "gray"))) nil) +;(defface my-face-b-2 '((t (:background "gray27"))) nil) +;(defface my-face-u-1 '((t (:foreground "SteelBlue" :underline t))) nil) +;(defvar my-face-b-1 'my-face-b-1) +;(defvar my-face-b-2 'my-face-b-2) +;(defvar my-face-u-1 'my-face-u-1) + +;(defadvice font-lock-mode (before my-font-lock-mode ()) +;(font-lock-add-keywords +;major-mode +;'(("\t" 0 my-face-b-2 append) +;(" " 0 my-face-b-1 append) +;("[ \t]+$" 0 my-face-u-1 append) +;))) +;(ad-enable-advice 'font-lock-mode 'before 'my-font-lock-mode) +;(ad-activate 'font-lock-mode); + + + +;;; artist-mode +;; C-c C-a C-o で描画方法を選ぶ +;; C-u RET で現在の描画を終える +;; + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 6d5c73fe5744 inputrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inputrc Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,4 @@ +set convert-meta off +set output-meta on +set input-meta on + diff -r 000000000000 -r 6d5c73fe5744 install.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install.cfg Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,66 @@ +[Settings] +#HOME: +ETCDIR: a + +[InstallFiles] + +# rcファイル指定ができない or したくないもの +vimrc: SYM +zshenv: SYM +zshrc: SYM +Xdefaults: SYM +xinitrc: SYM +hgrc: SYM +screenrc: SYM +bcrc: SYM +dir_colors: SYM +fetchmailrc:SYM +muttrc: SYM + +# 環境変数でファイル指定可能なもの +#screenrc: ENV:SCREENRC +#bcrc: ENV:BC_ENV_ARGS +#dir_colors: ENV +#fetchmailrc: ENV + +# コマンドラインでファイル指定可能なもの (alias作るかな) +muttrc: -F + +# diabled +#bash_profile = .bash_profile +#bashrc = .bashrc +#emacs = .emacs +#inputrc = .inputrc +#jvimrc = .jvimrc +#login = .login +#login_conf = .login_conf +#profile = .profile +#shrc = .shrc +#tcshrc = .tcshrc + + +[DestinationNames] + +screenrc: .screenrc +bcrc: .bcrc +dir_colors: .dir_colors +fetchmailrc: .fetchmailrc +muttrc: .muttrc +vimrc: .vimrc +zshenv: .zshenv +zshrc: .zshrc +Xdefaults: .Xdefault +xinitrc: .xinitrc +hgrc: .hgrc +bash_profile: .bash_profile +bashrc: .bashrc +emacs: .emacs +inputrc: .inputrc +jvimrc: .jvimrc +login: .login +login_conf: .login_conf +profile: .profile +shrc: .shrc +tcshrc: .tcshrc + + diff -r 000000000000 -r 6d5c73fe5744 jvimrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jvimrc Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,51 @@ + +" ֹɽ +set nonumber +" ơСrow,columnɽ +set ruler +" 1DzԤĶƺǽ2ǤȤλǽ +set backspace=2 +" ϻб̤ɽ +set showmatch +" ơ饤ɽ +set laststatus=2 +" ʸθ +set tabstop=4 +" Ҥ餬ʥʤ̤ʤʸʸ +set jignorecase +" ĹԤޤ֤ʤ +set nowrap + + +" ƬΥХåڡǹԤĶ 1 +" ǤΥڡСǹԤĶ 2 +" ޥ hlǹԤۤ 4 +" ޥɥ⡼ɤǤǹԱۤ 8 +" ⡼ɤǤǹԱۤʤ 16 +" ܸǤWޥ +" ֡פ ޤ֡פ̵뤷Фʤ 32 +" Ȥˤڡʸ򸫤ƥפʤ64 +set whichwrap=127 + + +"ʸ +" EUC,JIS,SJIS +" ϡɽ +set jmask=EEE +" ե륨󥳡ǥ +set jcode=E + +"ԥ +" DOSԥ CrLf +""set textmode +" MacԥCr +""set option=0|e! + + +"map +" C-b ǥХå +"map  OD +" C-f ǥե +"map  OC + + diff -r 000000000000 -r 6d5c73fe5744 login --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/login Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,29 @@ +# System-wide .login file for csh(1). + +setenv PATH "/usr/local/bin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin" + +#setenv LANG ja_JP.UTF-8 +#setenv LANGUAGE ja_JP.UTF-8 +setenv LC_ALL ja_JP.UTF-8 +setenv LC_CTYPE ja_JP.UTF-8 +setenv LC_COLLATE C +setenv LC_TIME C +setenv LC_MESSAGES C +setenv LC_NUMERIC C + +setenv PAGER less +setenv LESS -R +setenv EDITOR vi + +setenv DISPLAY localhost:0.0 +setenv CVSROOT ':ext:j04060@pw010.st.ie.u-ryukyu.ac.jp:/net/home/cvs' +setenv CVS_RSH ssh + + + +# tcsh start-up script +# ログインシェル +# /etc/csh.cshrc, /etc/csh.login, ‾/.tcshrc(‾/.cshrc), ‾/.login, ‾/cshdirs +# nonログインシェル +# /etc/csh.cshrc, ‾/.tcshrc(‾/.cshrc) + diff -r 000000000000 -r 6d5c73fe5744 login_conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/login_conf Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,23 @@ + +me:\ + :charset=utf-8:\ + :lang=ja_JP.UTF-8: + +## LANGでロケールを設定できる +## LC_*を使う事でLANGのロケールの特定カテゴリのみ上書き +## LC_ALLはLANG&LC_*をすべて上書き +## LANGUAGEはgettextでのみ使われる +## LANGAGEはコロンで区切って複数指定可能 +## 優先順位 +# LC_ALL > LC_* > LANG +# gettextのみLANGUAGE最優先 + +## 他にも下記のローカリゼーション変数がある +# LC_NAME +# LC_PAPER +# LC_ADDRESS +# LC_TELEPHONE +# LC_MEASUREMENT + +## 参照 http://opentechpress.jp/article.pl?sid=06/05/09/0220213 + diff -r 000000000000 -r 6d5c73fe5744 profile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/profile Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,35 @@ + +export PATH="/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin" + +export LANG=ja_JP.eucJP +export LANGUAGE=ja_JP.eucJP +export LC_ALL=ja_JP.eucJP +export LC_COLLATE=C +export LC_TIME=C +export LC_CTYPE=ja_JP.eucJP +export PAGER=less +export LESS=-R +export EDITOR=vi +export ENV=~/.shrc + +export DISPLAY="localhost:0.0" + + + +# bash start-up script +# 󥷥 or --loginץդå +# /etc/profile, (~/.bash_profile, ~/.bash_login, ~/.profile) +# nonå +# ~/.bashrc +# å +# if [-n "$BASH_ENV"]; then . "$BASH_ENV"; fi + +# sh start-up script +# 󥷥 or --loginץդå +# /etc/profile, ~/.profile +# nonŪ +# "$ENV" +# Ū +# nothing will be readed. + + diff -r 000000000000 -r 6d5c73fe5744 screenrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/screenrc Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,53 @@ + +escape ^t^t +# メッセージ行の表示 +#hardstatus alwayslastline "%H[%n] [%w]%=SCREEN%=" +hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" +#hardstatus alwayslastline "%?%F%{.R.}%?%3n %t%? [%h]%?" +# ハングアップの際に、自動的にデタッチする。しないと全てのプロセスにシグナルが送られる +autodetach on ##デフォルト on +# ベル文字がbackgroundのwindowに送られるとメッセージ行に通知 +bell_msg "bell文字がwindow %nに出力されました" +# screenのカレントディレクトリ +chdir +# 無操作時の動作 +#idle 10 blanker + + + +# C-a a C-a を端末に送る + +## リージョン分割 +# C-a S リージョンを上下に分ける +# C-a [tab] リージョンを切り替える +# C-a Q 他のリージョンを消す +# C-a X 現在のリージョンを消す +# C-a F windowをリージョンをサイズにresizeする + +## window変更 +# C-a C-a 直前のwindowとtoggle +# C-a number number n のwindowに変更 +# C-a n 次のwindowに変更 +# C-a {h|p} 前のwindowに変更 +# C-a w windowのリストを表示 + +## copy/paste +# C-a esc copyモードin +# C-a [ copyモードin + # [Enter] copy-start + # [Enter] copy-end +# C-a ] paste + +## 再アタッチ +# screen -r [pid.tty.host] 他の端末がディタッチされてないといけない +# screen -dr 他の端末をディタッチして再アタッチ +# screen -x マルチセッション + +## ディタッチ +# screen -d [pid.tty.host] +# C-a d + +## pid.tty.host形式でセッションを表示 +# screen -ls | -list + + diff -r 000000000000 -r 6d5c73fe5744 shrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/shrc Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,18 @@ + + +alias ls='gnuls -F --color' +alias Emacs='/Applications/Emacs.app/Contents/MacOS/Emacs' +alias ll='ls -l' +alias la='ls -a' +alias jls='ls --show-control-chars|nkf -e' +alias xinit='/Applications/Utilities/X11.app/Coontents/MacOS/X11 &' + +PS1='[\u\[\e[36m\]@\[\e[00m\]\h\[\e[00;32m\]:\[\e[32;01m\]\W\[\e[00m\]]\[\e[01m\]\$\[\e[00m\] ' +eval `dircolors -b ~/.dir_colors` + +if [ -r ~/shellscripts/ChangeDir.sh ] + then . ~/shellscripts/ChangeDir.sh +fi + + + diff -r 000000000000 -r 6d5c73fe5744 symlink.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/symlink.pl Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,56 @@ +#!/usr/bin/perl +use Cwd; +use Cwd 'abs_path'; + +main( ); + +sub main { + + if ( $ARGV[0] eq "-a" ){ + my @dots1 = list_all("."); + @dots = grep { /^DoT-/ } @dots1; + }else{ + @dots = @ARGV; + } + + foreach $dot (@dots){ + $abs_dot = abs_path($dot); + make_link($abs_dot); + #print "$abs_dot\n"; + } +} + +sub list_all { + my $cdir = $_[0]; + + opendir(DIR, "$cdir") || die "can't opendir $some_dir: $!"; + + #@dots = grep { /^DoT-/ && -f "$cdir/$_" } readdir(DIR); + @dots = readdir(DIR); + closedir DIR; + + return @dots; + #return wantarray ? () : undef; +} + + +### 引数に渡された絶対パスへのリンクをホームディレクトリに作る +sub make_link { + + my $file = $_[0]; ## fileは絶対パス + + ($dest) = ($file =~ m/DoT-(.+)$/); + if ($dest) { + print "ln -s $file $ENV{HOME}/.$dest\n"; + system "ln -s $file $ENV{HOME}/.$dest"; + } + + + #($dest = $file) =~ s/DoT-/./; + #$dest =~ s/DoT-/./; + #print "ln -s $file $ENV{HOME}/$dest\n"; + #system "ln -s $file $ENV{HOME}/$dest"; +} + + + diff -r 000000000000 -r 6d5c73fe5744 symlink.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/symlink.py Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,95 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 + +import re +import os +import sys +import ConfigParser + +home = os.environ['HOME'] +etcdir = os.getcwd() +dir = re.match( home+"/(.*)", etcdir).group(1) +force = False + +def main(): + # read configuration file + config = ConfigParser.ConfigParser() + config.read( 'install.cfg') + opts = config.items('InstallFiles', 0) + + # loop all options + for opt in opts: + value = opt[1].split(':') + if value[0] == "SYM": + if len(value) > 1: + makeSymlink(opt[0], value[1]) + else: + makeSymlink(opt[0]) + + +### make symbolic link dst0 relating with src0 +def makeSymlink(src0, dst0=None): + # correct filename of source and destination + if dst0==None: + dst0 = "."+src0 + src = dir+"/"+src0 + dst = home+"/"+dst0 + + # check destination file + if os.path.exists(dst): + if force: + os.remove(dst) + else: + print "file "+dst+" already existed!" + return + + # make symbolic link + print dst+" => "+src + #os.symlink(src, dst) + + +main() + + + + + + +### てすとるーちん ### +def listingFromArgs(): + del sys.argv[0] + for file in sys.argv: + makeSymlink(file) + +def listingFromDir(): + files = os.listdir(".") + for file in files: + correctFilename(file) + +def correctFilename(filename): + result = re.match( "DoT-(.*)", filename); + if result!=None: + dst = result.group(1) + print filename+" => "+dst + os.rename(filename, dst) + +#listingFromDir() +#listingFromArgs() + + + +# test + +#master = [10, 20, 30] +#listing( master, 20 ) +#listing( master, 20 ) +def listing(a, b): + i=0; + print "b = "+str(b) + print "len(a) = "+str(len(a)) + while i,,h,l,←,→,~,←,→(insert) +set whichwrap=b,s,h,l,<,>,~,[,] +" マルチバイト文字なら自動改行を空白に関係なく行う +set formatoptions+=mB + +" OSX用 C&P +map :.w !pbcopy +map :r !pbpaste + +"文字コード +"""vimが内部で使用する文字コード +"""(編集中に変えてはいけない!起動時にのみ変更すること!) +"""utf-8にするべき。そうすれば文字コード変換しても情報は失われない +set encoding=utf-8 +""" +"""ターミナル及びキーボードに使われる文字コード +set termencoding=utf-8 +""" +"""ファイル読み書き時の文字コード +set fileencoding=utf-8 +""" +"""ファイルを読み込むときに試す文字コード +"""順番に読み、成功したものがfileencodingに設定される。 +"""なければfileencodingは空になり、encodingがそのまま使われる。 +set fileencodings=utf-8,iso-2022-jp,sjis,euc-jp,cp932,utf-8 + +"""ファイルを開くときにエンコードを指定する方法 +"" :e ++enc=utf-8 [filename] #省略したら開いてるファイルを開き直す + + + +"改行コード +"""ファイル読み書き時に使われる改行コード +set fileformat=unix +"""ファイル読み込み時に試す改行コード、info参照。下手に変えない方が良い? +"""新しいファイルを作成したときは最初のコードが使われる +set fileformats=unix,mac,dos + + +" タブ文字の見かけの幅 +set tabstop=8 +" autoindentや'>'のインデント幅(tab幅はかわらない) +set shiftwidth=4 +" TABを入力した時のインデント幅(8以下ならSpaceが入る) +"set softtabstop +" 改行時にオートでインデントを行う +set autoindent """noautoindent +" C言語に特化したオートインデント +set nocindent """cindent +" タブの変わりにスペースを使用する +"set expandtab """noexpandtab +set noexpandtab + +autocmd BufReadPost *.cbc set filetype=cbc + +"map +" C-b でバック +"map D +" C-f でフォワード +"map C + +"""ステータスバー表示 +set statusline=%<%f\ %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P + +" バックグラウンドがどちらかを知らせる +"set background={dark,light} +"""カラー表示オフ +syntax on +"""カラースキーマの指定 +"""/usr/share/vim/vim62/colors/* +"""~/.vim/colors/* +"""内のスクリプト名を指定 +"colorscheme zellner +colorscheme desert + + +"""GLOBAL設定 +"""/usr/local/share/vim/vim70/plugin/にgtags.vimをいれる +""" +"map :Gtags +map :GtagsCursor +"map :cn +"map :cp + + +""" vim-latex +" REQUIRED. This makes vim invoke latex-suite when you open a tex file. +filetype plugin on +" IMPORTANT: win32 users will need to have 'shellslash' set so that latex +" can be called correctly. +"set shellslash +" IMPORTANT: grep will sometimes skip displaying the file name if you +" search in a singe file. This will confuse latex-suite. Set your grep +" program to alway generate a file-name. +set grepprg=grep\ -nH\ $* +" OPTIONAL: This enables automatic indentation as you type. +filetype indent on +" when open empty file named *.tex +let g:tex_flavor = "latex" +""" vim-latex end + + + + + + + +""" VIM commands +" +" **FOLDING** +" zf :fold some lines. +" zfap : fold a paragraph. +" zf2j : fold two lines under cursor. +" zo :open the folded lines. +" zc :re-fold (close). +" zr :reduce the fold level. zR: reduce all. +" zm :increase fold level. zM: fold all. +" :set foldmethod :syntax, indent, ... +" :set foldcolumn : show folding state in left of window. +" +" **WINDOWING**" CTRL-W s (split [file]) : separate window horizontaly. +" CTRL-W v (vsplit [file]) : separate window verticaly. +" CTRL-W c : close current window. +" CTRL-W CTRL-W :move cursor to next window. +" CTRL-W {hjkl} :move cursor to [lbtr]. +" CTRL-W {+-} :{in,de}crease window space. +" CTRL-W = :set window space equality. +" CTRL-W {HJKL} :move `window' to the far [lbtr] +" +" +" **MOVING COMMAND** +" w :move to the start of the next word. +" e :move to the end of the next word. +" b :move to the start of the previous word. +" ge :move to the end of the next word. +" +" ^ :move to the first non-blank character. +" 0 :move to the very first character. +" $ :move to the end of a line +" +" fx :move to the first find 'x' character. +" Fx :search toward left. +" tx :move to before one, the first find 'x' character. +" Tx :search toward left. +" ; :repeat f,F,t,T +" , :reverse repeat f,F,t,T +" +" % :move to the matching parentisis. +" n% :move to the line on n-% of a file. +" +" G :move to the end of a file. +" gg :move to the start of a file. +" ngg | nG :move to the n-th line. +" +" H :move to first line of the window. +" M :move to the line on half window. +" L :move to final line of the window. +" +" CTRL-F :scroll up the window. +" CTRL-B :scroll down the window. +" CTRL-U :scroll up the window half. +" CTRL-D :scroll down the window half. +" CTRL-Y :scroll up the window by one line. +" CTRL-E :scroll down the window by one line. +" +" zz :SCROLl the window until the cursor is center of the window. +" zt :scroll the window until the cursor is top of the window. +" zb :scroll the window until the cursor is bottom of the window. +" +" /string :search 'string' +" ?string :search 'string' toward left. +" * :search string under the cursor. +" # :search string under the cursor toward left. +" n :repeat / or ?. +" N :reverse repeat / or ?. +" +" CTRL-O :move to before jump position. +" CTRL-I :back to the position before CTRL-O. +" '' | `` :CTRL-O and CTRL-I. +" +" +" **EDITTING COMMAND** +" i :start insert-mode on the cursor. +" I :start insert-mode on the start of the line. +" a :start insert-mode on the next character of one cursor pointing. +" A :start insert-mode on the end of the line. +" +" d[c] :delete from current location to the place where the cursor move to. +" [c] is moving command. +" c[c] :delete as like d comamnd and start insert-mode. +" +" x : dl +" X : dh +" D : d$ +" C : c$ +" s : cl +" S : cc +" r[x] : replace a character under the cursor with [x] +" R :replace mode +" +" . :repeats the last change command except for UNDO, REDO and :-COMMAND. +" +" p :places the text below or after the cursor. +" P :places the text abobe or before the cursor. +" y :yank text (similar d) +" +" ~ :change case of the character under the cursor, and move the cursor to next character. +" +" +" +" **VISUAL MODE** +" v or V or CTRL-V start visual mode. +" v : delete from the place that mode started to place where press d key. +" V : delete lines that is selected. +" CTRL-V : delete rectangular block +" +" d :delete from the place where visual-mode started to current position. +" o | O :switch cursor with the place where visual mode started. +" +" +" **TEXT OBJECT** +" aw :A word. +" as :A sentence. +" iw :Inner word. +" is :Inner sentence. +" +" + diff -r 000000000000 -r 6d5c73fe5744 xinitrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xinitrc Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,41 @@ +#!/bin/bash --login +# $Id: DoT-xinitrc,v 1.2 2008/11/12 17:04:04 kent Exp $ + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f "$sysresources" ]; then + xrdb -merge "$sysresources" +fi + +if [ -f "$sysmodmap" ]; then + xmodmap "$sysmodmap" +fi + +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# environment variable initialize + +export LANG=ja_JP.UTF_8 +export XMODIFIERS="@im=kinput2" + +# start some nice programs + +/opt/local/bin/kinput2 -xim -canna& +#xterm & +#/opt/local/bin/urxvt & + +# start the window manager +exec /usr/bin/quartz-wm +#exec wmaker + diff -r 000000000000 -r 6d5c73fe5744 zshenv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zshenv Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,34 @@ +# System-wide .login file for csh(1). + +export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin:$HOME/opt/bin" +export PATH="$HOME/opt/bin:/usr/local/ptetex3/bin:$PATH" +export MANPATH=/usr/local/man:`manpath` +#export DYLD_FALLBACK_LIBRARY_PATH="${HOME}/usr/lib" +#export DYLD_FRAMEWORK_PATH="/Library/Frameworks:/System/Library/Frameworks" + +export LANG=ja_JP.UTF-8 +export LANGUAGE=ja_JP.UTF-8 +export LC_ALL=ja_JP.UTF-8 +#export LC_CTYPE=ja_JP.UTF-8 +#export LC_COLLATE=C +export LC_TIME=C +export LC_MESSAGES=C +export LC_NUMERIC=C + +export PAGER="less" +export LESS="-RW#10 -C" +### lessのオプション。RはANSIカラー表示。Wは新しい行の先頭行をハイライト。#10は横スクロール文字数 + +export EDITOR="vi" +export CVS_RSH="ssh" +export CVSROOT=:ext:kent@firefly.cr.ie.u-ryukyu.ac.jp/home/one/CVS_DB + +#export DISPLAY=:0.0 + +#export JAVA_HOME="$HOME/usr/java6" +#export ANT_HOME="$HOME/usr/ant" + +# bc command arguments +export BC_ENV_ARGS="-l $HOME/.bcrc" + + diff -r 000000000000 -r 6d5c73fe5744 zshrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zshrc Sat Nov 15 00:32:22 2008 +0900 @@ -0,0 +1,58 @@ +# このファイルは対話的シェルで読み込まれる +# this file will be loaded by interractive shell + +# Lines configured by zsh-newuser-install +HISTFILE=~/.zsh_history +HISTSIZE=1000 +SAVEHIST=1000 +setopt appendhistory autocd +bindkey -e +# End of lines configured by zsh-newuser-install +# The following lines were added by compinstall +#zstyle :compinstall filename '/Users/KENT/.zshrc' + +#autoload -Uz compinit +#compinit +# End of lines added by compinstall + +alias ls='gls -F --show-control-chars --color=auto' +alias la='ls -a' +alias ll='ls -l' +alias b='popd' +alias vi='vim' +alias sless='less -x4 -S' + +setopt prompt_subst +PROMPT='%{%}<%{%}%{%}%n%{%}:%{%}%m%{%}%{%}>%{%} ' +#PROMPT='[%{%}%n%{%}%{%}@%{%}%{%}%m%{%}]%# ' +RPROMPT='%{[$[32+$RANDOM % 5]m%}%2~%{%}%(1j.:&%j.)%(?..:?%?)' +#RPROMPT='%(1j.%j.x)' +# %j -- the number of jobs +# %~ -- current directory +# %m -- hostname up to the first `.' +# %n -- username +# %(x.str1.str2) : true then str1, false then str2 +# x = `Nj' or `N?' or ... +# j: the number of jobs is at least N +# ?: prev command exit status is at least N + + +setopt autopushd pushdminus +# ~+0 ~+1 ~+2 ... dirs -v の上から ~0 ~1 ~2 も同じ +# ~-0 ~-1 ~-2 ... dirs -v の下から +# pushdminus をセットすると+-が逆転するが,~0 ~1 ~2などは変わらない + +eval `gdircolors ~/.dir_colors` +zmodload zsh/complist +export ZLS_COLORS="$LS_COLORS" + + +# zsh read followed files +# /etc/zshenv, $ZDOTDIR/.zshenv +# /etc/zprofile, $ZDOTDIR/.zprofile IF (login shell) +# /etc/zshrc, $ZDOTDIR/.zshrc IF (interactive shell) +# /etc/zlogin, $ZDOTDIR/.zlogin IF (login shell) + +screen -ls + +