Files
25Aug15_Tmux-Config/tmux.conf

37 lines
1.3 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 启用 tpm 插件管理器
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# 启动 TPM
run '~/.tmux/plugins/tpm/tpm'
# 颜色
# set -g default-terminal "screen-256color"
# 鼠标
set -g mouse on
# 状态栏刷新间隔(秒)
set -g status-interval 1
# 状态栏背景/前景
set -g status-bg black
set -g status-fg white
# 左侧状态栏(会话名 | 窗口 | 面板)
set -g status-left-length 40
set -g status-left "#[fg=green,bold] #S #[fg=cyan]| #[fg=yellow]#W #[fg=cyan]| #[fg=white]#P "
# 炫彩右侧系统监控(修正版 CPU 计算内存单位改为GBCPU频率改为GHz
set -g status-right-length 150
set -g status-right "\
#[fg=red,bold]CPU: #(top -bn1 | grep 'Cpu(s)' | awk '{print 100 - $8\"%\"}') \
#[fg=magenta] #(awk '/MHz/ {printf(\"%.2fGHz\", $4/1000); exit}' /proc/cpuinfo) \
#[fg=yellow,bold]#(free -m | awk 'NR==2 {printf \" Mem: %.1f/%.1fGB | \", $3/1024, $2/1024} NR==3 {printf \"Swap: %.1f/%.1fGB\", $3/1024, $2/1024}') \
#[fg=blue]Disk: #(df -h / | awk 'NR==2 {print $3\"/\"$2}') \
#[fg=cyan]Net: #(vnstat --oneline b | awk -F\; '{print \"↑\"$11\" ↓\"$9}') \
#[fg=green] %Y-%m-%d #[fg=white] %H:%M"
# 让状态栏颜色更醒目
set -g status-style bg=black,fg=white
set -g window-status-current-style bg=colour237,fg=colour223,bold
set -g window-status-current-format " #I:#W#F "