Skip to content

Instantly share code, notes, and snippets.

@iankronquist
Created October 20, 2017 18:16
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iankronquist/f2a5b73ea185e8578d3ed18608a22dda to your computer and use it in GitHub Desktop.
Save iankronquist/f2a5b73ea185e8578d3ed18608a22dda to your computer and use it in GitHub Desktop.
Migrating from i3 to Sway on Arch Linux

Migrating from i3 to Sway on Arch Linux

Refer to the arch wiki: https://wiki.archlinux.org/index.php/Sway

  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:
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:

#!/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:

  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