mirror of
https://github.com/labwc/labwc.git
synced 2026-05-03 06:47:22 -04:00
build: ship labwc-session.target systemd user unit
Add a small systemd user target modelled on miracle-wm-session.target. It binds to graphical-session.target and orders after graphical-session-pre.target, so systemd user services declaring WantedBy=graphical-session.target (panels, portals, notification daemons, ...) start and stop in sync with a labwc session. Installed into $systemduserunitdir when the systemd dependency is available at configure time; on systems without systemd the install is skipped and labwc's runtime activation of the target fails gracefully.
This commit is contained in:
parent
5c7bfe3c67
commit
d8119cb354
2 changed files with 15 additions and 0 deletions
6
data/labwc-session.target
Normal file
6
data/labwc-session.target
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
[Unit]
|
||||||
|
Description=labwc session
|
||||||
|
Documentation=man:labwc(1) man:systemd.special(7)
|
||||||
|
BindsTo=graphical-session.target
|
||||||
|
Wants=graphical-session-pre.target
|
||||||
|
After=graphical-session-pre.target
|
||||||
|
|
@ -211,6 +211,15 @@ install_data('data/labwc.desktop', install_dir: get_option('datadir') / 'wayland
|
||||||
|
|
||||||
install_data('data/labwc-portals.conf', install_dir: get_option('datadir') / 'xdg-desktop-portal')
|
install_data('data/labwc-portals.conf', install_dir: get_option('datadir') / 'xdg-desktop-portal')
|
||||||
|
|
||||||
|
# Install labwc-session.target so that systemd user services with
|
||||||
|
# WantedBy=graphical-session.target start under labwc. Labwc activates
|
||||||
|
# this target itself in src/config/session.c on autostart.
|
||||||
|
systemd = dependency('systemd', required: false)
|
||||||
|
if systemd.found()
|
||||||
|
install_data('data/labwc-session.target',
|
||||||
|
install_dir: systemd.get_variable('systemduserunitdir'))
|
||||||
|
endif
|
||||||
|
|
||||||
icons = ['labwc-symbolic.svg', 'labwc.svg']
|
icons = ['labwc-symbolic.svg', 'labwc.svg']
|
||||||
foreach icon : icons
|
foreach icon : icons
|
||||||
icon_path = join_paths('data', icon)
|
icon_path = join_paths('data', icon)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue