<- Back to uint23 | GitHub | Screenshots |

sxwm

Minimal, Fast, Configurable Tiling Window Manager.

sxwm logo

Launch Args

-v, --version : Display the version of sxwm
-b, --backup : Use backup keybinds with sxwm

Features

Screenshots

See screenshots at: sxwm-images

Configuration

sxwm is configured via ~/.config/sxwmrc using key : value format.
Changes apply instantly with MOD + r. Lines starting with # are ignored.

General Options:

mod_key                 : super      # Primary modifier (alt/super/ctrl)
gaps                    : 10         # Pixels between windows
border_width            : 1          # Window border thickness
focused_border_colour   : #c0cbff    # Focused window border color
unfocused_border_colour : #555555    # Unfocused window border color
swap_border_colour      : #fff4c0    # Swap selection border color
master_width            : 60         # Master window width percentage
resize_master_amount    : 1          # Master resize increment percent
resize_stack_amount     : 20         # Stack resize increment pixels
snap_distance           : 5          # Floating window snap distance
motion_throttle         : 60         # Mouse drag FPS target
should_float            : "st"       # Always-float window rules
new_win_focus           : true       # Focus new windows
warp_cursor             : true       # Warp cursor to focused windows

Keybinding Syntax:

bind : mod + Return : "st"
bind : mod + shift + q : close_window
workspace : mod + 2 : move 2
workspace : mod + shift + 4 : swap 4

Available Functions:

close_window, decrease_gaps, focus_next, focus_previous, focus_next_mon,
focus_prev_mon, move_next_mon, move_prev_mon, increase_gaps, master_next,
master_prev, quit, reload_config, master_increase, master_decrease,
toggle_floating, global_floating, fullscreen

Keybindings

Window Management:

Mouse                       : Focus under cursor
MOD + Left Mouse            : Move window with mouse
MOD + Right Mouse           : Resize window with mouse
MOD + j / k                 : Focus next / previous
MOD + Shift + j / k         : Move window in master stack
MOD + , / .                 : Focus prev / next monitor
MOD + Shift + , / .         : Move window to prev / next monitor
MOD + h / l                 : Resize master area (decr/incr)
MOD + Ctrl + h / l          : Resize stack area (decr/incr)
MOD + = / -                 : Increase / decrease gaps
MOD + Space                 : Toggle floating
MOD + Shift + Space         : Toggle all floating
MOD + Shift + f             : Toggle fullscreen mode
MOD + Shift + q             : Close focused window
MOD + Shift + e             : Quit sxwm
MOD + r                     : Reload configuration

Workspaces:

MOD + 1-9                   : Switch to workspace 1-9
MOD + Shift + 1-9           : Move window to workspace 1-9

Applications:

MOD + Return                : Open terminal (st)
MOD + b                     : Open browser (firefox)
MOD + p                     : Run launcher (dmenu_run)

Dependencies

Required:

Install Dependencies:

Debian/Ubuntu/Mint:

sudo apt update
sudo apt install libx11-dev libxcursor-dev libxinerama-dev build-essential

Arch Linux/Manjaro:

sudo pacman -Syy
sudo pacman -S libx11 libxinerama gcc make

Fedora/RHEL/AlmaLinux/Rocky:

sudo dnf update
sudo dnf install libX11-devel libXcursor-devel libXinerama-devel gcc make

Void Linux:

sudo xbps-install -S
sudo xbps-install libX11-devel libXinerama-devel gcc make

Alpine Linux:

doas apk update
doas apk add libx11-dev libxinerama-dev gcc make musl-dev

OpenBSD:

doas pkg_add gmake
# Requires X sets: xbase, xfonts, xserv, xshare
# Use gmake instead of make

FreeBSD:

sudo pkg update
sudo pkg install gcc gmake libX11 libXinerama

Build & Install

Arch Linux (AUR):

yay -S sxwm
# OR for latest:
yay -S sxwm-git

Build from Source:

git clone --depth=1 https://github.com/uint23/sxwm.git
cd sxwm/
make
sudo make clean install

Run:

Add to ~/.xinitrc:

exec sxwm

Makefile Targets

make / make all     : Build the sxwm binary
make clean          : Remove build artifacts
make install        : Install sxwm to $(PREFIX)/bin (default /usr/local)
make uninstall      : Remove installed binary
make clean install  : Clean then install

Override install directory:

make install PREFIX=$HOME/.local

Thanks & Inspiration


Abhinav Prasai (C) 2025
Contributions welcome! Please read CONTRIBUTIONS.md for more info.