Sway
Sway is a reimagining of i3wm (X11), rewritten for Wayland. Sway (like i3wm) is a keyboard centric tiling window manager. Although not a source fork of i3wm, the configuration and user interface of Sway is almost identical to that of i3wm.
Sway Config
The Fedora Atomic Sway edition includes a default configuration for Sway. It’s pretty nice out of the box, and so if you like it, you can just use it. However, I use my own custom configuration that I replace it with, and you can do the same if you like.
Open the default terminal emulator (foot) with the keyboard shortcut:
Win+Enter
(hold down the “Windows” key on your keyboard, then
simultaneously press Enter.)
My custom config replaces several of the default configuration files.
So you must first get rid of these files, by renaming them with the
suffix .orig
for posterity:
mv ~/.config ~/.config.orig
mv ~/.bashrc ~/.bashrc.orig
mv ~/.bash_profile ~/.bash_profile.orig
Next, install my customized sway config repository :
git clone https://github.com/enigmacurry/sway-home \
~/git/vendor/enigmacurry/sway-home
Run the included setup script:
cd ~/git/vendor/enigmacurry/sway-home
./setup.sh
The setup.sh
script will make symlinks to the repository files from
the same original paths as the files you just moved. It also asks you
some questions to help setup your git profile.
Once you have finished entering the information setup asks for, press
Win+Shift+E
, and choose Log Out. Log back in, and this will load the
new config files.
Setup display resolutions and orientation
Fedora Sway Atomic ships with kanshi for display setup. Kanshi does not include any GUI for setting it up, so another program called wdisplays is useful.
You can configure all of your displays using the wdisplays GUI program, however, the configuration will not persist across login sessions. So what you need to do is set it up how you like it, and then transfer that information into the Kanshi config file so that it sets it up the same way everytime you login.
For example, on my test system I have two display port monitors, with
outputs named DP-3
and DP-4
. These are shown in wdisplays and I
have set up the size, position, and DPI scaling exactly how I like it:
DP-3:
DP-4:
Open the Kanshi config file ~/.config/kanshi/config
and copy the
information into the config file:
profile {
output DP-3 enable mode 2560x1440 position 3840,0 scale 1 transform normal
output DP-4 enable mode 3840x2160 position 1920,360 scale 2 transform normal
}
Check out man 5 kanshi
for more config options. Kanshi is
automatically started when sway is, so you can test it by logging out
and logging back in.