tmux-config

tony更新放缓

一份开箱即用的 tmux 配置示例,提供 screen 与 vim 风格快捷键、系统状态和 CPU 负载条,省去从零折腾终端复用器配置的麻烦。

:green_book: Example tmux configuration - screen + vim key-bindings, system stat, cpu load bar.

暂无版本1,873star469fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
git clone --recursive https://github.com/tony/tmux-config.git ~/.tmux
ln -s ~/.tmux/.tmux.conf ~/.tmux.conf
硬件要求按 README 说明

README 未说明;tmux-mem-cpu-load 支持 Linux 和 OS X

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

一份开箱即用的 tmux 配置示例,提供 screen 与 vim 风格快捷键、系统状态和 CPU 负载条

一份开箱即用的 tmux 配置示例,提供 screen 与 vim 风格快捷键、系统状态和 CPU 负载条,省去从零折腾终端复用器配置的麻烦。

核心能力

  • 把前缀键改为 Ctrl-A,兼容 screen 用户习惯
  • 用 hjkl 在窗格间移动,并支持水平、垂直分屏
  • 通过 tmux-mem-cpu-load 在状态栏显示内存与 CPU 负载
  • 提供 main-horizontal 与 main-vertical 两种主窗格布局
  • tmux 3.2+ 支持弹出式 shell 和 git log 弹窗

容易踩的坑

克隆时必须加 --recursive,否则要手动执行 git submodule init 和 git submodule update;状态栏的 CPU 和内存数据需要自行编译安装 tmux-mem-cpu-load 到 /usr/local/bin;tmux 版本需 3.2+,弹出窗口等特性在 3.4+ 体验更好

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    tmux is a terminal multiplexer.

    • Requires tmux 3.2+ (best experience on 3.4+).
    • Support for tmux-mem-cpu-load.
    • Prefix mapped to Ctrl-A for screen users.

    New to tmux? The Tao of tmux is now available on Leanpub and Amazon Kindle. Read and browse the book for on the web.

    Want more tmux? Check out the libtmux python library for controlling tmux, and load your code projects via YAML/JSON with tmuxp.

    Share your .dot-configs

    Have a tmux configuration you'd like to share? Whether a fork of this project, another's, or your own, submit it to awesome-tmux-configs.

    Installation

    Download:

    git clone --recursive https://github.com/tony/tmux-config.git ~/.tmux
    

    Copy tmux config to home:

    ln -s ~/.tmux/.tmux.conf ~/.tmux.conf
    

    Go to config dir:

    cd ~/.tmux
    

    Stats

    tmux-mem-cpu-load

    Works on Linux and OS X.

    Prep ourself to download submodule (if you forgot --recursive when cloning):

    git submodule init
    

    Download submodule:

    git submodule update
    

    Change dir to tmux-mem-cpu-load:

    cd ~/.tmux/vendor/tmux-mem-cpu-load
    

    Make _build directory and cd into it:

    mkdir _build; cd _build
    

    General make file:

    cmake ..
    

    Compile binary:

    make
    

    Install our binary to /usr/local/bin/tmux-mem-cpu-load:

    sudo make install
    

    (No need to do sudo if on OS X / macOS)

    Go home:

    cd ~
    

    Launch tmux:

    tmux
    

    And press Control + a then d to go back to the terminal.

    Update config:

    tmux source-file ~/.tmux.conf
    

    Powerline (Advanced)

    You can add suport for powerline by adding these to your ~/.tmux.conf. Be sure to grab and install powerline-fonts for your system.

    See Powerline on ReadTheDocs.org for more info.

    Start tmux

    To start a session:

    tmux

    To reattach a previous session:

    tmux attach

    To reload config file

    <Control + a>: then source-file ~/.tmux.conf

    Commands

    Our prefix/leader key is Control + a now (just like the screen multiplexer). This sequence must be typed before any tmux shortcut.

    • Control + a before any command
    • Control + a then ? to bring up list of keyboard shortcuts (with descriptions)
    • Control + a then " to split window horizontally
    • Control + a then v to split window vertically
    • Control + a then <Space> to open quick-action menu
    • Control + a then o to rotate panes
    • Control + a then h, j, k, l to move left, down, up, right (vim hjkl)
    • Control + a then ; to go to last panel

    Beyond your first window:

    • Control + a then c to create a new window
    • Control + a then n to next window
    • Control + a then p to previous window
    • Control + a then [0-9] move to window number
    • Control + a then & to kill window

    Custom:

    • Control + a then m to switch to main-horizontal layout with the main pane at 66% height.
    • Control + a then M to switch to main-vertical layout with the main pane at 50% width.
    • Control + a then t to open a popup shell (80% of screen, 3.2+).
    • Control + a then g to open a popup with git log --oneline --graph (3.2+).

    More configs / Tools

    • Save / Load your tmux workspaces through JSON or YAML with tmuxp.
    • Clone + Synchronize your git / hg / svn projects through JSON / YAML with vcspull.
    • Modular, Lazy-loading vim configuration with support for C, C++, Python, Go and Javascript with tony/vim-config
    • Modular dot-config example tony/.dot-config

    Other