Tested on v1.10 of sway and 0.18 of wlroots
- Clone the sway repo and cd into it:
git clone https://github.com/swaywm/sway && cd sway
- Clone the wlroots repo into subprojects/wlroots:
git clone https://gitlab.freedesktop.org/wlroots/wlroots.git subprojects/wlroots
- Clone the patches repo:
git clone https://github.com/Zai-Kun/sway-patch
- Switch to stable branches (Optional step but recommended for stability):
git checkout v1.10 && cd subprojects/wlroots && git checkout 0.18 && cd ../..
- Apply all the patches (If you only wish to apply a specific patch, replace the wildcard '*' with the patch name):
patch -p1 < ./sway-patch/patches/*.patch
Alright, all the preparations have been completed; now it's time to compile:
- Compile all the code:
meson setup --wipe build/ && ninja -C build/
Now, you should have patched version of sway in: ./build/sway/sway
. If you don't, then something went wrong.
If you want to install the compiled sway into your system, do:
sudo ninja -C build/ install
Note: To understand what a patch does and how to use it, read: ./paches/<patch_name>.md