技术 支持

获取完整的GlazeWM配置文档、快捷键参考和技术指南。

快速入门

配置文件位置

首次启动GlazeWM后,配置文件会自动生成在以下位置:

%USERPROFILE%\.glzr\glazewm\config.yaml

例如:C:\Users\YourName\.glzr\glazewm\config.yaml

基础配置文件示例

以下是一个完整的基础配置示例,包含常用设置:

# GlazeWM 基础配置文件

# =========================================
# 快捷键绑定
# =========================================
keybindings:
  # 焦点控制 - 使用 Alt + h/j/k/l 在窗口间移动
  - commands: ["focus --direction left"]
    bindings: ["alt + h"]
  - commands: ["focus --direction right"]
    bindings: ["alt + l"]
  - commands: ["focus --direction up"]
    bindings: ["alt + k"]
  - commands: ["focus --direction down"]
    bindings: ["alt + j"]

  # 移动窗口
  - commands: ["move --direction left"]
    bindings: ["alt + shift + h"]
  - commands: ["move --direction right"]
    bindings: ["alt + shift + l"]
  - commands: ["move --direction up"]
    bindings: ["alt + shift + k"]
  - commands: ["move --direction down"]
    bindings: ["alt + shift + j"]

  # 工作区切换
  - commands: ["focus --workspace 1"]
    bindings: ["alt + 1"]
  - commands: ["focus --workspace 2"]
    bindings: ["alt + 2"]
  - commands: ["focus --workspace 3"]
    bindings: ["alt + 3"]
  - commands: ["focus --workspace 4"]
    bindings: ["alt + 4"]

  # 关闭窗口
  - commands: ["close"]
    bindings: ["alt + shift + q"]

  # 重载配置
  - commands: ["wm-reload-config"]
    bindings: ["alt + shift + r"]

# =========================================
# 工作区配置
# =========================================
workspaces:
  - name: "1"
  - name: "2"
  - name: "3"
  - name: "4"
  - name: "5"

# =========================================
# 窗口规则
# =========================================
window-rules:
  # 文件资源管理器浮动显示
  - app_id: "explorer.exe"
    floating: true

# =========================================
# 常规设置
# =========================================
general:
  # 窗口之间的间距
  gaps:
    inner: 10
    outer: 5

配置文件详解

快捷键绑定 (Keybindings)

快捷键绑定允许你定义触发GlazeWM命令的键盘组合。

# 基本语法
keybindings:
  - commands: ["command_name --arg value"]
    bindings: ["modifier + key"]

# 支持的修饰键
# alt, shift, control, win, lalt, ralt, lshift, rshift, lctrl, rctrl, lwin, rwin

# 支持的按键
# 字母: a-z
# 数字: 0-9
# 功能键: f1-f24
# 方向键: up, down, left, right
# 其他: space, enter, escape, tab, backspace, delete

工作区配置 (Workspaces)

工作区帮助你将窗口分组管理,类似i3的多工作区设计。

workspaces:
  # 基础工作区
  - name: "1"
    display: "DP-1"  # 分配到指定显示器

  - name: "2"
  - name: "3"
  - name: "4"

  # 带自定义布局的工作区
  - name: "5"
    layout: "split_vertical"

# 可用的布局类型:
# - "tiled" (默认平铺)
# - "vertical" (垂直分割)
# - "horizontal" (水平分割)
# - "stacking" (堆叠)
# - "tabbed" (标签页)
# - "split_vertical" (垂直二分)
# - "split_horizontal" (水平二分)

窗口规则 (Window Rules)

窗口规则允许你为特定应用程序设置自定义行为。

window-rules:
  # 让文件资源管理器浮动显示
  - app_id: "explorer.exe"
    floating: true

  # 将记事本分配到工作区1
  - app_id: "notepad.exe"
    workspace: "1"

  # 设置窗口透明度
  - app_id: "Spotify.exe"
    opacity: 0.8

  # 忽略平铺(使用原生位置)
  - app_id: "Steam.exe"
    ignore: true

  # 设置窗口尺寸
  - app_id: " calculator.exe"
    floating: true
    floatingDimensions: { x: 0.5, y: 0.5, width: 400, height: 500 }

# 如何查找 app_id?
# 在 GlazeWM 中按 Alt + Shift + P,然后点击目标窗口即可查看

常规设置 (General)

general:
  # 窗口间距设置
  gaps:
    inner: 10   # 窗口之间的间距
    outer: 5    # 窗口与屏幕边缘的间距

  # 居中偏移(用于浮动窗口)
  floatingCenterOffset: { x: 0, y: 0 }

  # 平铺方向
  # "left-to-right" 或 "top-to-bottom"
  tilingDirection: "left-to-right"

  # 是否自动隐藏任务栏
  hideTaskBar: false

  # 是否居中浮动窗口
  floatWindowsCentered: true

启动程序 (Startup Programs)

配置开机自动启动的应用程序。

startupPrograms:
  # 启动Chrome浏览器
  - path: "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"

  # 启动终端
  - path: "wt.exe"

  # 带参数启动
  - path: "C:\\Program Files\\Notepad++\\notepad++.exe"
    args: "C:\\Users\\test\\Documents\\notes.txt"

  # 延迟启动(毫秒)
  - path: "C:\\Program Files\\Discord\\Update.exe"
    args: "--processStart Discord.exe"
    delayMs: 2000

完整快捷键列表

焦点控制

Alt H
聚焦左侧窗口
Alt L
聚焦右侧窗口
Alt K
聚焦上方窗口
Alt J
聚焦下方窗口
Alt Space
循环焦点(平铺→浮动→全屏)
Alt '
聚焦最近工作区

移动窗口

Alt Shift H
向左移动窗口
Alt Shift L
向右移动窗口
Alt Shift K
向上移动窗口
Alt Shift J
向下移动窗口
Alt Shift '
移动到最近工作区

工作区

Alt 1-9
切换到工作区 1-9
Alt S
切换到下一个工作区
Alt A
切换到上一个工作区
Alt D
切换到最近工作区
Alt Shift 1-9
移动窗口到工作区

窗口状态

Alt Shift Space
切换浮动状态
Alt T
切换平铺状态
Alt F
切换全屏状态
Alt M
切换最小化状态
Alt V
切换平铺方向

通用操作

Alt Shift Q
关闭窗口
Alt Shift R
重载配置文件
Alt Shift W
重绘所有窗口
Alt Shift E
退出 GlazeWM
Alt Shift P
暂停/恢复快捷键

调整大小

Alt U
向左调整窗口大小
Alt I
向上调整窗口大小
Alt O
向右调整窗口大小
Alt P
向下调整窗口大小

常见问题

配置文件位于 %USERPROFILE%\.glzr\glazewm\config.yaml。首次启动GlazeWM后会自动生成默认配置。你可以使用任何文本编辑器(如VS Code、Notepad++)来修改配置。修改完成后按 Alt + Shift + R 重载配置即可生效。
在配置文件中添加窗口规则,设置 ignore: truefloating: true

window-rules:
  - app_id: "steam.exe"
    ignore: true


如果不知道应用程序的 app_id,可以按 Alt + Shift + P 然后点击目标窗口查看。
你可以:

1. 修改GlazeWM的快捷键绑定,改为不冲突的组合
2. 按 Alt + Shift + P 临时暂停GlazeWM的快捷键
3. 为冲突的应用程序设置窗口规则,使其不受GlazeWM控制
删除配置文件后重启GlazeWM,系统会自动生成一份新的默认配置。

删除: %USERPROFILE%\.glzr\glazewm\config.yaml
GlazeWM完美支持多显示器。你可以在工作区配置中指定每个工作区对应的显示器:

workspaces:
  - name: "1"
    display: "DP-1" # 主显示器
  - name: "2"
    display: "HDMI-1" # 第二个显示器


你可以按 Alt + Shift + P 查看显示器的实际名称。
有两种方式:

方式1:使用GlazeWM内置功能
右键点击系统托盘中的GlazeWM图标,勾选"开机自动启动"

方式2:在配置文件中添加
general:
  startupMode: "auto"

社区支持

Discord 社区

加入我们的Discord服务器,与其他用户交流,获取帮助和建议。

GitHub Issues

报告Bug或请求新功能。通过GitHub Issues与开发者直接沟通。

GitHub Discussions

参与讨论,分享你的配置和使用心得,学习他人经验。