qtile is a full-featured, hackable tiling window manager written in Python.
Application Launch
- Mod+Return - Launch terminal
- Mod+P - Application launcher (rofi/dmenu)
- Mod+Shift+P - Application launcher (alternative)
Window Management
- Mod+W - Close focused window
- Mod+Shift+C - Close window (alternative)
- Mod+F - Toggle fullscreen
- Mod+Shift+F - Toggle floating
- Mod+M - Minimize window
- Mod+Shift+M - Restore minimized window
Window Navigation
- Mod+J or Mod+↓ - Focus down
- Mod+K or Mod+↑ - Focus up
- Mod+H or Mod+← - Focus left
- Mod+L or Mod+→ - Focus right
- Mod+Space - Switch focus between panes (stack layout)
- Mod+Tab - Switch to next window
- Mod+Shift+Tab - Switch to previous window
Window Movement
- Mod+Shift+J or Mod+Shift+↓ - Move window down
- Mod+Shift+K or Mod+Shift+↑ - Move window up
- Mod+Shift+H or Mod+Shift+← - Move window left
- Mod+Shift+L or Mod+Shift+→ - Move window right
- Mod+Shift+Space - Swap window with master
Window Resizing
- Mod+Ctrl+H or Mod+Ctrl+← - Grow window left
- Mod+Ctrl+L or Mod+Ctrl+→ - Grow window right
- Mod+Ctrl+J or Mod+Ctrl+↓ - Grow window down
- Mod+Ctrl+K or Mod+Ctrl+↑ - Grow window up
- Mod+Shift+Equal - Reset window sizes
Layouts
- Mod+Tab - Switch to next layout
- Mod+Shift+Tab - Switch to previous layout
- Mod+Space - Switch focus (stack layout)
- Mod+Shift+Space - Swap window with master
Groups (Workspaces)
- Mod+1-9 - Switch to group
- Mod+Shift+1-9 - Move window to group
- Mod+G - Switch to next group
- Mod+Shift+G - Switch to previous group
System
- Mod+Ctrl+R - Reload qtile config
- Mod+Ctrl+Q - Restart qtile
- Mod+Shift+Q - Shutdown qtile
- Mod+Shift+R - Restart qtile (alternative)
Configuration
Config File Location
- ~/.config/qtile/config.py (user config)
- Default config in libqtile/resources/default_config.py
Example Key Bindings
Customize in config.py:
from libqtile.config import Key
from libqtile.lazy import lazy
mod = "mod4" # Super/Windows key
keys = [
# Application launch
Key([mod], "Return", lazy.spawn("kitty"), desc="Launch terminal"),
Key([mod], "p", lazy.spawn("rofi -show drun"), desc="Application launcher"),
# Window navigation
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
Key([mod], "h", lazy.layout.left(), desc="Move focus left"),
Key([mod], "l", lazy.layout.right(), desc="Move focus right"),
# Window movement
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window left"),
Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window right"),
# Window management
Key([mod], "w", lazy.window.kill(), desc="Close window"),
Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen"),
Key([mod, "shift"], "f", lazy.window.toggle_floating(), desc="Toggle floating"),
# Layouts
Key([mod], "Tab", lazy.next_layout(), desc="Switch layouts"),
Key([mod], "space", lazy.layout.next(), desc="Switch focus"),
# Groups
Key([mod], "1", lazy.group["1"].toscreen(), desc="Switch to group 1"),
Key([mod, "shift"], "1", lazy.window.togroup("1"), desc="Move window to group 1"),
# System
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload config"),
Key([mod, "control"], "q", lazy.restart(), desc="Restart qtile"),
Key([mod, "shift"], "q", lazy.shutdown(), desc="Shutdown qtile"),
]
Change Modifier Key
mod = "mod4" # Super/Windows key
# or
mod = "mod1" # Alt key
Tips
- Config is Python - full programming language available
- Use KeyChord for binding sequences/modes
- Supports groups (workspaces) and moving windows between them
- Layouts, widgets, and screen settings all in Python config
- Default layout switching and focus commands use hjkl
- Use lazy.call() for custom functions
- Supports multiple screens/monitors
- Widgets configurable via Python
- Use EzKey helper for simpler key definitions