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
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.
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.
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.
Hey, thanks for this. I have some feedback though which I noticed while going through this.
The first command contains
recurse-sobmoduleswhich I believe should berecurse-submodulesAlso 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:
After which, the build failed.
Doing the following worked for me:
When building the portal, I ran into basically the same issue (Couldn't load proto)
I ran this and it worked:
This creates the files we need before building the portal, which made it work.
After rebooting, Deskflow was working perfectly fine