展示 HN:Dwm.tmux – 受 dwm 窗口管理器启发的 tmux 窗口管理器
Show HN: Dwm.tmux – a dwm-inspired window manager for tmux

原始链接: https://github.com/saysjonathan/dwm.tmux

## dwm.tmux:一个 Tmux 平铺窗口管理器 dwm.tmux 为 Tmux 带来了 dwm 风格的平铺体验,提供高效的窗格和窗口管理。安装需要 Tmux 3.2+ 版本,并在克隆仓库后执行简单的 `make` 命令。 它将窗口组织成一个左侧的大主窗格和右侧的一堆较小窗格。 键绑定(使用 Meta 键 + 字母/数字)控制窗格创建 (`Meta-n`, `Meta-w`)、删除 (`Meta-c`)、移动 (`Meta-Shift-[0-9]`) 和布局调整 (`Meta-t`, `Meta-Space`)。 窗口管理包括创建 (`Meta-N`)、杀死 (`Meta-X`) 和选择窗口 (`Meta-[0-9]`)。 dwm.tmux 可以通过环境变量(如 `mfact`,主窗格大小)和标准的 `.tmux.conf` 文件进行高度定制。 用户只需在他们的 `.tmux.conf` 中 `source-file` dwm.tmux 配置文件,然后在这一行之后添加自定义绑定即可。

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 工作 | 提交 登录 展示 HN:Dwm.tmux – 一个受 dwm 启发的 tmux 窗口管理器 (github.com/saysjonathan) 10 分,来自 saysjonathan 2 小时前 | 隐藏 | 过去的 | 收藏 | 讨论 大家好,HN! 鉴于最近所有代理工作流程主要基于终端和 tmux,我想分享一个我大约十年前创建的小项目。 我一直将此作为我的主要终端“窗口管理器”使用,并希望与大家分享,以防其他人觉得有用。 我很乐意了解其他基于终端的工作流程以及您可能使用的任何具有类似功能的工具。 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

dwm-inspired tiling pane and window manager for Tmux.

dwm.tmux requires tmux > 3.2.

To install, use the provided Makefile:

git clone https://github.com/saysjonathan/dwm.tmux.git
cd dwm.tmux
make

By default dwm.tmux uses /usr/local as it's prefix. To change the prefix:

Ensure that $PREFIX/bin is in your PATH.

To use, source the dwm.tmux tmux config:

echo 'source-file /usr/local/lib/dwm.tmux' >> $HOME/.tmux.conf

dwm.tmux defines the following command aliases, each with a default keybinding:

  • newpane Meta-n Create a new pane and place it in the Main pane
  • newpanecurdir Meta-w Create a new pane starting in the same directory and place it in the Main pane
  • killpane Meta-c Close the current pane. If the pane is in the Main pane, close the pane and promote the first pane in the stack to the Main pane
  • movepane[0-9] Meta-Shift-[0-9] Move the current pane to the specified window
  • nextpane Meta-j Select the next pane (clockwise)
  • prevpane Meta-k Select the previous pane (counterclockwise)
  • rotateccw Meta-< Rotate panes counterclockwise
  • rotatecw Meta-> Rotate panes clockwise
  • layouttile Meta-t Refresh layout (return to Main and Stack setup)
  • zoom Meta-Enter Place select pane in the Main pane
  • float Meta-Space Switch pane to floating fullscreen
  • decmfact Meta-h Decrease the main pane space factor
  • incmfact Meta-l Increase the main pane space factor
  • window[0-9] Meta-[0-9] Select the target window by ID
  • newwindow Meta-N Create a new window starting in the same directory as the current pane
  • killwindow Meta-X Delete the current active window
  • popup Meta-p Display a floating pane popup in the current pane's directory

Also defined are environment variables to tweak behavior:

  • mfact Main pane space factor, the size of the main pane as a percentage of total window size
  • killlast If value is greater than 0, kill pane even if its the last pane in a window

Keybindings and default values can be set in a configuration file:

setenv -g killlast 1 # kill pane even if it's the last
bind -n M-q killpane
bind -n M-t newpanecurdir

Customizations should be added after the source-file command which loads dwm.tmux.

Similar to dwm, windows are always organised as follows:

 ====================================
|                 |        S1        | 
|                 |==================
|      M(0)       |        S2        | 
|                 |==================
|                 |        S3        | 
 ====================================

A large Main pane is placed on the left side of the screen while a stack of smaller panes is placed on the right. The Main pane is always pane 0, while the stack of panes is numbered sequentially in ascending order.

联系我们 contact @ memedata.com