记录一下如何在Windows和Ubuntu系统中实现窗口平铺。
Windows
在Windows中,使用微软开发的PowerToys工具箱中的FancyZones工具可以满足大部分需求:
- 长按
Shift并拖动窗口将当前窗口平铺到指定区域; Win+方向键将当前窗口平铺到指定区域;Win+Shift+~自定义平铺区域样式;
Ubuntu
在Ubuntu中,实现窗口平铺的方案较多,但是大部分的配置过程较为复杂。
gTile
gTile可以作为GNOME扩展直接安装,使用体验较好。
安装
-
安装本地支持组件
chrome-gnome-shell:sudo apt install chrome-gnome-shell gnome-shell --version - 安装浏览器扩展
GNOME Shell integration; - 在GNOME Shell Extensions网站上安装和管理gTile扩展;
使用
| 功能 | 快捷键 |
|---|---|
| 打开界面 | Super+Enter |
| 将当前窗口缩放到左下角 | Super+Alt+1 |
| 将当前窗口缩放到正下方 | Super+Alt+2 |
| 将当前窗口缩放到右下角 | Super+Alt+3 |
| 将当前窗口缩放到左侧 | Super+Alt+4 |
| 将当前窗口缩放到中央 | Super+Alt+5 |
| 将当前窗口缩放到右侧 | Super+Alt+6 |
| 将当前窗口缩放到左上角 | Super+Alt+7 |
| 将当前窗口缩放到正上方 | Super+Alt+8 |
| 将当前窗口缩放到右上角 | Super+Alt+9 |
- 缩放位置与数字小键盘上的键位对应;
- 重复按缩放快捷键可以改变缩放大小;
x-tile
x-tile可以作为软件包直接安装并配置,较为简便,但是仍无法达到类似Windows的使用体验。
安装
sudo add-apt-repository ppa:giuspen/ppa
sudo apt update
sudo apt install x-tile
配置
- 取消勾选
Exit After Tile; -
Edit->Preferences设置首选项:Language选择语言;- 对于主显示器,预留出任务栏的宽度以保证最佳的窗口平铺效果:
- 勾选
Override Monitor 1 Tiling Area; Position设置平铺区域位置(左上角坐标);Size设置平铺区域大小(宽度和高度);- 在1920*1080的分辨率下,任务栏宽度约为65像素;
- 勾选
使用
-
语法说明:
x-tile [option] -
选项含义:
option 含义 缺省 打开主界面 wopen the x-tile main window without using the panel zundo the latest tiling operation ftile all opened windows vertically htile all opened windows horizontally utile all opened windows triangle-up dtile all opened windows triangle-down ltile all opened windows triangle-left rtile all opened windows triangle-right qquad tile all opened windows g = g 0 = g 0 0tile all opened windows in a grid with automatic rows and columns g rows = g rows 0tile all opened windows in a grid with given rows and automatic columns g 0 colstile all opened windows in a grid with automatic rows and given columns g rows colstile all opened windows in a grid with given rows and columns 1custom tile 1 all opened windows 2custom tile 2 all opened windows iinvert the order of the latest tiling operation ycycle the order of the latest tiling operation mmaximize all opened windows Munmaximize all opened windows cclose all opened windows
平铺式窗口管理器
- 平铺式窗口管理器(Tiling Window Manager,TWM):窗口之间不重叠,通过快捷键调整布局;
- 堆叠式窗口管理器(Stacking Window Manager,SWM):窗口之间可以重叠,通过鼠标调整布局;
Windows
Linux
- hyprwm/Hyprland
- swaywm/sway
- i3/i3
- baskerville/bspwm
- awesomeWM/awesome
- qtile/qtile
- leftwm/leftwm
- Kintaro/wtftw
- hyprwm/Hypr
macOS
参考
- Tiling window manager-Wikipedia
- microsoft/PowerToys
- 13 Best Tiling Window Managers for Linux-Tecmint
- 20 Best tiling window managers for Linux as of 2023-Slant
- Linux app for snapping windows into “Zones”
- gTile-GNOME Shell Extensions
- gTile/gTile
- 如何安装GNOME插件-techmoe的文章-知乎
- x tile-giuspen
- giuspen/x-tile
- Linux平铺窗口管理器(Tiling Window Manager)完全指南:从入门到精通-极客技术博客
- 最佳Linux窗口管理器详解:从选择到配置的完全指南-极客技术博客
- i3窗口管理器终极定制指南丨Linux中国-Linux中国的文章-知乎
- 为什么我喜欢用bspwm来做我的Linux窗口管理器丨Linux中国-Linux中国的文章-知乎
- 如何配置linux平铺式窗口管理器i3wm?-新鲜水墨的回答-知乎
- 如何配置linux平铺式窗口管理器i3wm?-李狗蛋LGD的回答-知乎
- ArchLinux从零构建易用美观的i3wm+i3bar+rofi+nitrogen桌面环境(一)-Jeek的文章-知乎
- ArchLinux从零构建易用美观的i3wm+i3bar+rofi+nitrogen桌面环境(二)-Jeek的文章-知乎