Getting Started
Getting Started
SamWM is for people who want full control without the noise. its configured entirely in Lua so no DSL to learn, no magic defaults to fight. Install it, write your config, create your plugin, and it stays out of your way.
Installation
From Source
git clone https://github.com/samouly/samwm.git
cd samwm
nix-shell --run "make build"
sudo make installFirst Launch
SamWM needs a config file. Generate a default one:
make setup-configThis creates ~/.config/samwm/config.lua with sensible defaults.
Then start from a TTY:
WAYLAND_DISPLAY=wayland-0 samwmConfig Basics
Your config is ~/.config/samwm/config.lua. Here’s the minimal setup:
-- General settings
samwm.general({
border_size = 2,
gaps_inner = 5,
gaps_outer = 10,
})
-- Default layout
samwm.layout({
default = "master-stack",
})
-- Keybindings
samwm.bind("SUPER", "Return", "exec alacritty", "Terminal")
samwm.bind("SUPER", "Q", "close", "Close window")
samwm.bind("SUPER", "1", "workspace 1", "Workspace 1")Keybindings
| Binding | Action |
|---|---|
SUPER + Return |
Open terminal |
SUPER + Q |
Close window |
SUPER + J/K |
Focus next/prev window |
SUPER + F |
Toggle fullscreen |
SUPER + Space |
Toggle floating |
SUPER + 1-5 |
Switch workspace |
SUPER + M |
Exit SamWM |
Workspaces
SamWM has 10 workspaces. Switch with SUPER + 1-0. Move windows with SUPER + SHIFT + 1-0.