Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Migrating from i3 to Sway on Arch Linux

Migrating from i3 to Sway on Arch Linux

Refer to the arch wiki:

  1. Install packages: pacman -S sway weston
  2. Copy configuration:
mkdir -p ~/.config/sway
cp ~/.i3/config ~/.config/sway/config
  1. When you log in, start sway:

Most of your settings should work out of the box, but I found that sway shrank everything on my hi dpi screen. Get the output name of your hi dpi monitor with:

swaymsg -t get_outputs

And then add this line to your sway config file, replacing <name> with your monitor's name from the swaymsg command.

output <name> scale 2
  1. Set your desktop background. Feh doesn't work with sway, but there is a directive you can put in your config file which will accomplish the same thing. "*" means to use the background on all monitors, but you can set it to a specific monitor instead.
 output "*" background ~/.backgrounds/packground.jpg fill

i3lock, i3bar, and dmenu all worked out of the box for me. I had no problems using firefox, chromium, and urxvt, although I had to adjust my urxvt font sizes to account for the hidpi scaling. Since there isn't a weston equivalent of .xinitrc I created a little wrapper script for sway which does something similar:

xrdb -merge ~/.xresources

Your i3 environment should continue to work just find after this.

Bugs I've encountered with sway:

  1. Exiting sway with the shortcut from my i3 config doesn't work. Just use pkill sway instead.
  2. Similarly, reloading sway doesn't seem to work either. Again, kill sway and restart it manually will do in a pinch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment