Skip to content

Instantly share code, notes, and snippets.

@stauersbol
Last active October 1, 2025 17:57
Show Gist options
  • Select an option

  • Save stauersbol/235884919606ea3584c0db48d9c94129 to your computer and use it in GitHub Desktop.

Select an option

Save stauersbol/235884919606ea3584c0db48d9c94129 to your computer and use it in GitHub Desktop.
How to clone, setup and build 310w input capture

Intro

As some people might want to try out the Input Capture protocol for Hyprland before it is merged, I made this write-up/tutorial/guide on how you can set it up.

Note this guide/write-up could become obsolete as soon as this is merged in to Hyprland.

I also don't take responsibility if your system bricks as a result of this

Guide

First start with making sure you have all the necessary dependencies installed as mentioned on the Hyprland Wiki for manual installation with CMake. You can find that information here: https://wiki.hypr.land/Getting-Started/Installation/#manual

Make sure you pick the distro that you are running.

Then when you have made sure to have necessary dependencies installed then you can start to clone down the necessary repos to compile this:

Start with cloning down the fork that 310w has on Hyprland:

git clone https://github.com/3l0w/Hyprland.git
cd Hyprland
git checkout feat/input-capture-impl
git submodule update --init --recursive

Note the command should do all the steps for cloning and checking out the correct branch.

Once you have done that you can then go ahead and compile Hyprland manually with the following commands:

make all && sudo make install
cd ..

Note if above fails please run: make clean and rerun the commands again

If it compiled correctly you can proceed.

Now lets do the same for the portal repo.

git clone https://github.com/3l0w/xdg-desktop-portal-hyprland.git
cd xdg-desktop-portal-hyprland
git checkout feat/input-capture-impl
git submodule update --init --recursive

Note the command should do all the steps for cloning and checking out the correct branch.

Once it has been cloned then you are ready to compile the portal:

cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build
cmake --build build
sudo cmake --install build

After this has compiled, you should now be able to setup Deskflow/Input Leap. The Deskflow/Input Leap setup is user dependent and therefore I can't give you instructions here. It should be possible to follow any other guide as how to setup Deskflow/Input Leap (there isn't any Wayland magic, as Deskflow/Input Leap should support Wayland OOTB)

Also remember to restart for the compiled code to take effect.

Updating from latest pushes

Make sure you are in the same folder as where you cloned down the 2 repos, then run:

git pull

And it will pull down the latest changes pushed. Then return to the installation steps where you run CMake Guide. You don't need to reclone, just go to the CMake commands and run them again.

Once you have done that, you can restart and the new changes will take affect again.

Troubleshooting

If you get a issue with the submodules not work properly do this command in either folder:

git submodule update --init --recursive

And if that fails, then you can redo the cloning process again.

If you need any assistance or you get any compile errors please refer to Hyprland or the current implementor of this feature for help :)

All credit and the amazing work goes to the maintainers of Hyprland and 3l0w for taking their time on working on this.

@R0wDrunner
Copy link

Hey, thanks for this. I have some feedback though which I noticed while going through this.
The first command contains recurse-sobmodules which I believe should be recurse-submodules
Also that command (at least on my setup) didn't properly work since, it should cd into the git directory after the clone.

Along the way, I ran into a couple issues though, I have listed my comments / notes down below in case someone runs into the same issues - these might help.


When compiling 3l0w/Hyprland.git I ran into this issue:

Couldn't load proto
make[4]: *** [CMakeFiles/Hyprland.dir/build.make:200: /home/username/projects/Hyprland/protocols/hyprland-ctm-control-v1.cpp] Error 1

After which, the build failed.

Doing the following worked for me:

cd Hyprland
git submodule update --init --recursive
make clean
make all && sudo make install

When building the portal, I ran into basically the same issue (Couldn't load proto)
I ran this and it worked:

# This part was just so I can start fresh
cd ~/projects
rm -rf xdg-desktop-portal-hyprland
##

git clone https://github.com/3l0w/xdg-desktop-portal-hyprland.git --recurse-submodules
cd xdg-desktop-portal-hyprland

git checkout feat/input-capture-impl

git submodule update --init --recursive

mkdir -p protocols

hyprwayland-scanner --client subprojects/hyprland-protocols/protocols/hyprland-input-capture-v1.xml protocols/

ls -l protocols/hyprland-input-capture-v1.*

cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build

cmake --build build

sudo cmake --install build

This creates the files we need before building the portal, which made it work.
After rebooting, Deskflow was working perfectly fine

@stauersbol
Copy link
Author

stauersbol commented Sep 7, 2025

Hey, thanks for this. I have some feedback though which I noticed while going through this. The first command contains recurse-sobmodules which I believe should be recurse-submodules Also that command (at least on my setup) didn't properly work since, it should cd into the git directory after the clone.

Along the way, I ran into a couple issues though, I have listed my comments / notes down below in case someone runs into the same issues - these might help.

When compiling 3l0w/Hyprland.git I ran into this issue:

Couldn't load proto
make[4]: *** [CMakeFiles/Hyprland.dir/build.make:200: /home/username/projects/Hyprland/protocols/hyprland-ctm-control-v1.cpp] Error 1

After which, the build failed.

Doing the following worked for me:

cd Hyprland
git submodule update --init --recursive
make clean
make all && sudo make install

When building the portal, I ran into basically the same issue (Couldn't load proto) I ran this and it worked:

# This part was just so I can start fresh
cd ~/projects
rm -rf xdg-desktop-portal-hyprland
##

git clone https://github.com/3l0w/xdg-desktop-portal-hyprland.git --recurse-submodules
cd xdg-desktop-portal-hyprland

git checkout feat/input-capture-impl

git submodule update --init --recursive

mkdir -p protocols

hyprwayland-scanner --client subprojects/hyprland-protocols/protocols/hyprland-input-capture-v1.xml protocols/

ls -l protocols/hyprland-input-capture-v1.*

cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build

cmake --build build

sudo cmake --install build

This creates the files we need before building the portal, which made it work. After rebooting, Deskflow was working perfectly fine

Addressed some of these issues! Thanks for letting me know.

I think some of the things you added for the cleanup shouldn't be necessary if this was done "properly" from the beginning, it was because I made a mistake in write-up, which I think should be fixed now

@R0wDrunner
Copy link

Hey, thanks for this. I have some feedback though which I noticed while going through this. The first command contains recurse-sobmodules which I believe should be recurse-submodules Also that command (at least on my setup) didn't properly work since, it should cd into the git directory after the clone.
Along the way, I ran into a couple issues though, I have listed my comments / notes down below in case someone runs into the same issues - these might help.
When compiling 3l0w/Hyprland.git I ran into this issue:

Couldn't load proto
make[4]: *** [CMakeFiles/Hyprland.dir/build.make:200: /home/username/projects/Hyprland/protocols/hyprland-ctm-control-v1.cpp] Error 1

After which, the build failed.
Doing the following worked for me:

cd Hyprland
git submodule update --init --recursive
make clean
make all && sudo make install

When building the portal, I ran into basically the same issue (Couldn't load proto) I ran this and it worked:

# This part was just so I can start fresh
cd ~/projects
rm -rf xdg-desktop-portal-hyprland
##

git clone https://github.com/3l0w/xdg-desktop-portal-hyprland.git --recurse-submodules
cd xdg-desktop-portal-hyprland

git checkout feat/input-capture-impl

git submodule update --init --recursive

mkdir -p protocols

hyprwayland-scanner --client subprojects/hyprland-protocols/protocols/hyprland-input-capture-v1.xml protocols/

ls -l protocols/hyprland-input-capture-v1.*

cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build

cmake --build build

sudo cmake --install build

This creates the files we need before building the portal, which made it work. After rebooting, Deskflow was working perfectly fine

Addressed some of these issues! Thanks for letting me know.

I think some of the things you added for the cleanup shouldn't be necessary if this was done "properly" from the beginning, it was because I made a mistake in write-up, which I think should be fixed now

Thank you.
Yes, maybe, but when building the portal, I had issues from the beginning on - I believe that part I started properly to be honest, but I could be wrong

@stauersbol
Copy link
Author

Hey, thanks for this. I have some feedback though which I noticed while going through this. The first command contains recurse-sobmodules which I believe should be recurse-submodules Also that command (at least on my setup) didn't properly work since, it should cd into the git directory after the clone.
Along the way, I ran into a couple issues though, I have listed my comments / notes down below in case someone runs into the same issues - these might help.
When compiling 3l0w/Hyprland.git I ran into this issue:

Couldn't load proto
make[4]: *** [CMakeFiles/Hyprland.dir/build.make:200: /home/username/projects/Hyprland/protocols/hyprland-ctm-control-v1.cpp] Error 1

After which, the build failed.
Doing the following worked for me:

cd Hyprland
git submodule update --init --recursive
make clean
make all && sudo make install

When building the portal, I ran into basically the same issue (Couldn't load proto) I ran this and it worked:

# This part was just so I can start fresh
cd ~/projects
rm -rf xdg-desktop-portal-hyprland
##

git clone https://github.com/3l0w/xdg-desktop-portal-hyprland.git --recurse-submodules
cd xdg-desktop-portal-hyprland

git checkout feat/input-capture-impl

git submodule update --init --recursive

mkdir -p protocols

hyprwayland-scanner --client subprojects/hyprland-protocols/protocols/hyprland-input-capture-v1.xml protocols/

ls -l protocols/hyprland-input-capture-v1.*

cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build

cmake --build build

sudo cmake --install build

This creates the files we need before building the portal, which made it work. After rebooting, Deskflow was working perfectly fine

Addressed some of these issues! Thanks for letting me know.
I think some of the things you added for the cleanup shouldn't be necessary if this was done "properly" from the beginning, it was because I made a mistake in write-up, which I think should be fixed now

Thank you. Yes, maybe, but when building the portal, I had issues from the beginning on - I believe that part I started properly to be honest, but I could be wrong

I actually just removed the whole --recurse-submodules part now, as it was potentially interfering with the setup.

@frob
Copy link

frob commented Sep 27, 2025

If someone installed this branch with the gist, how does one update to the latest version?

@stauersbol
Copy link
Author

If someone installed this branch with the gist, how does one update to the latest version?

I'll have to add a small section on that, but you can go into each cloned folder do a git pull and then compile it all again, which should apply on your next reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment