Try a Tiling Window Manager (i3 or sway)
Install i3 or sway, understand tiling layouts and config syntax, add a status bar, and keep the useful parts of your old desktop environment.
Before you start
- ▸A working Linux install with a display manager or ability to start X/Wayland from TTY
- ▸Basic familiarity with editing text config files in a terminal
- ▸For sway: GPU with working Wayland support (Intel, AMD, or NVIDIA 525+ with caveats)
Tiling window managers eliminate the mouse-drag overhead of floating windows by arranging every application into a non-overlapping grid automatically. i3 targets X11; sway is its near-identical Wayland replacement. Both use the same config syntax and keyboard-driven philosophy, so learning one transfers directly to the other. This guide gets you running on either, explains the config structure, sets up a status bar, and shows you how to carry the useful parts of your existing desktop environment with you.
i3 vs Sway: Pick One
The decision is mostly about your display server:
- i3 — X11 only. Works everywhere, including older hardware, NVIDIA proprietary drivers (which had poor Wayland support until recently), and remote X forwarding setups.
- sway — Wayland only. Better HiDPI, per-monitor scaling, screen recording with PipeWire, and modern input handling. If your GPU and drivers support Wayland reliably, prefer sway.
Both use ~/.config/i3/config or ~/.config/sway/config respectively. The syntax is almost line-for-line compatible; differences are noted where they arise.
Installation
Debian / Ubuntu
# i3
sudo apt install i3 i3status dmenu
# sway
sudo apt install sway swaybar swaybg swaylock waybar dmenu
Fedora / RHEL / Rocky
# i3
sudo dnf install i3 i3status dmenu
# sway
sudo dnf install sway waybar swaylock swayidle dmenu-wl
Arch
# i3
sudo pacman -S i3-wm i3status dmenu
# sway
sudo pacman -S sway waybar swaylock swayidle dmenu
On Arch, i3-wm is the window manager alone. The i3 group also pulls in i3bar, i3lock, and i3status — install the group if you want them together.
First Login
If you use a display manager (GDM, SDDM, LightDM), select i3 or sway from the session menu before logging in. The session files are installed automatically by the packages above.
If you start X manually, add this to ~/.xinitrc:
exec i3
For sway without a display manager, add to your shell's login profile (~/.bash_profile or ~/.zprofile):
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec sway
On first launch i3 offers a config wizard — accept it to generate ~/.config/i3/config. Sway ships a working default at /etc/sway/config; copy it to your home directory before editing:
mkdir -p ~/.config/sway
cp /etc/sway/config ~/.config/sway/config
Understanding the Config Structure
Open ~/.config/i3/config (or the sway equivalent). The most important concepts:
The Modifier Key
set $mod Mod4
Mod4 is the Super/Windows key. Change to Mod1 for Alt. Every binding prefixes with $mod.
Launching Applications
# Open a terminal
bindsym $mod+Return exec alacritty
# Application launcher (dmenu)
bindsym $mod+d exec --no-startup-id dmenu_run
Replace alacritty with your terminal of choice (foot is a good Wayland-native option for sway).
Layout Modes
# Toggle split direction
bindsym $mod+h split h
bindsym $mod+v split v
# Switch to tabbed layout
bindsym $mod+w layout tabbed
# Stacked layout
bindsym $mod+s layout stacking
# Back to tiling
bindsym $mod+e layout toggle split
Workspaces
set $ws1 "1"
set $ws2 "2"
bindsym $mod+1 workspace number $ws1
bindsym $mod+shift+1 move container to workspace number $ws1
Add as many workspaces as you need. Name them with strings like "1:web" to display labels in the bar.
Assigning Apps to Workspaces
Use assign to pin apps. Find the class name with xprop (i3) or swaymsg -t get_tree (sway):
# i3 — run this, then click the window
xprop | grep WM_CLASS
# sway
swaymsg -t get_tree | grep app_id
# In config
assign [class="firefox"] $ws2
assign [app_id="org.gnome.Nautilus"] $ws3 # sway uses app_id
Setting Up a Status Bar
i3bar with i3status (simple, built-in)
i3 ships with a bar block in the default config:
bar {
status_command i3status
position top
}
Customize ~/.config/i3status/config (copy from /etc/i3status.conf if missing) to show CPU, battery, network, and time widgets.
Waybar (sway, feature-rich)
Waybar is the de-facto standard bar for sway. Generate its default config:
mkdir -p ~/.config/waybar
cp /etc/xdg/waybar/config ~/.config/waybar/config
cp /etc/xdg/waybar/style.css ~/.config/waybar/style.css
Then reference it in ~/.config/sway/config:
bar {
swaybar_command waybar
}
Waybar is JSON-configured and CSS-styled — edit config to add or remove modules, and tweak style.css for colors and fonts.
Keeping the Useful Parts of Your Desktop
Dropping a full DE does not mean losing everything. Most components run fine as standalone services:
Notification Daemon
# Install dunst (works on both X11 and Wayland)
sudo apt install dunst # or dnf / pacman equivalent
# Add to config
exec --no-startup-id dunst
Network Manager Applet
exec --no-startup-id nm-applet
On sway, use nm-applet --indicator for proper Wayland tray support.
Polkit Authentication Agent
Many GUI apps need a polkit agent running or they fail silently on privilege requests:
# GNOME polkit — works headlessly
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
Wallpaper
# i3 — feh
sudo apt install feh
exec --no-startup-id feh --bg-scale ~/Pictures/wallpaper.jpg
# sway — built-in
output * bg ~/Pictures/wallpaper.jpg fill
Screen Locking
# i3
bindsym $mod+l exec i3lock -c 000000
# sway
bindsym $mod+l exec swaylock -c 000000
Compositor (i3 only — for transparency/blur)
sudo apt install picom
exec --no-startup-id picom --daemon
Sway is a Wayland compositor itself; no separate compositor is needed or usable.
Reloading and Restarting
# Reload config without restarting (i3 and sway)
$mod+Shift+c
# Restart in-place (i3 only — preserves layout)
$mod+Shift+r
# Exit
$mod+Shift+e
Verification
After your first real session, confirm things are healthy:
# i3 — check the log for errors
journalctl --user -u i3 --since today
# sway
journalctl --user -u sway --since today
# sway — inspect running state
swaymsg -t get_outputs
swaymsg -t get_workspaces
A clean log with no ERROR lines and correct output resolution means your config is loading properly.
Troubleshooting
Screen stays black on sway with NVIDIA
NVIDIA's proprietary driver requires extra environment flags. Add to your sway launch profile:
export WLR_NO_HARDWARE_CURSORS=1
export LIBVA_DRIVER_NAME=nvidia
exec sway --unsupported-gpu
This is tested on driver versions 525+. Earlier versions are genuinely unreliable on Wayland — i3 may be the better choice.
Apps appear blurry on HiDPI (sway)
# In sway config — scale your output
output eDP-1 scale 2
# Force XWayland apps to respect scaling
exec --no-startup-id xrdb -merge <<<'Xft.dpi: 192'
dmenu does not appear on sway
Plain dmenu is an X11 app and runs via XWayland. It works but may feel sluggish. Replace it with bemenu or wofi for native Wayland:
sudo apt install wofi
bindsym $mod+d exec wofi --show run
i3 config parses but keybindings do nothing
Run i3 --moreversion and check for syntax errors. A typo anywhere in the config file can silently disable bindings that come after it. Use i3 -C to validate without restarting:
i3 -C
# Output: "Configuration file validation successful" if cleanFrequently asked questions
- Can I run i3 and sway on the same machine and switch between them?
- Yes. Both install independent session files so you can pick either at your display manager login screen. They share nearly identical config syntax, but keep separate config files at ~/.config/i3/config and ~/.config/sway/config.
- Will GTK and Qt applications look right without a full desktop environment?
- They will work but may use a plain theme. Set GTK_THEME in your config with 'exec_always --no-startup-id gsettings set org.gnome.desktop.interface gtk-theme Adwaita' and install qt5ct or qt6ct for Qt theming.
- How do I make a window float instead of tile?
- Press $mod+Shift+Space to toggle a window between tiling and floating. To make specific apps always float, add 'for_window [class="Pavucontrol"] floating enable' (i3) or the app_id equivalent (sway) to your config.
- Is there a way to save and restore my layout after reboot?
- i3 has a built-in layout saving mechanism: use 'i3-save-tree' to export a workspace layout to JSON, then script the restoration with 'append_layout'. Sway does not yet have native layout persistence, but scripts using swaymsg can approximate it.
- What is the difference between i3status, i3blocks, and Waybar?
- i3status is a simple C binary that outputs a line of text to i3bar — low overhead, minimal config. i3blocks is a more flexible replacement that runs scripts per block. Waybar is a full Wayland bar written in C++ with GTK3, JSON config, CSS styling, and built-in modules for nearly everything.
Related guides
Linux Clipboards Explained (+ Clipboard Managers)
Learn the difference between Linux's PRIMARY and CLIPBOARD selections, use xclip, xsel, and wl-clipboard from the terminal, and manage history with GPaste or Klipper.
Configure LibreOffice for Daily Use
Configure LibreOffice for daily use: set default save formats for MS Office interop, tune autosave, install fonts, and add productivity extensions.
Configure the Touchpad and Multitouch Gestures
Configure Linux touchpad behavior and multitouch gestures using libinput, libinput-gestures, and native GNOME and KDE Plasma settings on both Wayland and X11.
Wayland vs X11: How to Choose and Configure Each
Know when to run Wayland or X11, how to check your current session, switch at login with GDM/SDDM/LightDM, and handle NVIDIA and XWayland edge cases.