aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorLibravatar Mattias Eriksson <snaggen@mayam.com>2018-04-17 09:54:02 +0200
committerLibravatar Mattias Eriksson <snaggen@mayam.com>2018-05-13 00:30:09 +0200
commit8fbafbfab5671d56dd469f2205b7906c4a7f7c7c (patch)
treeab4eab0020d97dc5091b72479c383989ccc84729 /protocols
parentMerge pull request #1967 from emersion/remove-xdg-popup-unmap (diff)
downloadsway-8fbafbfab5671d56dd469f2205b7906c4a7f7c7c.tar.gz
sway-8fbafbfab5671d56dd469f2205b7906c4a7f7c7c.tar.zst
sway-8fbafbfab5671d56dd469f2205b7906c4a7f7c7c.zip
Idle handling for dpms/lockscreen et al
Swayidle handles idle events and allows for dpms and lockscreen handling. It also handles systemd sleep events, and can raise a lockscreen on sleep Fixes #541
Diffstat (limited to 'protocols')
-rw-r--r--protocols/idle.xml49
-rw-r--r--protocols/meson.build1
2 files changed, 50 insertions, 0 deletions
diff --git a/protocols/idle.xml b/protocols/idle.xml
new file mode 100644
index 00000000..92d9989c
--- /dev/null
+++ b/protocols/idle.xml
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="idle">
3 <copyright><![CDATA[
4 Copyright (C) 2015 Martin Gräßlin
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 2.1 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 ]]></copyright>
19 <interface name="org_kde_kwin_idle" version="1">
20 <description summary="User idle time manager">
21 This interface allows to monitor user idle time on a given seat. The interface
22 allows to register timers which trigger after no user activity was registered
23 on the seat for a given interval. It notifies when user activity resumes.
24
25 This is useful for applications wanting to perform actions when the user is not
26 interacting with the system, e.g. chat applications setting the user as away, power
27 management features to dim screen, etc..
28 </description>
29 <request name="get_idle_timeout">
30 <arg name="id" type="new_id" interface="org_kde_kwin_idle_timeout"/>
31 <arg name="seat" type="object" interface="wl_seat"/>
32 <arg name="timeout" type="uint" summary="The idle timeout in msec"/>
33 </request>
34 </interface>
35 <interface name="org_kde_kwin_idle_timeout" version="1">
36 <request name="release" type="destructor">
37 <description summary="release the timeout object"/>
38 </request>
39 <request name="simulate_user_activity">
40 <description summary="Simulates user activity for this timeout, behaves just like real user activity on the seat"/>
41 </request>
42 <event name="idle">
43 <description summary="Triggered when there has not been any user activity in the requested idle time interval"/>
44 </event>
45 <event name="resumed">
46 <description summary="Triggered on the first user activity after an idle event"/>
47 </event>
48 </interface>
49</protocol>
diff --git a/protocols/meson.build b/protocols/meson.build
index 9d213f81..fa6d696c 100644
--- a/protocols/meson.build
+++ b/protocols/meson.build
@@ -30,6 +30,7 @@ wayland_scanner_server = generator(
30client_protocols = [ 30client_protocols = [
31 [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'], 31 [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
32 ['wlr-layer-shell-unstable-v1.xml'], 32 ['wlr-layer-shell-unstable-v1.xml'],
33 ['idle.xml'],
33 ['wlr-input-inhibitor-unstable-v1.xml'] 34 ['wlr-input-inhibitor-unstable-v1.xml']
34] 35]
35 36