Last active
December 19, 2015 12:29
-
-
Save seapy/5955083 to your computer and use it in GitHub Desktop.
내 서버들에서 사용할 screen 설정.
coursera 의 "Startup Engineering" 에 나왔던 예제를 수정. 원래 예제에서는 emacs 사용을 위해 단축키를 많이 바꿔치기 했었음 ex 1) 서버에 git이 설치되어 있지 않은경우. https 대신 http 사용
curl -o .screenrc http://gist.github.com/seapy/xxxx/xxxx/.screenrc ex2) 서버에 git이 설치되어 있는 경우
git clone https://gist.github.com/5955083.git dotfiles
ln -s dotfiles/.screenrc .screenrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GNU Screen configuration file | |
# seapy <[email protected]> | |
# | |
# Notes | |
# ----- | |
# 1. To change the colors of the hardstatus line, change this line: | |
# sorendition "+b +kG" | |
# Example: blue (+b) highlight with black text (k) on a green background (G) | |
# Example: sorendition "+r +kG" is red highlighting with black text on a green background | |
# | |
# Modification of original files by Balaji S. Srinivasan | |
# Balaji S. Srinivasan original: https://github.com/startup-class/dotfiles/blob/master/.screenrc | |
# original config is for emacs. but i don't use emacs, so change it. | |
## ----------------------------------------------------------------------------------------- | |
## -- 1) Set variables and keybindings | |
## ----------------------------------------------------------------------------------------- | |
autodetach on # default: on | |
crlf off # default: off | |
startup_message off # default: on | |
vbell off # default: ??? | |
defutf8 on # unicode by default. like (screen -U) | |
defscrollback 10000 # default: 100 | |
silencewait 15 # default: 30 | |
activity "activity in %n (%t) [%w:%s]~" | |
bell "bell in %n (%t) [%w:%s]~" | |
## ------------------------------------------------------------------------------------------------- | |
## -- 2) Hardstatus line (aka navigation bar at bottom) | |
## and sorendition (aka color scheme for navigation bar) | |
## ------------------------------------------------------------------------------------------------- | |
# 2.1) sorendition = color scheme | |
# Set the colors for the "messages" and "text marking" | |
# Example: "+b kG" = blue screen, black text, green background. Change | |
# to "+b kR" and so on to distinguish machines. | |
sorendition "+b kG" | |
# 2.2) hardstatus = navigation bar @ bottom | |
hardstatus alwayslastline "%H %-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" | |
# 2.3) Autoload two screen tabs for bash. | |
screen -t bash 0 | |
screen -t bash 1 | |
# 2.4) Description of the keywords used in hardstatus | |
# caption always "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H%?%F%{+u wb}%? %L=%-Lw%45>%{+b by}%n%f* %t%{-}%+Lw%-0<" | |
# | |
# Anything I don't describe is treated literally. | |
# | |
# %? - Start of a conditional statement. | |
# %F - Use this part of the statement if the window has focus (i.e. it | |
# is the only window or the currently active one). | |
# %{-b bc} - Turn off bold, blue foreground, cyan background. | |
# %: - else | |
# %{-b bb} - Turn off bold, blue foreground, blue background (this obscures | |
# the text on non-focused windows and just gives a blue line). | |
# %? - End conditional statement. | |
# %C - time (hh:mm, leading space) in 12 hour format | |
# %D - Three-letter day-of-week appreviation | |
# %M - Three-letter month appreviation | |
# %d - Day of the month | |
# %H - hostname | |
# %? - Start of conditional statement. | |
# %F - Use this part of the statement if the window has focus. | |
# %{+u wb} - underlined, white foreground, blue background | |
# %? - End conditional (if not focused, text remaind blue on blue). | |
# %L= - truncation/padding point. With the 'L' qualifier, basically | |
# just acts as a reference point. Further truncation/padding is | |
# done relative to here, not the beginning of the string | |
# %-Lw - window list up to but not including the current window (-), | |
# show window flags (L) | |
# %45> - truncation/padding marker; place this point about 45% of the | |
# way into the display area (45) | |
# %{+b by} - add bold (still underlined from before), blue foreground, | |
# yellow background | |
# %n - number of the current window | |
# %f - flags for current window | |
# %t - title of current window | |
# %{-} - undo last color change (so now we're back to underlined white | |
# on blue) (technically, this is a pop; a second invocation | |
# would drop things back to unadorned blue on cyan) | |
# %+Lw - window list from the next window on (-), show window flags (L) | |
# %-0< - truncation/padding point. Place this point zero spaces (0) | |
# from the right margin (-). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment