mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
Adding systemd unit files for socket activation
- Support for multiples concurrent instances, templated on WAYLAND_DISPLAY - Use standard input for the socket file descriptor (inetd style) - Always use the socket provided by systemd with the systemd user service - wayland-instance@.target is intended to be a special target a bit like graphical-session.target.
This commit is contained in:
parent
88a0f7397c
commit
1783f69cbd
3 changed files with 37 additions and 0 deletions
13
foot-server@.service.in
Normal file
13
foot-server@.service.in
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
[Service]
|
||||||
|
ExecStart=@bindir@/foot --server=0
|
||||||
|
Environment=WAYLAND_DISPLAY=%i
|
||||||
|
NonBlocking=true
|
||||||
|
StandardInput=socket
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Requires=%N.socket
|
||||||
|
Description=Foot terminal server mode for WAYLAND_DISPLAY=%i
|
||||||
|
Documentation=man:foot(1)
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=wayland-instance@.target
|
||||||
5
foot-server@.socket
Normal file
5
foot-server@.socket
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
[Socket]
|
||||||
|
ListenStream=%t/foot-%i.sock
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=wayland-instance@.target
|
||||||
19
meson.build
19
meson.build
|
|
@ -245,6 +245,25 @@ install_data(
|
||||||
'foot.desktop', 'foot-server.desktop', 'footclient.desktop',
|
'foot.desktop', 'foot-server.desktop', 'footclient.desktop',
|
||||||
install_dir: join_paths(get_option('datadir'), 'applications'))
|
install_dir: join_paths(get_option('datadir'), 'applications'))
|
||||||
|
|
||||||
|
systemd = dependency('systemd', required: false)
|
||||||
|
if systemd.found()
|
||||||
|
|
||||||
|
configuration = configuration_data()
|
||||||
|
configuration.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
|
||||||
|
|
||||||
|
systemd_units_dir = systemd.get_pkgconfig_variable('systemduserunitdir')
|
||||||
|
configure_file(
|
||||||
|
configuration: configuration,
|
||||||
|
input: 'foot-server@.service.in',
|
||||||
|
output: '@BASENAME@',
|
||||||
|
install_dir: systemd_units_dir
|
||||||
|
)
|
||||||
|
|
||||||
|
install_data(
|
||||||
|
'foot-server@.socket',
|
||||||
|
install_dir: systemd_units_dir)
|
||||||
|
endif
|
||||||
|
|
||||||
scdoc = dependency('scdoc', native: true, required: get_option('docs'))
|
scdoc = dependency('scdoc', native: true, required: get_option('docs'))
|
||||||
if scdoc.found()
|
if scdoc.found()
|
||||||
install_data(
|
install_data(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue