Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1365213
  • 博文数量: 244
  • 博客积分: 3321
  • 博客等级: 中校
  • 技术积分: 2704
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-26 08:17
个人简介

微信公众号:杰夫弹弹看

文章分类

全部博文(244)

文章存档

2018年(4)

2017年(32)

2016年(25)

2015年(28)

2014年(27)

2013年(34)

2012年(25)

2011年(30)

2010年(39)

分类: LINUX

2017-04-22 18:52:12

在原来的一篇文章中曾经提到过 screen 的一些使用方法,参见下面的内容

http://blog.chinaunix.net/blog/post/id/4033839.html


但是在使用过程中,发现一个好的 screen 配置是十分必要的,比如一个自己使用的例子如下

点击(此处)折叠或打开

  1. vbell off
  2. bell_msg ""
  3. startup_message off
  4. # Tell screen how to set colors. AB = background, AF=foreground
  5. termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
  6. #
  7. # Enables use of shift-PgUp and shift-PgDn
  8. termcapinfo xterm|xterms|xs|rxvt ti@:te@
  9. #
  10. # Enable 256 color term
  11. term xterm-256color
  12. #
  13. # Cache 30000 lines for scroll back
  14. defscrollback 30000
  15. #
  16. bind c screen 1
  17. bind ^c screen 1
  18. bind 0 select 10
  19. screen 1
  20. hardstatus off
  21. #
  22. #
  23. hardstatus alwayslastline
  24. hardstatus string '%{= kG}%c %06=%-Lw%{= RW}%50>%n%f* %t%{-}%+Lw%<'

其中最复杂的配置部分就是 hardstatus,这里 string 里的配置依次是: 设置颜色,显示标题时间(固定),当前窗口的显示颜色,窗口标号,窗口的标志,星号,窗口标题。其中比较晦涩的地方就是缩短的控制(screen 窗口过多的情况下,避免后续新开的窗口无法显示出来,完成一个类似可以动态窗口显示的功能)
阅读(595) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~