FreeBSD.software
Home/Guides/Sway on FreeBSD: Wayland Tiling Window Manager Review
review·2026-04-09·11 min read

Sway on FreeBSD: Wayland Tiling Window Manager Review

Review of Sway on FreeBSD: i3-compatible Wayland compositor, installation, configuration, status bar, screen sharing, and comparison with i3 and Hyprland.

Sway on FreeBSD: Wayland Tiling Window Manager Review

Sway is the most mature Wayland tiling compositor available on FreeBSD. It is a drop-in replacement for i3, using the same configuration format and keybinding system, but running natively on Wayland instead of X11. For FreeBSD users who want a tiling window manager without the baggage of X11, Sway is the safest choice in 2026.

This review covers installation, configuration, practical daily use, and honest assessment of what works and what still has rough edges on FreeBSD. For a broader comparison of desktop environments, see our guide to the best desktop environments for FreeBSD.

Why Sway

Sway was created by Drew DeVault as a faithful Wayland implementation of i3. The key points:

  • i3-compatible configuration: If you have an i3 config, it works in Sway with minimal changes.
  • wlroots-based: Built on the wlroots library, which provides a solid Wayland compositor foundation.
  • Stable: Sway follows a conservative release cycle. Breaking changes are rare.
  • No animations: Sway is deliberately utilitarian. Windows appear and disappear instantly. If you want eye candy, look at Hyprland.
  • Well-tested on FreeBSD: Sway has been in the FreeBSD ports tree for years and is one of the best-supported Wayland compositors on the platform.

Prerequisites

GPU Drivers

Sway requires kernel modesetting (KMS) graphics drivers. The proprietary Nvidia driver does not work.

sh
# Intel GPU pkg install drm-kmod sysrc kld_list+="i915kms" kldload i915kms # AMD GPU pkg install drm-kmod sysrc kld_list+="amdgpu" kldload amdgpu

Seat Management

Sway needs seatd for seat management (accessing input devices and GPU without root):

sh
pkg install seatd sysrc seatd_enable="YES" service seatd start # Add your user to required groups pw groupmod video -m yourusername pw groupmod _seatd -m yourusername

Log out and back in for group changes to take effect.

Installation

sh
# Install Sway and essential companions pkg install sway # The compositor pkg install swaylock # Screen locker pkg install swayidle # Idle management pkg install swaybg # Wallpaper pkg install waybar # Status bar (or swaybar, included with sway) pkg install wofi # Application launcher (Wayland-native) pkg install foot # Terminal emulator pkg install mako # Notification daemon pkg install grim slurp # Screenshot tools pkg install wl-clipboard # Clipboard utilities (wl-copy, wl-paste)

Verify the installation:

sh
sway --version

Launching Sway

Start Sway from a TTY:

sh
# Set XDG runtime directory export XDG_RUNTIME_DIR=/tmp/$(whoami)-runtime mkdir -p $XDG_RUNTIME_DIR # Launch sway

For automatic startup on login, add to ~/.profile or ~/.zprofile:

sh
if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/ttyv0" ]; then export XDG_RUNTIME_DIR=/tmp/$(whoami)-runtime mkdir -p $XDG_RUNTIME_DIR exec sway fi

Configuration

Sway reads its configuration from ~/.config/sway/config. If you have an existing i3 config, copy it:

sh
mkdir -p ~/.config/sway cp ~/.config/i3/config ~/.config/sway/config

Most i3 directives work unchanged. The main differences:

  • input and output blocks replace xrandr commands
  • bar configuration can use swaybar or waybar
  • X11-specific tools (e.g., xclip, scrot, dmenu) need Wayland replacements

Basic Configuration

sh
# ~/.config/sway/config # Mod key set $mod Mod4 # Terminal set $term foot # Application launcher set $menu wofi --show drun # Font font pango:monospace 10 # Window borders default_border pixel 2 default_floating_border pixel 2 gaps inner 4 gaps outer 4 # Colors client.focused #4c7899 #285577 #ffffff #2e9ef4 #285577 client.unfocused #333333 #222222 #888888 #292d2e #222222 client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a # Keybindings bindsym $mod+Return exec $term bindsym $mod+d exec $menu bindsym $mod+q kill bindsym $mod+Shift+e exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit' bindsym $mod+Shift+c reload # Focus bindsym $mod+h focus left bindsym $mod+j focus down bindsym $mod+k focus up bindsym $mod+l focus right # Move windows bindsym $mod+Shift+h move left bindsym $mod+Shift+j move down bindsym $mod+Shift+k move up bindsym $mod+Shift+l move right # Workspaces bindsym $mod+1 workspace number 1 bindsym $mod+2 workspace number 2 bindsym $mod+3 workspace number 3 bindsym $mod+4 workspace number 4 bindsym $mod+5 workspace number 5 bindsym $mod+6 workspace number 6 bindsym $mod+7 workspace number 7 bindsym $mod+8 workspace number 8 bindsym $mod+9 workspace number 9 # Move to workspace bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+2 move container to workspace number 2 bindsym $mod+Shift+3 move container to workspace number 3 bindsym $mod+Shift+4 move container to workspace number 4 bindsym $mod+Shift+5 move container to workspace number 5 # Layout bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split bindsym $mod+f fullscreen toggle bindsym $mod+Shift+space floating toggle bindsym $mod+space focus mode_toggle # Resize mode mode "resize" { bindsym h resize shrink width 10px bindsym j resize grow height 10px bindsym k resize shrink height 10px bindsym l resize grow width 10px bindsym Escape mode "default" } bindsym $mod+r mode "resize" # Scratchpad bindsym $mod+Shift+minus move scratchpad bindsym $mod+minus scratchpad show

Monitor Configuration

sh
# List outputs swaymsg -t get_outputs # Configure in sway config output DP-1 resolution 2560x1440@144Hz position 0 0 output HDMI-A-1 resolution 1920x1080@60Hz position 2560 0 # Set wallpaper output * bg ~/wallpaper.jpg fill

Input Configuration

sh
# List input devices swaymsg -t get_inputs # Keyboard layout input type:keyboard { xkb_layout us xkb_options caps:escape repeat_delay 300 repeat_rate 50 } # Touchpad input type:touchpad { tap enabled natural_scroll enabled dwt enabled } # Mouse input type:pointer { accel_profile flat pointer_accel 0 }

Status Bar

Sway ships with swaybar, but most users prefer waybar for its flexibility:

sh
# Using built-in swaybar with i3status bar { position top status_command i3status }

Or use waybar:

sh
# Replace the bar block with: bar { swaybar_command waybar }

Create ~/.config/waybar/config:

sh
mkdir -p ~/.config/waybar cat > ~/.config/waybar/config << 'CONF' { "layer": "top", "position": "top", "height": 28, "modules-left": ["sway/workspaces", "sway/mode"], "modules-center": ["sway/window"], "modules-right": ["cpu", "memory", "disk", "network", "clock"], "clock": { "format": "{:%a %d %b %H:%M}", "tooltip-format": "{:%Y-%m-%d}" }, "cpu": { "format": "CPU {usage}%", "interval": 5 }, "memory": { "format": "RAM {percentage}%", "interval": 5 }, "disk": { "format": "DISK {percentage_used}%", "path": "/" }, "network": { "format-wifi": "WIFI {signalStrength}%", "format-ethernet": "ETH {ifname}", "format-disconnected": "OFFLINE" } } CONF

Screen Locking and Idle

sh
# Autostart idle management exec swayidle -w \ timeout 300 'swaylock -f -c 000000' \ timeout 600 'swaymsg "output * power off"' \ resume 'swaymsg "output * power on"' \ before-sleep 'swaylock -f -c 000000' # Manual lock keybinding bindsym $mod+Shift+x exec swaylock -f -c 000000

Screenshots

sh
# Full screen screenshot bindsym Print exec grim ~/screenshots/$(date +%Y%m%d_%H%M%S).png # Select region bindsym Shift+Print exec grim -g "$(slurp)" ~/screenshots/$(date +%Y%m%d_%H%M%S).png # Copy screenshot to clipboard bindsym $mod+Print exec grim - | wl-copy # Select region to clipboard bindsym $mod+Shift+Print exec grim -g "$(slurp)" - | wl-copy

Create the screenshots directory:

sh
mkdir -p ~/screenshots

Clipboard Management

sh
# Install clipboard manager pkg install wl-clipboard # Copy text echo "hello" | wl-copy # Paste wl-paste # Copy an image wl-copy < image.png # Clear clipboard wl-copy --clear

For clipboard history, use clipman:

sh
pkg install clipman # Add to sway config for clipboard history exec wl-paste -t text --watch clipman store bindsym $mod+v exec clipman pick --tool=wofi

Screen Sharing

Screen sharing on FreeBSD under Wayland requires PipeWire and xdg-desktop-portal:

sh
pkg install pipewire xdg-desktop-portal-wlr # Start PipeWire (add to sway config for auto-start) exec pipewire exec pipewire-pulse

Screen sharing in Firefox requires MOZ_ENABLE_WAYLAND=1 and the WebRTC PipeWire backend:

sh
# Add to sway config or ~/.profile exec dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus

Honest assessment: screen sharing on FreeBSD under Wayland works for basic use cases but is less reliable than on Linux. If screen sharing in video calls is critical to your workflow, consider running Firefox under X11 (with XWayland) or using a dedicated Linux VM for calls.

XWayland

XWayland provides backward compatibility with X11 applications:

sh
pkg install xwayland

Sway runs XWayland automatically by default. To disable it:

sh
# In sway config xwayland disable

Check if a running window is using XWayland:

sh
swaymsg -t get_tree | grep -i xwayland

Environment Variables

Set these in your ~/.profile or in the sway config with exec:

sh
# Wayland-specific export MOZ_ENABLE_WAYLAND=1 # Firefox native Wayland export QT_QPA_PLATFORM=wayland # Qt apps use Wayland export SDL_VIDEODRIVER=wayland # SDL2 games use Wayland export _JAVA_AWT_WM_NONREPARENTING=1 # Fix Java GUI apps export XDG_CURRENT_DESKTOP=sway export XDG_SESSION_TYPE=wayland

Sway vs i3 on FreeBSD

If you are deciding between staying on X11 with i3 or moving to Sway:

| Aspect | Sway (Wayland) | i3 (X11) |

|--------|---------------|-----------|

| Configuration | Same format | Same format |

| Display protocol | Wayland | X11 |

| Screen tearing | None (by design) | Requires compositor |

| HiDPI | Excellent | Mediocre |

| Screen sharing | Partial (PipeWire) | Works (X11 capture) |

| XWayland overhead | Yes, for X11 apps | Not applicable |

| Multi-monitor | Better hotplug | Requires xrandr |

| Nvidia GPU | Not supported | Works |

| Maturity on FreeBSD | Good | Excellent |

Migrate to Sway if: You have Intel or AMD GPU, want better HiDPI support, want tear-free rendering, or want to move to a more modern display stack.

Stay on i3 if: You have an Nvidia GPU, depend on X11 screen sharing, or use X11-specific tools that have no Wayland equivalent.

Sway vs Hyprland on FreeBSD

| Aspect | Sway | Hyprland |

|--------|------|----------|

| Stability | Excellent | Good |

| Animations | None | Smooth, configurable |

| Config format | i3-compatible | Custom syntax |

| Resource usage | ~120 MB | ~180 MB |

| Plugin system | No | Yes |

| FreeBSD support | Mature | Newer, fewer testers |

| Development pace | Conservative | Rapid |

Sway is the production-grade choice. Hyprland is the aesthetically interesting one.

Troubleshooting

Sway Fails to Start

sh
# Check GPU driver is loaded kldstat | grep -E "i915|amdgpu" # Check seatd is running service seatd status # Check group membership id | grep -E "video|_seatd" # Run sway with debug logging sway -d 2> /tmp/sway-debug.log

Black Screen After Launch

Usually a GPU driver issue:

sh
# Check dmesg for GPU errors dmesg | grep -i drm dmesg | grep -i gpu # Verify drm-kmod is installed and matches your kernel pkg info drm-kmod uname -r

Applications Look Blurry

X11 applications running under XWayland on HiDPI displays will appear blurry. Solutions:

  • Use Wayland-native alternatives (foot instead of xterm, Firefox with MOZ_ENABLE_WAYLAND=1)
  • Set per-application scaling in sway config

Audio Not Working

sh
# FreeBSD uses OSS by default. For PulseAudio compatibility: pkg install pulseaudio pavucontrol # Or use PipeWire with PulseAudio compatibility pkg install pipewire pipewire-pulse

Production Configuration Tips

  1. Back up your config: Keep ~/.config/sway/config in version control.
  2. Use includes: Split your config into modules:
sh
include ~/.config/sway/config.d/*
  1. Assign applications to workspaces:
sh
assign [app_id="firefox"] workspace 2 assign [app_id="foot"] workspace 1 for_window [app_id="pavucontrol"] floating enable
  1. Auto-start applications:
sh
exec firefox exec foot

FAQ

Does Sway work on FreeBSD?

Yes. Sway is one of the best-supported Wayland compositors on FreeBSD. It is available as a binary package and has been in the ports tree for years.

Can I use my i3 configuration with Sway?

Almost entirely. The configuration format is compatible. You will need to replace X11-specific tools (xrandr, scrot, dmenu, xclip) with Wayland equivalents (sway output config, grim, wofi, wl-clipboard) and use input/output blocks instead of external commands.

Does Sway support Nvidia GPUs on FreeBSD?

No. Wayland on FreeBSD requires KMS drivers (i915kms for Intel, amdgpu for AMD). The proprietary Nvidia driver does not provide KMS on FreeBSD. If you have an Nvidia GPU, use X11 with i3.

How do I get screen sharing working in Sway?

Install pipewire and xdg-desktop-portal-wlr. Screen sharing works in Firefox and Chromium but is less reliable than on Linux. For critical video calls, consider using XWayland or a dedicated solution.

What is the difference between swaybar and waybar?

swaybar is Sway's built-in status bar -- simple, lightweight, and configured directly in the sway config. waybar is a separate project with more features: per-module configuration, custom CSS styling, and support for more data sources. Most users prefer waybar for its flexibility.

Can I run GNOME or KDE applications under Sway?

Yes. GTK and Qt applications work under Sway. Set QT_QPA_PLATFORM=wayland for Qt apps. GTK3/4 applications detect Wayland automatically. Some older GTK2 applications will run through XWayland.

How do I handle multiple monitors?

Use the output directive in your sway config to set resolution, refresh rate, and position for each monitor. Use swaymsg -t get_outputs to list connected displays. Sway handles hotplugging better than i3.

Get more FreeBSD guides

Weekly tutorials, security advisories, and package updates. No spam.