Stable

gar

Tiling Window Manager

An event-driven X11 tiling window manager with a binary tree layout engine. gar gives you full control over your windows with intuitive keyboard-driven navigation, powerful Lua configuration, and deep integration with the gardesk ecosystem.

Features

  • Binary space partition (BSP) tree layout with smart splits
  • Full Lua 5.4 scripting for configuration
  • Multi-monitor support with per-monitor workspaces
  • EWMH compliant for compatibility with bars and tools
  • i3-compatible IPC for polybar and other tools
  • Unix socket IPC for runtime control via garctl
  • Customizable gaps, borders, and gradient colors
  • Window rules for automatic placement and floating
  • Click-to-focus with keyboard navigation
  • Mouse drag for moving/resizing floating windows
  • Compositor support: picom, garchomp, or none
  • Auto-spawn garnotify and garbar from Lua config
  • Session management with systemd integration

Quick Start Guide

Get up and running with gar in just a few steps. This guide covers installation, basic configuration, and essential keybindings.

1. Installation

Install gar using the unified installer or build from source:

terminal
$ curl -fsSL https://gar.musicsian.com/install.sh | bash -s -- --component=gar # Install via script
$ cd ~/.local/src/gardesk/gar && cargo build --release # Or build from source

2. First Launch

Start gar from your display manager or directly from a TTY:

terminal
$ startx /usr/local/share/gar/gar-session.sh # Start from TTY
$ Xephyr :1 -screen 1920x1080 & DISPLAY=:1 gar # Test in nested X

Or select "gar" from your display manager's session menu.

3. Essential Keybindings

The default configuration uses Super (Windows key) as the modifier:

Keybinding Action
Mod + ReturnOpen terminal
Mod + qClose focused window
Mod + h/j/k/lFocus left/down/up/right
Mod + Shift + h/j/k/lSwap window in direction
Mod + Ctrl + h/j/k/lResize split in direction
Mod + 1-9, 0Switch to workspace 1-10
Mod + Shift + 1-9, 0Move window to workspace
Mod + fToggle floating
Mod + Shift + fToggle fullscreen
Mod + eEqualize all splits
Mod + Shift + rReload configuration
Mod + Shift + EscapeExit gar

4. Configuration File

Edit your config at ~/.config/gar/init.lua. Changes apply after reload (Mod + Shift + r).

terminal
$ mkdir -p ~/.config/gar # Create config directory
$ $EDITOR ~/.config/gar/init.lua # Edit configuration

5. Control with garctl

Use garctl to control gar from scripts or the command line:

terminal
$ garctl workspace 3 # Switch to workspace 3
$ garctl focus left # Focus window to the left
$ garctl reload # Reload configuration
$ garctl get_workspaces # Query workspace info (JSON)
Releases