GNU screen
Posted by JayXie
一直以来都是term term term,N个term,刚看到screen的时候觉得多此一举,反正已经是term*N很容易的,都配成sawfish的快捷键了……
这儿有个how to start screen from .bashrc不过偶不喜欢,因为这样只能启动一个terminal,每次都会接管上一个screen。
于是配成了另一个sawfish的快捷键,目前我的快捷键如下:
Win+e 启动emacs或跳转到已启动的emacs
Win+t 启动thunderbird或跳转到已启动的thunderbird
Win+m 启动mlterm
Win+z 启动一个mlterm,在里头执行screen
Win+p 启动python解释器
Win+x 启动rox
Print 抓屏
Alt+Print 抓窗口
配置文件里这样写:
(when (require-try 'jump-or-exec)
(bind-keys global-keymap
;; emacs
"H-e" `(jump-or-exec "^.*Emacs@JayXie$"
,(lambda () (wy-run "emacs &")))
;; thunderbird
"H-t" `(jump-or-exec "^.*Thunderbird$"
,(lambda ()(wy-run "mozilla-thunderbird &")))
"H-m" `(wy-run "mlterm &")
"H-z" `(wy-run "mlterm -e screen -dR &")
"H-p" `(wy-run "mlterm -e python &")
"H-x" `(wy-run "rox &")
;; capture screen
"Print" '(wy-run "shotfile=~/Screenshot_`date +%F_%T`.png;scrot $shotfile && display $shotfile")
;; "H-c" '(wy-run "shotfile=~/Region_`date +%F_%T`.png;scrot -s $shotfile && display $shotfile")
"M-Print" 'capture-this-window
))
