【原】Linux 终端分屏工具 tmux 配…

本文介绍如何配置 Linux 下的 tmux 分屏工具,使其支持鼠标操作,包括选择窗口、调整窗口大小及滚动屏幕等功能。通过修改 .tmux.conf 文件实现这些特性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

本文是让linux下分屏工具可以支持鼠标选窗口或面板,鼠标调大小,鼠标滚屏而做的设置。

先贴出主目录下的.tmux.conf文件如下

----------  .tmux.conf  START -------------------------------

set -g prefix ^a
unbind ^b
bind send-prefix


set -g base-index 1

unbind '"'
bind splitw -v 分割成上下两个窗口
unbind %
bind splitw -h 分割成左右两个窗口

bind selectp -U 选择上窗格
bind selectp -D 选择下窗格
bind selectp -L 选择左窗格
bind selectp -R 选择右窗格

bind ^k resizep -U 10 跟选择窗格的设置相同,只是多加 Ctrl(Ctrl-k)
bind ^j resizep -D 10 同上
bind ^h resizep -L 10 ...
bind ^l resizep -R 10 ...

Set the mouse behaviour
set-option -g mode-mouse on
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
------- .tmux.conf STOP --------------------------------------------------


效果如图所示。

【原】Linux 终端分屏工具 tmux 配置与使用 - kayneo - Kayneo 最天使~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值