Skip to content

Instantly share code, notes, and snippets.

@danny8376
Last active December 3, 2023 18:09
Show Gist options
  • Save danny8376/6acea0c67b04f8e95e8a to your computer and use it in GitHub Desktop.
Save danny8376/6acea0c67b04f8e95e8a to your computer and use it in GitHub Desktop.
my .screenrc
# Start message
startup_message off
# Set hardstatus always on
caption always "%{=u .R} %-w%{=ub .m}%n %t%{=u .R}%+w "
hardstatus alwayslastline "%{= .Y} [%l] %<%=%{= .g}@%H (%n %t) %=%{G}%e %{= .c}%Y/%m/%d%{= .M} %C %A"
# Set default encoding using utf8
defutf8 on
# Refresh the display when exiting programs
altscreen on
# redarw bg with bg color OwO
defbce on
# reload screenrc OwO
bind R eval "source $HOME/.screenrc" "echo '.screenrc reloaded!'"
# big5 bbs ?
bind ~ eval "encoding big5" "cjkwidth off"
# Disable vbell
vbell off
# === Keboard binding ===
# bind Shift+left/right to prev/next win <= pietty@win
# bind Alt+left/right to prev/next win <= iTerm@OSX
bindkey ^[[D prev
bindkey ^[[C next
# bind Ctrl/Shift+left/right <= MobaXterm.............
bindkey ^[[1;5D prev
bindkey ^[[1;5C next
# bind Shift + F1~F10 to screen0~9
bindkey ^[[1;2P select 0
bindkey ^[[1;2Q select 1
bindkey ^[[1;2R select 2
bindkey ^[[1;2S select 3
bindkey ^[[15;2~ select 4
bindkey ^[[17;2~ select 5
bindkey ^[[18;2~ select 6
bindkey ^[[19;2~ select 7
bindkey ^[[20;2~ select 8
bindkey ^[[21;2~ select 9
# bind F7 to detach screen session (to background)
bindkey -k k7 detach
# bind F8 to kill current screen window
bindkey -k k8 kill
# bind F9 to create a new screen
bindkey -k k9 screen
# bind F10 to rename current screen window
bindkey -k k; title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment