Compare commits

...

32 commits
v0.2 ... main

Author SHA1 Message Date
3f3860b869
meson -> cmake 2025-12-08 19:25:53 +02:00
bd153e76f7
version: bump to 0.7.0 2025-10-04 21:37:23 +01:00
9c487e11c1
README: add new EIS protocol to readme 2025-10-04 21:37:11 +01:00
Gwilherm Folliot
c64dc1c9c3
protocols: Hyprland protocol expension for the Input Capture Desktop Portal (#8)
Adds a protocol for EIS capture.
2025-10-04 22:36:10 +02:00
Chris Hixon
613878cb6f
README: Add build instructions (#19)
Change headings to h2
2025-06-04 15:18:34 +01:00
3a5c2bda1c version: bump to 0.6.4 2025-04-03 22:14:34 +01:00
WhySoBad
04428d6b90
fix: add toplevel mapping protocol to meson build (#17) 2025-04-03 21:10:26 +02:00
4ab17ccac0 version: bump to 0.6.3 2025-04-02 00:14:11 +01:00
9cb87767de README: add hyprland_toplevel_mapping 2025-04-02 00:13:57 +01:00
WhySoBad
9830bfb56f
protocols: Add toplevel mapping protocol (#16) 2025-04-02 00:53:55 +02:00
755aef8dab version: bump to 0.6.2 2025-02-01 15:10:29 +00:00
6c520135a9
protocols: add hyprland_ctm_control_manager_v1.blocked (#14) 2025-02-01 16:09:57 +01:00
4c75dd5c01 version: bump to 0.6.1 2025-01-22 14:37:18 +00:00
5758ab13d6
hyprland-surface: add set_visible_region (#13)
Allows the clients to specify which region of the surface is supposed to be rendered
2025-01-22 14:36:32 +00:00
455c055883 version: bump to 0.6.0 2025-01-17 16:27:20 +01:00
d63f333bd5 README: add lock_notify 2025-01-17 16:26:56 +01:00
Maximilian Seidler
5c2317e086
protocols: add hyprland-lock-notify-v1 (#12) 2025-01-17 15:25:29 +00:00
e3b6af97dd README: reword some parts 2025-01-02 00:32:08 +01:00
271df559dd
protocols: add hyprland-surface-v1 (#11) 2025-01-01 12:27:54 +00:00
Vaxry
a7c183800e README: add hyprland-ctm-control 2024-10-08 00:50:20 +01:00
c7c3f4cd0f version: bump to 0.4.0 2024-10-08 00:42:30 +01:00
Vaxry
f173cc74b2
protocols: add a CTM control protocol (#10) 2024-10-08 00:41:49 +01:00
Vaxry
5619b1e77e
README: update wording 2024-10-06 12:39:52 +01:00
6b3261ee13
flake.nix: fix major lapse in judgement
what the hell did I write
2024-09-27 18:31:47 +03:00
5a11232266
flake.lock: update 2024-07-18 21:15:55 +03:00
01fc77926a
Meson, Nix: add VERSION file 2024-07-18 21:15:53 +03:00
1b61f0093a meson: bump ver to 0.3.0 2024-06-18 23:31:54 +02:00
e06482e0e6
protocols: Add hyprland_focus_grab_v1 (#7)
* Add hyprland_focus_grab_v1

* focus_grab: revise wording to make clearing implementation defined

* focus_grab: revise keyboard focus

* focus_grab: add destructor

* focus_grab: add to readme

* focus_grab: revise cleared event
2024-05-05 01:38:18 +01:00
Jacob Birkett
0c2ce70625
Nix: corrections for overlays, overrideable system (#6)
* flake: change formatter to use legacyPackages

* flake: add overlay with explicit name

* flake: make systems overrideable

* flake: inherit packages from pkgsFor
2023-08-11 14:36:36 +03:00
Mihai Fufezan
8c279b9fb0
flake.lock: update nixpkgs 2023-05-16 22:29:24 +03:00
Jacob Birkett
525960bb75 flake: fix usage of prev in overlays 2023-05-02 18:39:59 +03:00
Vaxry
6dfee22647
readme: update contents 2023-04-26 21:33:45 +01:00
13 changed files with 855 additions and 89 deletions

41
CMakeLists.txt Normal file
View file

@ -0,0 +1,41 @@
cmake_minimum_required(VERSION 3.20)
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" HYPRLAND_PROTOCOLS_VERSION
LIMIT_COUNT 1)
string(STRIP "${HYPRLAND_PROTOCOLS_VERSION}" HYPRLAND_PROTOCOLS_VERSION)
project(
hyprland-protocols
VERSION ${HYPRLAND_PROTOCOLS_VERSION}
LANGUAGES NONE)
include(GNUInstallDirs)
set(PROTOCOL_FILES
protocols/hyprland-toplevel-export-v1.xml
protocols/hyprland-global-shortcuts-v1.xml
protocols/hyprland-focus-grab-v1.xml
protocols/hyprland-ctm-control-v1.xml
protocols/hyprland-surface-v1.xml
protocols/hyprland-lock-notify-v1.xml
protocols/hyprland-toplevel-mapping-v1.xml
protocols/hyprland-input-capture-v1.xml)
foreach(PROTOCOL_FILE ${PROTOCOL_FILES})
get_filename_component(PROTOCOL_DIR ${PROTOCOL_FILE} DIRECTORY)
install(
FILES ${PROTOCOL_FILE}
DESTINATION "${CMAKE_INSTALL_DATADIR}/hyprland-protocols/${PROTOCOL_DIR}")
endforeach()
# Configure pkg-config file
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(datarootdir "\${prefix}/${CMAKE_INSTALL_DATADIR}")
set(abs_top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
set(PACKAGE "hyprland-protocols")
configure_file(hyprland-protocols.pc.in hyprland-protocols.pc @ONLY)
# Install pkg-config file
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/hyprland-protocols.pc"
DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig")

View file

@ -1,21 +1,40 @@
# hyprland-protocols # hyprland-protocols
Wayland protocol extensions for Hyprland. Wayland protocol extensions for Hyprland.
This repository exists in an effort to bridge the gap between Hyprland and KDE/Gnome's functionality. This repository exists in an effort to bridge the gap between Hyprland and KDE/Gnome's functionality,
as well as allow apps for some extra neat functionality under Hyprland.
Since `wlr-protocols` is closed for new submissions, and `wayland-protocols` is very slow with changes, this repo will hold protocols used by Hyprland to bridge the aforementioned gap. Since `wayland-protocols` is slow to change (on top of Hyprland not being allowed to contribute), we have to maintain
a set of protocols Hyprland uses to plumb some things / add some useful features.
Some of the protocols here also do not belong in w-p, as they are specific to Hyprland.
## Finished protocols
# Finished protocols
- `hyprland_toplevel_export` -> for exporting toplevel buffers (aka. windows) for screensharing - `hyprland_toplevel_export` -> for exporting toplevel buffers (aka. windows) for screensharing
# Planned protocols
- `hyprland_global_keybindings` -> for managing global keybinds via D-Bus. - `hyprland_global_keybindings` -> for managing global keybinds via D-Bus.
- `hyprland_window_management` -> for custom window managers / layouts. - `hyprland_focus_grab` -> for grabbing input focus, primarily for complex context menus.
- `hyprland_ctm_control` -> for managing CTMs of displays. See [hyprsunset](https://github.com/hyprwm/hyprsunset)
- `hyprland_surface` -> for setting hyprland specific wl_surface properties.
- `hyprland_lock_notify` -> for notifying a client about the screen being locked and unlocked.
- `hyprland_toplevel_mapping` -> for mapping toplevels to hyprland IDs.
- `hyprland_input_capture` -> for EIS input capture.
# Contributing ## Building
Adding new protocols is *discouraged*. If the protocol has a good reason to be, and you have an impl ready, feel free to make a PR.
```sh
git clone https://github.com/hyprwm/hyprland-protocols && cd hyprland-protocols
cmake -S . -B ./build
cmake --build ./build
```
## Contributing
Adding new protocols is *discouraged*, as most things you think of can already be done one way or another.
However, if the protocol has a good reason to be, and you have an impl ready, feel free to make a PR.
We're always up for a discussion to improve things!
Fixing typos / adding explanations to existing protocols - welcome. Fixing typos / adding explanations to existing protocols - welcome.
Adding functionality to protocols / new revisions - welcome, if accompanied with a reason and an impl. Adding functionality to protocols / new revisions - welcome, if accompanied with a reason and an impl.

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.7.0

24
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1669969257, "lastModified": 1721138476,
"narHash": "sha256-mOS13sK3v+kfgP+1Mh56ohiG8uVhLHAo7m/q9kqAehc=", "narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b72b8b94cf0c012b0252a9100a636cad69696666", "rev": "ad0b5eed1b6031efaed382844806550c3dcb4206",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -18,7 +18,23 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"systems": "systems"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
} }
} }
}, },

View file

@ -1,34 +1,46 @@
{ {
description = "Hyprland Protocols"; description = "Hyprland Protocols";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# <https://github.com/nix-systems/nix-systems>
systems.url = "github:nix-systems/default-linux";
};
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
systems,
... ...
}: let }: let
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
genSystems = lib.genAttrs [ eachSystem = lib.genAttrs (import systems);
"aarch64-linux" pkgsFor = eachSystem (system:
"x86_64-linux" import nixpkgs {
]; localSystem = system;
pkgsFor = nixpkgs.legacyPackages; overlays = [self.overlays.hyprland-protocols];
});
mkDate = longDate: (lib.concatStringsSep "-" [ mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate) (builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate) (builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate) (builtins.substring 6 2 longDate)
]); ]);
version = "0.1" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty"); version = lib.removeSuffix "\n" (builtins.readFile ./VERSION);
in { in {
overlays.default = _: prev: { overlays = {
hyprland-protocols = prev.callPackage ./nix/default.nix {inherit version;}; default = self.overlays.hyprland-protocols;
hyprland-protocols = final: prev: {
hyprland-protocols = final.callPackage ./nix/default.nix {
version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
};
};
}; };
packages = genSystems (system: packages = eachSystem (system: {
(self.overlays.default null pkgsFor.${system}) inherit (pkgsFor.${system}) hyprland-protocols;
// {default = self.packages.${system}.hyprland-protocols;}); default = self.packages.${system}.hyprland-protocols;
});
formatter = genSystems (system: pkgsFor.${system}.alejandra); formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.alejandra);
}; };
} }

View file

@ -1,60 +0,0 @@
project('hyprland-protocols',
version: '0.2',
meson_version: '>= 0.55.0',
)
hyprland_protocols_version = meson.project_version()
fs = import('fs')
protocols = {
'hyprland-toplevel-export': ['v1'],
'hyprland-global-shortcuts': ['v1']
}
protocol_files = []
foreach name : protocols.keys()
foreach version : protocols.get(name)
protocol_files += [
'protocols/@0@-@1@.xml'.format(name, version)
]
endforeach
endforeach
foreach protocol_file : protocol_files
protocol_install_dir = fs.parent(join_paths(
get_option('datadir'),
'hyprland-protocols',
protocol_file,
))
install_data(
protocol_file,
install_dir: protocol_install_dir,
)
endforeach
hyprland_protocols_srcdir = meson.current_source_dir()
pkgconfig_configuration = configuration_data()
pkgconfig_configuration.set('prefix', get_option('prefix'))
pkgconfig_configuration.set('datarootdir', '${prefix}/@0@'.format(get_option('datadir')))
pkgconfig_configuration.set('abs_top_srcdir', hyprland_protocols_srcdir)
pkgconfig_configuration.set('PACKAGE', 'hyprland-protocols')
pkgconfig_configuration.set('HYPRLAND_PROTOCOLS_VERSION', hyprland_protocols_version)
pkg_install_dir = join_paths(get_option('datadir'), 'pkgconfig')
configure_file(
input: 'hyprland-protocols.pc.in',
output: 'hyprland-protocols.pc',
configuration: pkgconfig_configuration,
install_dir: pkg_install_dir,
)
hyprland_protocols = declare_dependency(
variables: {
'pkgdatadir': hyprland_protocols_srcdir,
},
)
meson.override_dependency('hyprland-protocols', hyprland_protocols)

View file

@ -1,8 +1,7 @@
{ {
lib, lib,
stdenv, stdenv,
meson, cmake,
ninja,
version, version,
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
@ -11,7 +10,7 @@ stdenv.mkDerivation {
src = ../.; src = ../.;
nativeBuildInputs = [meson ninja]; nativeBuildInputs = [cmake];
meta = { meta = {
homepage = "https://github.com/hyprwm/hyprland-protocols"; homepage = "https://github.com/hyprwm/hyprland-protocols";

View file

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="hyprland_ctm_control_v1">
<copyright>
Copyright © 2024 Vaxry
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</copyright>
<description summary="controlling outputs' color transform matrix">
This protocol allows a client to control outputs' color transform matrix (CTM).
This protocol is privileged and should not be exposed to unprivileged clients.
</description>
<interface name="hyprland_ctm_control_manager_v1" version="2">
<description summary="manager to control CTMs">
This object is a manager which offers requests to control CTMs.
If any changes are done, once this object is destroyed, CTMs are reset back to
an identity matrix.
</description>
<request name="set_ctm_for_output">
<description summary="set the CTM of an output">
Set a CTM for a wl_output.
This state is not applied immediately; clients must call .commit to
apply any pending changes.
The provided values describe a 3x3 Row-Major CTM with values in the range of [0, ∞)
Passing values outside of the range will raise an invalid_matrix error.
The default value of the CTM is an identity matrix.
If an output doesn't get a CTM set with set_ctm_for_output and commit is called,
that output will get its CTM reset to an identity matrix.
</description>
<arg name="output" type="object" interface="wl_output"/>
<arg name="mat0" type="fixed"/>
<arg name="mat1" type="fixed"/>
<arg name="mat2" type="fixed"/>
<arg name="mat3" type="fixed"/>
<arg name="mat4" type="fixed"/>
<arg name="mat5" type="fixed"/>
<arg name="mat6" type="fixed"/>
<arg name="mat7" type="fixed"/>
<arg name="mat8" type="fixed"/>
</request>
<request name="commit">
<description summary="commit the pending state">
Commits the pending state(s) set by set_ctm_for_output.
</description>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
All objects created by the manager will still remain valid, until their
appropriate destroy request has been called.
The CTMs of all outputs will be reset to an identity matrix.
</description>
</request>
<enum name="error">
<entry name="invalid_matrix" value="0"
summary="the matrix values are invalid."/>
</enum>
<event name="blocked" version="2">
<description>
This event is sent if another manager was bound by any client
at the time the current manager was bound.
Any set_ctm_for_output requests from a blocked manager will be
silently ignored by the compositor.
The client should destroy the manager after receiving this event.
</description>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="hyprland_focus_grab_v1">
<copyright>
Copyright © 2024 outfoxxed
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</copyright>
<description summary="limit input focus to a set of surfaces">
This protocol allows clients to limit input focus to a specific set
of surfaces and receive a notification when the limiter is removed as
detailed below.
</description>
<interface name="hyprland_focus_grab_manager_v1" version="1">
<description summary="manager for focus grab objects">
This interface allows a client to create surface grab objects.
</description>
<request name="create_grab">
<description summary="create a focus grab object">
Create a surface grab object.
</description>
<arg name="grab" type="new_id" interface="hyprland_focus_grab_v1"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the focus grab manager">
Destroy the focus grab manager.
This doesn't destroy existing focus grab objects.
</description>
</request>
</interface>
<interface name="hyprland_focus_grab_v1" version="1">
<description summary="input focus limiter">
This interface restricts input focus to a specified whitelist of
surfaces as long as the focus grab object exists and has at least
one comitted surface.
Mouse and touch events inside a whitelisted surface will be passed
to the surface normally, while events outside of a whitelisted surface
will clear the grab object. Keyboard events will be passed to the client
and a compositor-picked surface in the whitelist will receive a
wl_keyboard::enter event if a whitelisted surface is not already entered.
Upon meeting implementation-defined criteria usually meaning a mouse or
touch input outside of any whitelisted surfaces, the compositor will
clear the whitelist, rendering the grab inert and sending the cleared
event. The same will happen if another focus grab or similar action
is started at the compositor's discretion.
</description>
<request name="add_surface">
<description summary="add a surface to the focus whitelist">
Add a surface to the whitelist. Destroying the surface is treated the
same as an explicit call to remove_surface and duplicate additions are
ignored.
Does not take effect until commit is called.
</description>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
<request name="remove_surface">
<description summary="remove a surface from the focus whitelist">
Remove a surface from the whitelist. Destroying the surface is treated
the same as an explicit call to this function.
If the grab was active and the removed surface was entered by the
keyboard, another surface will be entered on commit.
Does not take effect until commit is called.
</description>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
<request name="commit">
<description summary="commit the focus whitelist">
Commit pending changes to the surface whitelist.
If the list previously had no entries and now has at least one, the grab
will start. If it previously had entries and now has none, the grab will
become inert.
</description>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the focus grab">
Destroy the grab object and remove the grab if active.
</description>
</request>
<event name="cleared">
<description summary="the focus grab was cleared">
Sent when an active grab is cancelled by the compositor,
regardless of cause.
</description>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="hyprland_input_capture_v1">
<copyright>
Copyright © 2025 Fl0w
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</copyright>
<description summary="Bridge input capture to the compositor">
This protocol is a bridge of the XDG input capture to the compositor.
</description>
<interface name="hyprland_input_capture_manager_v1" version="1">
<description summary="manage input capture sessions">
This interface allows to create an input capture session.
</description>
<request name="create_session">
<description summary="create a input capture session">
Create a input capture session.
</description>
<arg name="session" type="new_id" interface="hyprland_input_capture_v1"/>
<arg name="handle" type="string"/>
</request>
</interface>
<interface name="hyprland_input_capture_v1" version="1">
<description summary="close reproduction of the xdg input capture portal">
Interface that is used to create barrier, and trigger capture and release of the pointer.
The inputs are sent through an EIS socket, when the cursor hit a barrier.
Barriers can only be placed on screen edges and need to be a straight line that cover one corner to another.
</description>
<request name="clear_barriers">
<description summary="clear every barriers registered">
Remove every barriers from the session, new barriers need to be send before calling enable again.
</description>
</request>
<request name="add_barrier">
<description summary="add one barrier">
Add one barrier to the current session, the barrier need to a line placed on the edge of the screen, and is a straight line from one corner to another.
</description>
<arg name="zone_set" type="uint" summary="The current zone_set" />
<arg name="id" type="uint" summary="The zone id" />
<arg name="x1" type="uint"/>
<arg name="y1" type="uint"/>
<arg name="x2" type="uint"/>
<arg name="y2" type="uint"/>
</request>
<request name="enable">
<description summary="enable input capturing">
Enable the input capturing to be triggered by the cursor crossing a barrier.
</description>
</request>
<request name="disable">
<description summary="disable input capturing">
Disable input capturing, the crossing of a barrier will not trigger anymore input capture.
</description>
</request>
<request name="release">
<description summary="release input capturing">
Release input capturing, the input are not intercepted anymore and barrier crossing will activate it again.
If x != -1 and y != -1 then the cursor is warped to the x and y coordinates.
</description>
<arg name="activation_id" type="uint" summary="The activation id provided when activated is called" />
<arg name="x"
type="fixed"
summary="the x position of the cursor" />
<arg name="y" type="fixed"
summary="the y position of the cursor" />
</request>
<event name="eis_fd">
<description summary="eis file descriptor">
This event provide the file descriptor of an eis socket where inputs will be sent when input capturing is active
</description>
<arg name="fd" type="fd" summary="eis socket file descriptor" />
</event>
<event name="disabled">
<description summary="disable the session">
Called when the application will not receive captured input. The application can call enable to request future input capturing
</description>
</event>
<event name="activated">
<description summary="inputs has been captured">
Called when the application is about to receive inputs
</description>
<arg name="activation_id"
type="uint"
summary="Same number used in eis start_emulating to allow synchronisation" />
<arg name="x"
type="fixed"
summary="the x position of the cursor" />
<arg name="y" type="fixed"
summary="the y position of the cursor" />
<arg name="barrier_id"
type="uint"
summary="the is of the barrier that have been triggered" />
</event>
<event name="deactivated">
<description summary="pointer motion">
Called when input capture is stopped, and inputs are no longer sent to the application
</description>
<arg name="activation_id"
type="uint"
summary="same activation id of the latest activated event" />
</event>
<enum name="error">
<entry name="invalid_barrier_id" value="0"
summary="The barrier id already exist"/>
<entry name="invalid_barrier" value="1"
summary="The barrier coordinates are invalid"/>
<entry name="invalid_activation_id" value="2"
summary="The activation id provided is invalid"/>
</enum>
</interface>
</protocol>

View file

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="hyprland_lock_notify_v1">
<copyright>
Copyright © 2025 Maximilian Seidler
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</copyright>
<interface name="hyprland_lock_notifier_v1" version="1">
<description summary="lock notification manager">
This interface allows clients to monitor whether the wayland session is
locked or unlocked.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
Destroy the manager object. All objects created via this interface
remain valid.
</description>
</request>
<request name="get_lock_notification">
<description summary="create a notification object">
Create a new lock notification object.
If the session is already locked when calling this method,
the locked event shall be sent immediately.
</description>
<arg name="id" type="new_id" interface="hyprland_lock_notification_v1"/>
</request>
</interface>
<interface name="hyprland_lock_notification_v1" version="1">
<description summary="lock notification">
This interface is used by the compositor to send lock notification events
to clients.
Typically the "locked" and "unlocked" events are emitted when a client
locks/unlocks the session via ext-session-lock, but the compositor may
choose to send notifications for any other locking mechanisms.
The compositor must notfiy after possible transition periods
between locked and unlocked states of the session.
In the context of ext-session-lock, that means the "locked" event is
expected to be sent after the session-lock client has presented
a lock screen frame on every output, which corresponds to the "locked"
event of ext-session-lock.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the notification object">
Destroy the notification object.
</description>
</request>
<event name="locked">
<description summary="session is locked">
This event is sent when the wayland session is locked.
It's a compositor protocol error to send this event twice without an
unlock event in-between.
</description>
</event>
<event name="unlocked">
<description summary="session is no longer locked">
This event is sent when the wayland session is unlocked.
It's a compositor protocol error to send this event twice without an
locked event in-between. It's a compositor protocol error to send this
event prior to any locked event.
</description>
</event>
</interface>
</protocol>

View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="hyprland_surface_v1">
<copyright>
Copyright © 2025 outfoxxed
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</copyright>
<description summary="hyprland-specific wl_surface extensions">
This protocol exposes hyprland-specific wl_surface properties.
</description>
<interface name="hyprland_surface_manager_v1" version="2">
<description summary="manager for hyprland surface objects">
This interface allows a client to create hyprland surface objects.
</description>
<request name="get_hyprland_surface">
<description summary="create a hyprland surface object">
Create a hyprland surface object for the given wayland surface.
If the wl_surface already has an associated hyprland_surface_v1 object,
even from a different manager, creation is a protocol error.
</description>
<arg name="id" type="new_id" interface="hyprland_surface_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the hyprland surface manager">
Destroy the surface manager.
This does not destroy existing surface objects.
</description>
</request>
<enum name="error">
<entry name="already_constructed" value="0" summary="wl_surface already has a hyprland surface object"/>
</enum>
</interface>
<interface name="hyprland_surface_v1" version="2">
<description summary="hyprland-specific wl_surface properties">
This interface allows access to hyprland-specific properties of a wl_surface.
Once the wl_surface has been destroyed, the hyprland surface object must be
destroyed as well. All other operations are a protocol error.
</description>
<request name="set_opacity">
<description summary="set the overall opacity of the surface">
Sets a multiplier for the overall opacity of the surface.
This multiplier applies to visual effects such as blur behind the surface
in addition to the surface's content.
The default value is 1.0.
Setting a value outside of the range 0.0 - 1.0 (inclusive) is a protocol error.
Does not take effect until wl_surface.commit is called.
</description>
<arg name="opacity" type="fixed"/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the hyprland surface interface">
Destroy the hyprland surface object, resetting properties provided
by this interface to their default values on the next wl_surface.commit.
</description>
</request>
<enum name="error">
<entry name="no_surface" value="0" summary="wl_surface was destroyed"/>
<entry name="out_of_range" value="1" summary="given opacity was not in the range 0.0 - 1.0 (inclusive)"/>
</enum>
<request name="set_visible_region" since="2">
<description summary="set the visible region of the surface">
This request sets the region of the surface that contains visible content.
Visible content refers to content that has an alpha value greater than zero.
The visible region is an optimization hint for the compositor that lets it
avoid drawing parts of the surface that are not visible. Setting a visible region
that does not contain all content in the surface may result in missing content
not being drawn.
The visible region is specified in buffer-local coordinates.
The compositor ignores the parts of the visible region that fall outside of the surface.
When all parts of the region fall outside of the buffer geometry, the compositor may
avoid rendering the surface entirely.
The initial value for the visible region is empty. Setting the
visible region has copy semantics, and the wl_region object can be destroyed immediately.
A NULL wl_region causes the visible region to be set to empty.
Does not take effect until wl_surface.commit is called.
</description>
<arg name="region" type="object" interface="wl_region" allow-null="true"/>
</request>
</interface>
</protocol>

View file

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="hyprland_toplevel_mapping_v1">
<copyright>
Copyright © 2025 WhySoBad
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</copyright>
<description summary="mapping of toplevels to windows">
This protocol allows clients to retrieve the mapping of toplevels to hyprland window addresses.
</description>
<interface name="hyprland_toplevel_mapping_manager_v1" version="1">
<description summary="manager to request toplevel mappings">
This object is a manager which offers requests to retrieve a window address
for a toplevel.
</description>
<request name="get_window_for_toplevel">
<description summary="get window address for toplevel">
Get the window address for a toplevel.
</description>
<arg
name="handle"
type="new_id"
interface="hyprland_toplevel_window_mapping_handle_v1"
/>
<arg
name="toplevel"
type="object"
interface="ext_foreign_toplevel_handle_v1"
summary="toplevel to get the window address for"
/>
</request>
<request name="get_window_for_toplevel_wlr">
<description summary="get window address for wlr toplevel">
Get the window address for a wlr toplevel.
</description>
<arg
name="handle"
type="new_id"
interface="hyprland_toplevel_window_mapping_handle_v1"
/>
<arg
name="toplevel"
type="object"
interface="zwlr_foreign_toplevel_handle_v1"
summary="wlr toplevel to get the window address for"
/>
</request>
<request name="destroy" type="destructor">
<description summary="destroy the manager">
All objects created by the manager will still remain valid, until their appropriate destroy
request has been called.
</description>
</request>
</interface>
<interface name="hyprland_toplevel_window_mapping_handle_v1" version="1">
<description summary="toplevel to window mapping">
This object represents a mapping of a (wlr) toplevel to a window address.
Once created, the `window_address` event will be sent containing the address of the window
associated with the toplevel.
Should the mapping fail, the `failed` event will be sent.
</description>
<event name="window_address">
<description summary="address of the window">
The full 64bit window address. The `address` field contains the lower 32 bits whilst the
`address_hi` contains the upper 32 bits
</description>
<arg
name="address_hi"
type="uint"
summary="upper 32 bits of the window address"
/>
<arg
name="address"
type="uint"
summary="lower 32 bits of the window address"
/>
</event>
<event name="failed">
<description summary="mapping failed">
The mapping of the toplevel to a window address failed. Most likely the window does not
exist (anymore).
</description>
</event>
<request name="destroy" type="destructor">
<description summary="destroy handle">
Destroy the handle. This request can be sent at any time by the client.
</description>
</request>
</interface>
</protocol>