-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot.screenrc.main
55 lines (46 loc) · 1.63 KB
/
dot.screenrc.main
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
# -*- coding:utf-8 -*-
# .screenrc
# CONFIGURATION
escape ^l^l
term xterm-color
defkanji utf-8
defencoding utf-8
encoding utf-8 utf-8
defscrollback 10000
idle 1200
startup_message off
caption always "%{= wb} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wk} [%l] %{=s wb}%Y/%m/%d %{=s wm}%A%C"
#hardstatus alwayslastline "[%02c] %~%-w%{=b bw}%n %t%{-}%+w"
# KEYBINDING
# global key binding
bind ^w windowlist -b
bind ^r source $HOME/.screenrc
# switch encoding
bind ^E eval 'echo -p "Encoding? -- Cp932 / Euc-jp / Utf-8"' 'command -c enc'
bind -c enc ^C eval 'encoding "sjis"' 'echo "cp932"'
bind -c enc ^E eval 'encoding "euc-jp"' 'echo "euc-jp"'
bind -c enc ^U eval 'encoding "utf-8"' 'echo "utf-8"'
# emacs-like window split
bind ^x eval 'echo -p "Window -- Split(2) / Only(1) / Remove(0)"' 'command -c region'
bind -c region 0 remove
bind -c region 1 only
bind -c region 2 split
# emacs like focus
bind ^O focus down
bind ^P focus up
bind < focus top
bind > focus down
# resize
bind r eval 'echo "Resize window j(+1) k(-1)"' 'command -c resize'
bind -c resize ^] command
bind -c resize j eval 'resize +1' 'command -c resize'
bind -c resize k eval 'resize -1' 'command -c resize'
# launcher
bind ^t command -c launch
bind -c launch t screen top
#bind -c launch a screen aptitude
#bind -c launch c screen -t CPAN perl -MCPAN -e shell
#bind -c launch w screen w3m ~/bookmark.html
# show emacswiki recent changes
blankerprg ruby -rrss -ropen-uri -e 'rss = RSS::Parser.parse(open("http://www.emacswiki.org/emacs/?action=rss;days=7;all=0;showedit=0").read, true);puts rss.channel.title;rss.channel.items.each {|item| puts "#{item.title} : #{item.link}"}'
setenv SCREEN t