Skip to content

Instantly share code, notes, and snippets.

@worldwise001
Created June 29, 2026 11:56
Show Gist options
  • Select an option

  • Save worldwise001/9d39d74da86ce3e0e08fc9f38677916f to your computer and use it in GitHub Desktop.

Select an option

Save worldwise001/9d39d74da86ce3e0e08fc9f38677916f to your computer and use it in GitHub Desktop.
MacOS screenrc
# ~/.screenrc
# ── Terminal ──────────────────────────────────────────────────────────────────
term screen-256color-bce
truecolor on
defutf8 on
encoding utf8 utf8
altscreen on
# ── Behavior ──────────────────────────────────────────────────────────────────
startup_message off
vbell off
defscrollback 50000
defflow off
defmonitor on
msgwait 3
activity "activity in window %n (%t)"
bell_msg "!! bell in window %n (%t) !!"
# Dynamic tab titles: running command name (requires shell xterm title support,
# which zsh on macOS provides by default via preexec/precmd)
shelltitle "$ |zsh"
# Capture username once at startup
backtick 1 0 0 whoami
backtick 2 0 0 date '+%H:%M'
backtick 3 30 30 sh -c "sysctl -n vm.loadavg | sed 's/[{}]//g' | xargs"
backtick 4 5 5 date +%H:%M:%S
# ── Caption: window tab bar ───────────────────────────────────────────────────
# %-w = inactive windows before current %+w = inactive windows after
# %n%f = window number + flags: ! bell & silence @ logging
# Active tab: black on bright magenta (hot pink).
# Inactive tabs: bright white on dark magenta (purple).
caption always
caption string "%{= wd} %-w%{= #000;#DD00DD} %n%f %t %{= wd}%+w %=%c "
# ── Hardstatus: info bar ──────────────────────────────────────────────────────
hardstatus alwayslastline
hardstatus string "%{= wd} %{g}%1`%{w}@%{y}%H %{w}| %{y}%D %d %M %Y %4` %{w}| %{m}ld: %3` %{w}| %{c}since %2` %{= wd}%="
# ── Key bindings ──────────────────────────────────────────────────────────────
# ctrl-a a sends a literal ctrl-a to the application
bind a stuff \001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment