Skip to content

A tiling window manager for Windows inspired by i3 and Polybar.

License

Notifications You must be signed in to change notification settings

lyze237-forks/GlazeWM

 
 

Repository files navigation

GlazeWM · PRs Welcome

GlazeWM is a tiling window manager for Windows inspired by i3 and Polybar.

Why use a tiling window manager? A tiling WM lets you easily organize windows and adjust their layout on the fly by using keyboard-driven commands.

  • Simple YAML configuration
  • Multi-monitor support
  • Customizable bar window
  • Customizable rules for specific windows
  • Easy one-click installation

demo

Under the hood, GlazeWM adds functionality to the built-in DWM and uses the Windows API via P/Invoke to position windows.

Download

The latest runnable binary can be downloaded via releases. No installation necessary, simply run the executable.

Alternatively, to build from source, use the following .NET CLI command:

dotnet publish ./GlazeWM.Bootstrapper/GlazeWM.Bootstrapper.csproj --configuration=Release --runtime=win-x64 --output=. --self-contained -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true

To build for other runtimes than Windows x64, see here.

Roadmap

  • Improve handling of fullscreen and maximized windows.
  • More bar components.
  • Reload user config without restarting WM.

Configuration

The configuration file for GlazeWM can be found at C:\Users\<YOUR_USER>\.glaze-wm\config.yaml. If this file doesn't exist, it can optionally be generated with some sensible defaults on application launch.

Keybindings

The available keybindings can be customized via the keybindings property in the config file. A keybinding consists of one or more key combinations and one or more commands to run when pressed.

A full list of keys that can be used for keybindings can be found here. Numbers can be used in keybindings with and without a D prefix (eg. either D1 or 1 works).

It's recommended to use the alt key for keybindings. The windows key is unfortunately a pain to remap, since certain keybindings (eg. LWin+L) are reserved by the OS.

keybindings:
  # Command to run.
  - command: "focus workspace 1"

    # Key combination to trigger the keybinding.
    binding: "Alt+1"

  # To run multiple commands in a sequence, use the `commands` property (eg. to move a window to a workspace + focus workspace).
  - commands: ["move to workspace 1", "focus workspace 1"]
    binding: "Alt+Shift+1"

  - command: "focus left"
    # To have multiple key combinations that can trigger a command, use the `bindings` property.
    bindings: ["Alt+H", "Alt+Left"]

Default keybindings

Keybindings with Alt pressed:

Alt key pressed - with keybindings

Keybindings with Alt+Shift pressed:

Alt+shift key pressed - with keybindings

Apart from the Alt+Shift+E binding for exiting GlazeWM, it's also possibly to safely exit via the system tray icon.

Gap configuration

The gaps between windows can be changed via the gaps property in the config file. Inner and outer gaps are set separately.

gaps:
  # Gap between adjacent windows.
  inner_gap: 20

  # Gap between windows and the screen edge.
  outer_gap: 20

Workspaces configuration

Workspaces need to be predefined via the workspaces property in the config file. A workspace is automatically assigned to each monitor on startup.

workspaces:
  # Uniquely identifies the workspace and is used as the label for the workspace in the bar if `display_name` is not provided.
  - name: 1

    # Optional override for the workspace label in the bar. Does not need to be unique.
    display_name: "Work"

Bar configuration

The appearance of the bar can be changed via the bar property in the config file.

bar:
  # Height of the bar in pixels.
  height: 30

  # The position of the bar on the screen. Can be either "top" or "bottom".
  position: "top"

  # Opacity value between 0.0 and 1.0.
  opacity: 1.0

  # Background color of the bar.
  background: "#101010"

  # Default font color. Can be overriden by setting `foreground` in a component's config.
  foreground: "white"

  # Default font family. Can be overriden by setting `font_family` in a component's config.
  font_family: "Segoe UI"

  # Default font size. Can be overriden by setting `font_size` in a component's config.
  font_size: "13"

  # Default font weight. Typically ranges from 100 to 950, where a higher value is thicker. Can
  # be overriden by setting `font_weight` in a component's config.
  font_weight: "400"

  # Horizontal and vertical borders in pixels. Borders are inside the dimensions of the bar and do
  # not affect bar height. See "Shorthand properties" for more info.
  border_width: "0"

  # Color of the border.
  border_color: "blue"

  # Horizontal and vertical spacing between components within the bar and the edges of the bar. See
  # "Shorthand properties" for more info.
  padding: "1 6 1 6"

  # Components to display on the left side of the bar.
  components_left:
    - type: "workspaces"

  # Components to display on the right side of the bar.
  components_right:
    - type: "clock"

Bar component configuration

The appearance of bar components can also be customized. The following properties can change the styling of a component, regardless of the component type.

# Type of component to display. Currently only 2 component types exist:  "workspaces" and "clock".
type: <COMPONENT_TYPE>

# Horizontal and vertical margins. See "Shorthand properties" for more info.
margin: "0 10 0 0"

# Horizontal and vertical padding. See "Shorthand properties" for more info.
padding: "0"

# Opacity value between 0.0 and 1.0.
opacity: 1.0

# Background color of the component.
background: "#101010"

# Font color used within the component.
foreground: "white"

# Font family used within the component.
font_family: "Segoe UI"

# Font size used within the component.
font_size: "13"

# Font weight used within the component. Typically ranges from 100 to 950, where a higher value is
# thicker.
font_weight: "400"

# Horizontal and vertical borders in pixels. Borders are inside the dimensions of the component.
# See "Shorthand properties" for more info.
border_width: "0"

# Color of the border.
border_color: "blue"

Shorthand properties

Properties related to the edges of the bar or a component, like padding, margin, and border_width, use a 1-to-4 value syntax. This is the same convention that's common in CSS.

Using the example of padding:

  • When one value is specified, it applies the same padding to all four sides.
  • When two values are specified, the first padding applies to the top and bottom, the second to the left and right.
  • When three values are specified, the first padding applies to the top, the second to the right and left, the third to the bottom.
  • When four values are specified, the paddings apply to the top, right, bottom, and left in that order (clockwise).

Window rules

Commands can be run when a window is initally launched. This can be used to assign an app to a specific workspace or to always start an app in floating mode.

Multiple matching criteria can be used together to target a window more precisely. Regex syntax can also be used by wrapping the pattern with / (eg. /notepad|chrome/)

window_rules:
  # Command to run. Use `commands` to specify an array of commands to run in sequence.
  - command: "move to workspace 2"

    # Process name to match exactly.
    match_process_name: "chrome"

    # Window title to match exactly.
    match_title: "/.*/"

    # Class name to match exactly.
    match_class_name: "Chrome_WidgetWin_1"

  # To prevent the WM from managing an app, use the "ignore" command.
  - command: "ignore"
    match_process_name: "notepad"

Known issues

Blurry buttons in bar window

An app called "Sonic Studio", which is installed by default on ASUS ROG machines can cause rendering issues with WPF apps. This can be resolved by disabling NahimicService in Windows Services Manager.

About

A tiling window manager for Windows inspired by i3 and Polybar.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%