-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.screenrc
128 lines (94 loc) · 4.33 KB
/
.screenrc
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# ^z c 新画面作成
# ^z n 画面を順に切り替え
# ^z p 画面を逆順に切り替え
# コピーモード関連
# ^z Esc, ^z [ 画面をコピーモードに切り替え
# ^z ] コピーモードでコピーした内容を貼り付け
# Esc (コピーモード中)コピーモードを抜ける
# Spc (コピーモード中)リージョン選択開始
# Spc (コピーモード中 + リージョン選択中)リージョンをコピー
# ^z d スクリーンをデタッチ
# ^z [数字] 数字 のウィンドウへ切り替え
# ^z S(大文字) ウインドウ分割
# ^z tab ウインドウ移動
# ^z ^a 直前に表示していたウィンドウに切替
# ^z A 現在のウィンドウの名前を入力
# ^z C ウインドウをクリア
# ^z i 現在のウィンドウに関する情報を表示
# ^z v バージョンとコンパイルされた日時を表示
# ^z w ウィンドウのリストを表示
# ^z ? キーマップを表示
# C-y 上へ表示領域をスクロール
# C-n 下へ表示領域をスクロール
# エスケープキーの設定
escape z
# ビジュアルベルを無効
vbell off
# メッセージ表示時間
msgminwait 10
msgwait 10
# ステータス行の設定
#hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w"
#hardstatus alwayslastline "%{= wk} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wb}%y/%m/%d %{=b wb}%c"
#hardstatus alwayslastline "%{= Gw}[%m/%d %02c:%s] %{GW} %-w%{= rW}%n %t%{-}%+w %=%{Gw}$USER@$HOSTNAME[$LANG] (%l) "
#hardstatus alwayslastline "%{= Gw}[%m/%d %02c] %{GW} %-w%{= rW}%n %t%{-}%+w %=%{Gw}$USER@$HOSTNAME[$LANG]"
hardstatus alwayslastline "%{= Kw}[%m/%d %02c] %{KW} %-w%{= rW}%n %t%{-}%+w %=%{Kw}$USER@$HOSTNAME[$LANG]"
# キャプション行の設定
caption splitonly "%{= Kw} %?%F%{b Kr}%? %?%h%:%t (screen #%n)%? "
# シェルタイトル
# shelltitle "% |zsh"
# 背景色消去
#defbce "on"
# スタートアップ時メッセージ無効
startup_message off
# 自動でデタッチする
autodetach on
# スクロール行を 10,240行
defscrollback 10240
# ターミナル
term xterm-256color
# ^T U で UTF-8 / ^T E で EUC-JP を切り替え
bind U eval "encoding utf-8" "!!!echo 'export LANG=ja_JP.UTF-8'"
bind E eval "encoding euc" "!!!echo 'export LANG=ja_JP.EUC-JP'"
# zshの起動バインド設定
bind c screen zsh
# 画面が残らないようにする
altscreen on
# ハードコピーを追記モード
hardcopy_append on
#hardcopydir /home/dai/.screen/
#bind h hardcopy -h ~/.screen/hardcopy/${YSC}/${MSC}/${YSC}${MSC}${DSC}-hard.log
bind h hardcopy -h "${HOME}/sccreen-logs/hard.log"
# ログファイル名
logfile "${HOME}/screen-logs/screen-%Y%m%d-%n.log"
#bufferfile ${HOME}/a
bind , eval "readbuf ${HOME}/a"
bind . eval "writebuf ${HOME}/.screen/copybuffer" "!${HOME}/.screen/mv_copybuf.sh"
bind @ eval "readbuf ${HOME}/a" "writebuf ${HOME}/.screen/copybuffer" "!${HOME}/.screen/mv_copybuf.sh"
# 画面分割用
bind q eval 'echo "2: split / 3: vsplit / 1: only / 0: remove / o: focus r: resize"' 'command -c REGION'
bind -c REGION 2 split
bind -c REGION 3 eval 'split -v'
bind -c REGION 1 only
bind -c REGION 0 remove
bind -c REGION o focus
bind -c REGION r eval 'echo "j: -1 / k: +1 / other: quit"' 'command -c RESIZE'
bind -c RESIZE = eval 'resize =' 'command -c RESIZE'
bind -c RESIZE J eval 'resize +5' 'command -c RESIZE'
bind -c RESIZE K eval 'resize -5' 'command -c RESIZE'
bind -c RESIZE j eval 'resize +1' 'command -c RESIZE'
bind -c RESIZE k eval 'resize -1' 'command -c RESIZE'
# cygwin でコピーモードからWindowsのクリップボードへコピーする
# bindkey -m Y eval 'stuff Y' 'writebuf' 'exec sh -c "/usr/bin/putclip < /tmp/screen-exchange"'
bindkey -m Y eval 'stuff Y' 'writebuf' 'exec sh -c "cat /tmp/screen-exchange| nkf -W -s | /usr/bin/putclip"'
# 起動時にリサイズしない
termcapinfo xterm-color 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
termcapinfo xterm-256color 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
# Funcion Key を使う
termcapinfo xterm-color 'k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS'
termcapinfo xterm-256color 'k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS'
bindkey -k k2 screen zsh
bindkey -k k3 prev
bindkey -k k4 next
bindkey -k k6 detach
bindkey focus