swayfx-enhanced

swayfx logo

SwayFX-Enhanced

Sway is an incredible window manager, and certainly one of the most well established Wayland window managers. However, it is restricted to only include the functionality that existed in i3. This fork ditches the simple wlr_renderer, and replaces it with our fx_renderer (via scenefx), capable of rendering with fancy GLES2 effects.

Note: this is a fork of the original swayfx repository.

SwayFX expands Sway’s feature set to include eye-candy that many users have been asking for:

</img> ignore the insane RAM usage in this pic

Animations

Control the duration of window movement and resizing animations.

New windows use pop/expand animations by default when opening and closing, using the same animation timing.

Default config convenience:

Scrollable Tiling

Enable a niri-style horizontal strip layout for top-level tiled windows.

Current interaction behavior:

Blur

Global blur settings and per-window toggles.

Corner Radius

Shadows

Dimming

Layer Shell Effects

Apply effects to specific layer shell namespaces (e.g., “waybar”, “notifications”).

Liquid Glass (Experimental)

A refractive glass effect that distorts the background.

Miscellaneous

Xwayland Compatibility

This fork requires wlroots Xwayland support at build time, starts Xwayland immediately by default, and installs the default config with:

xwayland force

Display managers launch the session through sway-xwayland-session, which keeps common GUI toolkits on native Wayland by default while leaving Xwayland available for X11-only apps:

XDG_SESSION_TYPE=wayland
GDK_BACKEND=wayland,x11
QT_QPA_PLATFORM='wayland;xcb'
SDL_VIDEODRIVER=wayland,x11
CLUTTER_BACKEND=wayland
MOZ_ENABLE_WAYLAND=1
ELECTRON_OZONE_PLATFORM_HINT=wayland

Ways to check a running system:

swayfx-check-xwayland
echo "$DISPLAY"
pgrep -a Xwayland
swaymsg -t get_tree | grep '"shell": "xwayland"'

If the final command has no output, launch an X11 test client first, such as env GDK_BACKEND=x11 xeyes, then run it again.

Roadmap

Compiling From Source

Nix

If you have Nix installed, you can build and run SwayFX easily:

nix build
./result/bin/sway

For development:

nix develop

Debian

Check INSTALL-deb.md

Container (Docker)

docker compose up --build

Manual Steps

Install dependencies: meson, wlroots, wayland, wayland-protocols, pcre2, json-c, pango, cairo, scenefx, gdk-pixbuf2 (optional), swaybg (optional), scdoc (optional).

meson build/
ninja -C build/
sudo ninja -C build/ install

ASan Debugging

When chasing compositor crashes or memory corruption, build a separate AddressSanitizer binary so the normal build/ tree stays untouched:

meson setup build-asan -Db_sanitize=address -Dbuildtype=debug -Doptimization=0
ninja -C build-asan sway/sway

Run the instrumented compositor and save its debug output:

ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:detect_leaks=0 \
./build-asan/sway/sway -d 2> /tmp/swayfx-asan.log

After reproducing the crash, inspect the log for the allocator report and stack trace:

rg -n "AddressSanitizer|ERROR:|SUMMARY:" /tmp/swayfx-asan.log
tail -n 200 /tmp/swayfx-asan.log

Acknowledgements

SwayFX is a community project built on the shoulders of giants. We thank:

todo