From 8fbafbfab5671d56dd469f2205b7906c4a7f7c7c Mon Sep 17 00:00:00 2001 From: Mattias Eriksson Date: Tue, 17 Apr 2018 09:54:02 +0200 Subject: 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 --- meson.build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index a1f406ec..b943236f 100644 --- a/meson.build +++ b/meson.build @@ -20,6 +20,8 @@ datadir = get_option('datadir') sysconfdir = get_option('sysconfdir') prefix = get_option('prefix') +swayidle_deps = [] + jsonc = dependency('json-c', version: '>=0.13') pcre = dependency('libpcre') wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots']) @@ -37,6 +39,8 @@ pixman = dependency('pixman-1') libcap = dependency('libcap') libinput = dependency('libinput', version: '>=1.6.0') libpam = cc.find_library('pam') +systemd = dependency('libsystemd', required: false) +elogind = dependency('libelogind', required: false) math = cc.find_library('m') rt = cc.find_library('rt') git = find_program('git', required: false) @@ -47,6 +51,16 @@ if gdk_pixbuf.found() conf_data.set('HAVE_GDK_PIXBUF', true) endif +if systemd.found() + conf_data.set('SWAY_IDLE_HAS_SYSTEMD', true) + swayidle_deps += systemd +endif + +if elogind.found() + conf_data.set('SWAY_IDLE_HAS_ELOGIND', true) + swayidle_deps += elogind +endif + scdoc = find_program('scdoc', required: false) if scdoc.found() @@ -59,6 +73,7 @@ if scdoc.found() 'sway/sway-input.5.scd', 'swaylock/swaylock.1.scd', 'swaymsg/swaymsg.1.scd', + 'swayidle/swayidle.1.scd', ] foreach filename : man_files topic = filename.split('.')[-3].split('/')[-1] @@ -106,6 +121,7 @@ subdir('client') subdir('swaybg') subdir('swaybar') subdir('swaylock') +subdir('swayidle') config = configuration_data() config.set('sysconfdir', join_paths(prefix, sysconfdir)) -- cgit v1.2.3-54-g00ecf