Refer to the arch wiki: https://wiki.archlinux.org/index.php/Sway
- Install packages:
pacman -S sway weston
- Copy configuration:
mkdir -p ~/.config/sway
cp ~/.i3/config ~/.config/sway/config
- When you log in, start sway:
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
- 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:
#!/bin/bash
# startsway.sh
xrdb -merge ~/.xresources
sway
Your i3 environment should continue to work just find after this.
Bugs I've encountered with sway:
- Exiting sway with the shortcut from my i3 config doesn't work. Just use
pkill sway
instead. - Similarly, reloading sway doesn't seem to work either. Again, kill sway and restart it manually will do in a pinch.