├── .tmux.conf ├── README.md ├── fish_312 ├── bc-1.07.1-2-x86_64.pkg.tar.xz ├── fish-3.1.2-1-x86_64.pkg.tar.zst ├── groff-1.22.4-1-x86_64.pkg.tar.xz ├── libpcre2_16-10.35-1-x86_64.pkg.tar.zst ├── libpipeline-1.5.2-1-x86_64.pkg.tar.xz └── man-db-2.9.3-1-x86_64.pkg.tar.zst ├── fish_for_git-bash.7z ├── tmux_271 ├── libevent-2.1.8-1-x86_64.pkg.tar.xz ├── tmux-2.7-1-x86_64.pkg.tar.xz └── tmux_for_git-bash.zip ├── tmux_311 ├── libevent-2.1.12-2-x86_64.pkg.tar.zst └── tmux-3.1.c-1-x86_64.pkg.tar.zst ├── tmux_for_git-bash.zip ├── tmux_for_windows.gif ├── tmux_for_windows.png └── tmux_mouse.gif /.tmux.conf: -------------------------------------------------------------------------------- 1 | # https://www.youtube.com/watch?v=xTplsyQaGFs 2 | 3 | # tmux 启用鼠标操作 4 | # setw -g mouse 5 | set-option -g history-limit 20000 6 | set-option -g mouse on 7 | bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M 8 | bind -n WheelDownPane select-pane -t= \; send-keys -M 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tmux_for_windows 2 | tmux是一个开源工具,用于在一个终端窗口中运行多个终端会话。本工具从msys2里提取,可以在Git for Windows的Git Bash (MingW64)下正常使用。 3 | 4 | 蘭雅sRGB 龙芯小本服务器 | [https://262235.xyz](https://262235.xyz) 5 | 6 | ### tmux在windows系统下安装使用 7 | https://youtu.be/zSUwczhdtKI 8 | 9 | ![](https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/master/tmux_for_windows.gif) 10 | 11 | ### 首先你要保证已经安装有 Git for Windows 12 | 下载地址 https://git-scm.com/download/win 13 | 14 | ### tmux for Git Bash (MingW64) 安装包使用 15 | - 下载 [tmux_for_git-bash.zip](https://github.com/hongwenjun/tmux_for_windows/raw/master/tmux_for_git-bash.zip) 16 | - 释放文件到 D:\Git\usr 17 | - 实际可执行文件在 D:\Git\usr\bin\tmux.exe 18 | 19 | ### tmux 使用 20 | - Windows 开始菜单 运行 D:\Git\git-bash.exe 21 | - 命令行输入 tmux 22 | 23 | ### git-bash环境下命令行安装 24 | 25 | ```bash 26 | git clone https://github.com/hongwenjun/tmux_for_windows.git 27 | cd tmux_for_windows/ 28 | unzip -x tmux_for_git-bash.zip -d /usr 29 | ``` 30 | 31 | ### 原始的 tmux for msys2 的安装包,不需要下载 32 | ``` 33 | # tmux-2.7-1 旧版本 tmux_for_windows/tmux_271 34 | a31b2636ff7540ec11a38ac4d9c95dc9 libevent-2.1.8-1-x86_64.pkg.tar.xz 35 | a7ac01f4ccef1ecedf9ef346fb2c818e tmux-2.7-1-x86_64.pkg.tar.xz 36 | ba061b3687f77dde53658a95793e952e tmux_for_git-bash.zip # 旧版本 37 | 38 | # tmux-3.1-c1 新版本 tmux_for_windows/tmux_311 39 | 9abfa52145cf5a7e591847f58a5253e3 libevent-2.1.12-2-x86_64.pkg.tar.zst 40 | b433f58e1267f5582de43d2e9d78d82d tmux-3.1.c-1-x86_64.pkg.tar.zst 41 | 42 | ``` 43 | 44 | ![](https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/master/tmux_for_windows.png) 45 | 46 | 47 | # tmux 启用鼠标操作 48 | ### .tmux.conf 设定 49 | ``` 50 | # https://www.youtube.com/watch?v=xTplsyQaGFs 51 | 52 | # tmux 启用鼠标操作 53 | setw -g mouse 54 | set-option -g history-limit 20000 55 | set-option -g mouse on 56 | bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M 57 | bind -n WheelDownPane select-pane -t= \; send-keys -M 58 | ``` 59 | ![](https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/master/tmux_mouse.gif) 60 | 61 | ------ 62 | 63 | 64 | ![](http://fishshell.com/assets/img/Terminal_Logo2_CRT_Flat.png) 65 | ## fish_for_git-bash 66 | 67 | Fish 是"the friendly interactive shell"的简称,最大特点就是方便易用。很多其他 Shell 需要配置才有的功能,Fish 默认提供,不需要任何配置。 68 | 69 | ### fish for Git Bash (MingW64) 安装包使用 70 | - 下载 [fish_for_git-bash.7z](https://github.com/hongwenjun/tmux_for_windows/raw/master/fish_for_git-bash.7z) 71 | - 释放文件到 D:\Git 72 | - 实际可执行文件在 D:\Git\usr\bin\fish.exe 73 | 74 | 75 | ### fish 使用教程 76 | - http://fishshell.com/docs/current/tutorial.html 77 | 78 | ### 原始的 fish for msys2 的安装包,不需要下载 79 | ``` 80 | Path: tmux_for_windows/fish_312 81 | 9cb0219a335d2b54c388cbf25c2ea456 bc-1.07.1-2-x86_64.pkg.tar.xz 82 | 4fd6c824c616709966167fdc5f1a5195 fish-3.1.2-1-x86_64.pkg.tar.zst 83 | b882faf644ccd4770f7c3002e1dc6d71 groff-1.22.4-1-x86_64.pkg.tar.xz 84 | 0d78c572a6cd9f0bf88e2b0ceedf62e6 libpcre2_16-10.35-1-x86_64.pkg.tar.zst 85 | f3d45b93b85a9d57c978224bd8111c09 libpipeline-1.5.2-1-x86_64.pkg.tar.xz 86 | 4dd5d447bb0e160502afe95a1bafe044 man-db-2.9.3-1-x86_64.pkg.tar.zst 87 | 88 | ``` 89 | 90 | ## 把fish设为交互式shell 91 | 如果不将fish设为默认shell,就能照常运行Bash的初始化脚本。这能够保证用户当前的环境变量不受影响并且在fish中也能使用,因为fish是作为Bash的子进程运行的。下面是几种只把fish设为交互式shell的方法。 92 | 93 | ### 通过.bashrc启动fish 94 | 保持默认shell为Bash不变,然后添加一行**exec fish**到合适的Bash配置文件中,比如.bashrc。在这种方法中,Bash会正常执行/etc/profile和/etc/profile.d中的所有配置文件。相对于之后几种方法,这种是最通用的,因为这种方法在本机计算机和SSH远程计算机上都能使用。 95 | 96 | 97 | ### 使用终端复用器的选项 98 | 要将fish设为tmux启动的默认shell,在~/.tmux.conf中加入这行: 99 | 100 | set-option -g default-shell "/usr/bin/fish" 101 | 102 | ### 关闭问候语 103 | 默认情况下,每次启动fish,fish都会打印问候语。要关闭问候语,可以在fish中运行: 104 | 105 | set -U fish_greeting 106 | 107 | ### 网页界面 108 | 通过下面命令即可用浏览器打开fish的配置页面。 109 | 110 | fish_config 111 | -------------------------------------------------------------------------------- /fish_312/bc-1.07.1-2-x86_64.pkg.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/fish_312/bc-1.07.1-2-x86_64.pkg.tar.xz -------------------------------------------------------------------------------- /fish_312/fish-3.1.2-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/fish_312/fish-3.1.2-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /fish_312/groff-1.22.4-1-x86_64.pkg.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/fish_312/groff-1.22.4-1-x86_64.pkg.tar.xz -------------------------------------------------------------------------------- /fish_312/libpcre2_16-10.35-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/fish_312/libpcre2_16-10.35-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /fish_312/libpipeline-1.5.2-1-x86_64.pkg.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/fish_312/libpipeline-1.5.2-1-x86_64.pkg.tar.xz -------------------------------------------------------------------------------- /fish_312/man-db-2.9.3-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/fish_312/man-db-2.9.3-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /fish_for_git-bash.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/fish_for_git-bash.7z -------------------------------------------------------------------------------- /tmux_271/libevent-2.1.8-1-x86_64.pkg.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/tmux_271/libevent-2.1.8-1-x86_64.pkg.tar.xz -------------------------------------------------------------------------------- /tmux_271/tmux-2.7-1-x86_64.pkg.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/tmux_271/tmux-2.7-1-x86_64.pkg.tar.xz -------------------------------------------------------------------------------- /tmux_271/tmux_for_git-bash.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/tmux_271/tmux_for_git-bash.zip -------------------------------------------------------------------------------- /tmux_311/libevent-2.1.12-2-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/tmux_311/libevent-2.1.12-2-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /tmux_311/tmux-3.1.c-1-x86_64.pkg.tar.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/tmux_311/tmux-3.1.c-1-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /tmux_for_git-bash.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/tmux_for_git-bash.zip -------------------------------------------------------------------------------- /tmux_for_windows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/tmux_for_windows.gif -------------------------------------------------------------------------------- /tmux_for_windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/tmux_for_windows.png -------------------------------------------------------------------------------- /tmux_mouse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/5a519d3e1b575a16826e284f2f480427fcdb69a0/tmux_mouse.gif --------------------------------------------------------------------------------