User Tools

Site Tools


Action disabled: revisions

What is it?

sway is a tiling window manager, active project, working on Wayland. Just the right thing to try out for me after using Window Maker, which seems to stay on Xorg forever.

Running Sway on Fedora

  • Setup sway on Fedora - my notes below should include most of that
  • recommends to run sway directly from the TTY. That means to set multi-user target as default target, login there, and run sway from there. One can do that, but I use the minimal display manager sddm here.
# I did a LXDE-desktop installation of Fedora, and then:

dnf -y install sway sddm
systemctl disable lxdm    # or kdm, gdm, lightdm, xdm
systemctl enable sddm


# After this, sddm starts and allows to directly run sway

Configuration and first steps

After you got sway running, it's time to familiarize yourself with the keyboard shortcuts and modify the configuration. The default config can be seen at or in file /etc/sway/config . The config file teaches you all shortcuts you need at this moment.

On my thinkpad, the english keyboard layout was configured by default. The $mod-key is the windows-key, which is on Linux not used anyway. Sway uses that key heavily. For the start, you should use the config suggested by Sway, and can then adapt it to your needs.

Custom config file

The default config is /etc/sway/config. If you want to customize, do this:

mkdir ~/.config/sway
cp /etc/sway/config ~/.config/sway
vi ~/.config/sway

Terminal settings

By default, <modkey>+<return> starts an urxvt256c-ml terminal, my customization:

$ grep term ~/.config/sway/config
set $term /home/chris/bin/
$ cat /home/chris/bin/
xterm -en UTF-8 -fg white -bg black -fn \
  -Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1 +sb -e bash

Alternatively, I try terminal 'terminator' now. The good points over xterm for me:

  • In xterm/wayland/sway, I did not get automatic url-selection to work. So triple-clicking string in xterm did not result in selecting that URL, but the whole line. I had that working with xterm/xorg, but the same configs fail for that purpose on xterm/wayland for me.
  • Increasing/decreasing the font is just great:
    • increasing: <crtl>+<shift>+<=> (makes sense, + is the second function of the =-key)
    • decreasing: <crtl>+<->
$ grep term ~/.config/sway/config
set $term /home/chris/bin/
$ cat /home/chris/bin/

Changing workspace

A workspace in Sway is what I called “virtual screen” in Window Maker. Regarding workspaces, I mostly go with the default config from Sway. I just added one detail: $mod+Left changes to the previous workspace, and $mod+Right to the next workspace. By default, one can with $mod+1 jump to the first workspace, with $mod+2 to the second workspace, and so on. So I added this in ~/.config/sway/config:

    bindsym Ctrl+Left workspace prev
    bindsym Ctrl+Right workspace next
    bindsym Hangul_Hanja+Left workspace prev
    bindsym Hangul_Hanja+Right workspace next

The last 2 lines are for the “right CTRL key” on this keyboard here which I bought in Korea. When running 'xev' and then pressing the key, one sees the identifier for the key, in my case 'Hangul_Hanja'.

Locking the screen

I have a habit of locking the screen when leaving the workplace, by pressing F9. Easy to implement:

# install xlock
dnf -y install xlockmore
# add the config
echo 'bindsym F9 exec /usr/bin/xlock -mode blank' >>~/.config/sway/config
# reload config
press <modkey> + <Shift> + <c>
press F9 for testing

Controlling brightness

On laptops, package `light` should be installed, and this be added to ~/.config/sway/config:

  bindsym $mod+F5 exec light -U 5
  bindsym $mod+F6 exec light -A 5

With this, one can press $mod+F5/F6 to control brightness.

Internal/external screens

Using xrandr is not recommended, but so far the replacements actually look good. I frequently dock/undock my system. When docked, I only want to use an external screen.

# lets look at the names for our outputs
swaymsg -t get_outputs
Output DP-4 'Dell Inc. DELL U2412M RPT5T2372ADL' (focused)
  Current mode: 1920x1200 @ 59.950001 Hz
Output eDP-1 'Unknown 0x21ED 0x00000000'

# In the sway config, I refer to these entries.  So I frequently
# modify the config, then reload with <modkey>+<Shift>+<c>, and 
# have the new setup active.

# in ~/.config/sway/config, for 'docked'config:
output DP-4 enable
output eDP-1 disable

# in ~/.config/sway/config, for all monitors active:
output DP-4 enable
output eDP-1 enable

Custom statusbar

dnf install -y python3-psutil python3-netifaces fontawesome-fonts
cd /opt
git clone git://

# now modify the users ~/.config/sway/config, change
status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
status_command /opt/bumblebee-status/bumblebee-status \
  -m cpu memory sensors2 network_traffic battery time \
  -p sensors2.showtemp=false sensors2.showcpu=false \
     time.format="%H:%M" memory.format="{used}" \
  -t powerline


Japanese input: ibus

I did not get ibus/sway/wayland to run so far :( Apparently its because sway (a wayland window manager) uses a newer version of the wayland input protocol than ibus-wayland supports. Duck-san has details. See also, bugzilla.

dnf -y install ibus ibus-setup ibus-gtk3 ibus-wayland \
  ibus-skk ibus-mozc ibus-kkc ibus-qt
# run ibus-daemon at sway startup
echo 'exec /usr/bin/ibus-daemon --xim --daemonize' \
# set environment variables, i.e. in ~/.bashrc
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=ibus

# then exit sway with <modkey>+<Shift>+<e>
# and start sway again, then

# Once ibus-daemon is running, one is supposed to execute
# ..but this bails out with "No input_method global" currently.

Japanese input: fcitx

This works for me, but there is no fcitx-mozc package.

dnf -y install fcitx fcitx-qt4 fcitx-qt5 fcitx-ui-light \
  fcitx-anthy fcitx-gtk3 fcitx-gtk2 fcitx-table-extra \
  fcitx-table-other fcitx-kkc fcitx-skk fcitx-configtool

# run fcitx at sway startup
echo 'exec fcitx -d' >>~/.config/sway/config

# set environment variables, i.e. in ~/.bashrc
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

# then exit sway with <modkey>+<Shift>+<e>
# and start sway again, then
imsettings-switch fcitx


grim is not yet packaged..

sudo dnf install -y meson cairo-devel.x86_64 libwayland-client.x86_64 \
  wayland-devel.x86_64 wayland-protocols-devel.noarch \
git clone
cd grim
meson build
ninja -C build

# lets take a screenshot
build/grim myscreenshot.jpg

X11 apps forwarding via SSH

Logging into remote systems using i.e. 'ssh -Y rhel8u2b', and having on the remote system for example xauth and xterm installed, I can run xterm remotely and get it forwarded. $DISPLAY in the session is set to “localhost:10.0”.

Bluejeans, Google meet etc. screen share

Sharing the full screen works on Firefox and Google chrome, for example on Fedora34. On Chromium, it has to be enabled apparently.

  • open chrome://flags/#enable-webrtc-pipewire-capturer in Chromium
  • see also related blogposts from Jan, link

Hanging menu

I have experienced hanging menus: so after pressing $mod + D, the menu for running applications stays and can not be removed. In that case, “killall dmenu” removed the menu, and $mod + Shift + c can reload the normal top bar.

Additional software

My reminder for additional software. All from Fedora or rpmfusion repos.

  • firefox, google-chrome
  • evince - pdf viewer
  • mplayer, qiv - video, picture viewer


  • I did not get ibus to run..
software/sway.txt · Last modified: 2021/09/15 08:48 by chris