Linux

Where Is the Sway Config File?

Sway's config search order, the suggested ~/.config path, and the system default to copy from.

Last updated

Sway checks six locations in order and uses the first config it finds, starting with ~/.sway/config and the suggested $XDG_CONFIG_HOME/sway/config. It even falls back to i3 paths, which helps when migrating but confuses when both exist.

The practical move is to copy the shipped default from /etc/sway/config into ~/.config/sway/config and edit the copy. That keeps your changes clear of package updates.

Where Sway stores this, by platform

Linux
~/.config/sway/config

Suggested location when XDG_CONFIG_HOME is unset. Full order: ~/.sway/config, $XDG_CONFIG_HOME/sway/config, ~/.i3/config, $XDG_CONFIG_HOME/i3/config, /etc/sway/config, /etc/i3/config. Test edits with sway -C -c path.

Frequently asked questions

Why is Sway ignoring my config changes?

It found an earlier file in the search order, often ~/.sway/config or an old i3 config. Check which path wins and consolidate to ~/.config/sway/config.

Where is the default Sway config to start from?

Usually /etc/sway/config. Copy it with mkdir -p ~/.config/sway and cp /etc/sway/config ~/.config/sway/config, then edit the copy.

Notice an outdated path? Let us know.