Skip to content

Instantly share code, notes, and snippets.

@matthiasak
Forked from concatime/dot.md
Created August 13, 2018 15:59
Show Gist options
  • Save matthiasak/62e5a7ab75ce4ac95263a5ced511de12 to your computer and use it in GitHub Desktop.
Save matthiasak/62e5a7ab75ce4ac95263a5ced511de12 to your computer and use it in GitHub Desktop.

apt-transport-https

First, if you are on Ubuntu Cosmic, you need to manually compile json-c because the version provided is 0.12.1, but sway requires at least version 0.13. It is pretty straight forward, so take a look here.

Then, we need to install common dependencies between wlroots and sway-1.0.

sudo apt install gcc pkgconf meson ninja-build libwayland-dev libinput-dev libcap-dev

Secondly, we need to install wlroots dependencies.

sudo apt install wayland-protocols libegl1-mesa-dev libgles2-mesa-dev libdrm-dev libgbm-dev libxkbcommon-dev libudev-dev libpixman-1-dev

If you want xwayland/X11 support, add these dependencies.

sudo apt install libxcb-composite0-dev libxcb-xfixes0-dev libxcb-image0-dev libxcb-render0-dev libx11-xcb-dev

Let’s compile wlroots.

git clone https://github.com/swaywm/wlroots
cd wlroots
meson build
cd build
ninja
sudo ninja install

Then, build sway.

sudo apt install libjson-c-dev libpcre3-dev libcairo-dev libpango1.0-dev libpangocairo-1.0-0 libgdk-pixbuf2.0-dev libpam-dev
git clone https://github.com/swaywm/sway -b 1.0-alpha.5
cd sway
meson build
cd build
ninja
sudo ninja install
sudo sed -ie 's/bionic/cosmic/g' /etc/apt/sources.list
sudo apt update
sudo apt install libxkbcommon-dev libudev-dev libpixman-1-dev libgles2-mesa-dev xcb libxcb-composite0-dev libxcb-image0-dev libsystemd-dev libxcb-icccm4-dev libxcb-xkb-dev libxcb-util-dev libpng-dev libavutil-dev libavcodec-dev libavformat-dev libpango1.0-dev libgdk-pixbuf2.0-dev libcap-dev libpam0g-dev
# COMMONS
sudo apt install gcc pkgconf meson ninja-build libwayland-dev libinput-dev libcap-dev
# WLROOTS
sudo apt install wayland-protocols libegl1-mesa-dev libgles2-mesa-dev libdrm-dev libgbm-dev libxkbcommon-dev libudev-dev libpixman-1-dev
# xwayland
libxcb-composite0-dev libxcb-xfixes0-dev libxcb-image0-dev libxcb-render0-dev libx11-xcb-dev
# libsystemd-dev libelogind-dev libpng-dev libavutil-dev libavcodec-dev libavformat-dev etags ctags
# SWAY
sudo apt install libjson-c-dev libpcre3-dev libcairo-dev libpango1.0-dev libpangocairo-1.0-0 libgdk-pixbuf2.0-dev libpam-dev
json-c-devel pcre-devel wlroots-devel wayland-devel wayland-protocols libxkbcommon-devel cairo-devel pango-devel gdk-pixbuf-devel pixman-devel libcap-devel libinput-devel pam-devel scdoc
wget https://github.com/swaywm/wlroots/archive/2a58d44.tar.gz https://github.com/swaywm/sway/archive/1.0-alpha.4.tar.gz https://github.com/json-c/json-c/archive/json-c-0.13.1-20180305.tar.gz
tar xf *.tar.gz
cd jsno-c*
sh autogen.sh
make
sudo make install
cd ../wlroots*
meson build
cd build
ninja
sudo ninja install
cd ../../sway*
meson build
cd build
ninja
sudo ninja install
sudo setcap "cap_sys_ptrace,cap_sys_tty_config=eip" /usr/local/bin/sway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment