workflows/mosey-branch: add desktop files for core services

We're just imitating how GNOME sets up its components.
This commit is contained in:
Gabriel Arazas 2023-08-18 22:26:36 +08:00
parent 9504f06fb5
commit ebafb21bfd
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
3 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Name=@component@
Comment=@description@
Exec=@script@
OnlyShowIn=Mosey Branch;
NoDisplay=true
X-GNOME-Autostart-Phase=@gsm_phase@
X-GNOME-Autostart-Notify=true
X-GNOME-AutoRestart=true
X-GNOME-HiddenUnderSystemd=true

View File

@ -8,7 +8,9 @@ app_id = 'one.foodogsquared.MoseyBranch'
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
systemddir = join_paths(prefix, 'share/systemd')
applicationsdir = join_paths(datadir, 'applications')
systemduserdir = join_paths(systemddir, 'user')
autostartdir = join_paths(prefix, 'etc/xdg/autostart')
unit_name_template = app_id + '.@0@.@1@'
required_components = {
@ -80,6 +82,14 @@ configure_file(
install: true,
)
configure_file(
input: 'mosey-branch.desktop.in',
output: app_id + '.desktop',
install_dir: applicationsdir,
configuration: serviceconf,
install: true,
)
# Setting up for installing with the core services systemd units.
required_services = []
foreach name, component : required_components
@ -105,6 +115,7 @@ foreach name, component : required_components
componentsconf.set('app_id', app_id)
componentsconf.set('description', component.get('description'))
componentsconf.set('script', component.get('script'))
componentsconf.set('gsm_phase', component.get('gsm_phase', 'Desktop'))
configure_file(
input: 'core-service.service.in',
@ -121,4 +132,12 @@ foreach name, component : required_components
configuration: componentsconf,
install: true,
)
configure_file(
input: 'core-service.desktop.in',
output: unit_name_template.format(name, 'desktop'),
install_dir: autostartdir,
configuration: componentsconf,
install: true,
)
endforeach

View File

@ -0,0 +1,13 @@
[Desktop Entry]
Type=Application
Name=Mosey Branch
Comment=Window manager
Exec=@script@
Categories=wlroots;Core;
OnlyShowIn=Mosey Branch;
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer
X-GNOME-Provides=windowmanager;
X-GNOME-Autostart-Notify=true
X-GNOME-AutoRestart=false
X-GNOME-HiddenUnderSystemd=true