Sway
Sway is a tiling Wayland compositor compatible with i3: windows are arranged side by side or stacked, and can be split, tabbed or floating.
| Login screen | none, Sway starts on login on tty1 |
| Terminal | foot |
| Bar | Waybar |
| Launchers | wmenu, fuzzel |
| Notifications | SwayNotificationCenter |
| Lock screen | swaylock, with Super + T or after 5 minutes idle; screen off after 10 |
| Browser | Firefox |
Where to change things
| What | File |
|---|---|
| keys, programs started with the session, keyboard, outputs, wallpaper | ~/.config/sway/config |
| the bar | ~/.config/waybar/config and style.css |
| notifications | ~/.config/swaync/ |
| fuzzel launcher | ~/.config/fuzzel/fuzzel.ini |
| lock screen | ~/.config/swaylock/config |
| colours | include catppuccin-mocha in config; catppuccin-frappe, -latte and -macchiato are next to it |
After editing config, reload it with Super + Shift + C. The originals are
in /etc/skel/.config/.
Programs started with the session are the exec lines in config:
PipeWire, wlsunset, udiskie, the polkit agent, swaync, Waybar and swayidle.
Keys
Super is the modifier ($mod).
| Keys | Action |
|---|---|
| Super + Return | terminal (foot) |
| Super + D | wmenu (run a command) |
| Super + P | fuzzel (application launcher) |
| Super + T | lock screen |
| Super + X | power menu |
| Super + G / Print | screenshot of the whole screen (grim) |
| Super + Shift + Q | close window |
| Super + Shift + C | reload the configuration |
| Super + Shift + E | exit Sway (asks first) |
| Super + 1 … 0 | go to workspace 1 … 10 |
| Super + Shift + 1 … 0 | move window to workspace |
| Super + H/J/K/L or arrows | focus left / down / up / right |
| Super + Shift + H/J/K/L or arrows | move window |
| Super + B / Super + V | split horizontally / vertically |
| Super + S / W / E | stacked / tabbed / toggle split layout |
| Super + F | full screen |
| Super + Shift + Space | toggle floating |
| Super + Space | switch focus between tiling and floating windows |
| Super + A | focus the parent container |
| Super + Shift + − / Super + − | move window to the scratchpad / show it |
| Super + R | resize mode (H/J/K/L or arrows, Return or Escape to leave) |
| Super + drag | move a window; with the right button, resize it |
Volume, microphone and brightness keys work, also on the lock screen.
The configuration also binds Super + N (nwggrid), Super + O (d77run) and
Super + Y (wswap-way, change wallpaper), but none of these programs is in
the image, so these keys do nothing.
The bar
Waybar shows, from left to right: workspaces, the focused window and the playing media; the weather and the clock; volume (click: pavucontrol), network, CPU, memory, temperature, battery, brightness, Num Lock, the tray and a power button (click: power menu).
Idle
After 5 minutes without input the screen locks (swaylock), after 10 it turns
off and comes back on with any input, and it always locks before the
computer suspends. This is the exec swayidle line in config.
Keyboard layout
In config:
input type:keyboard {
xkb_layout "pt"
xkb_variant ""
}
Wallpaper
output * bg ~/.config/backgrounds/d77.png fill
Change the path to another image and reload with Super + Shift + C.