Skip to content

Commit

Permalink
Add optional Wayland session (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Jun 13, 2023
1 parent 19c49eb commit cb1176b
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ subdir('xsessions')
if get_option('systemd')
subdir('systemd')
endif

if get_option('wayland')
subdir('wayland-sessions')
endif
3 changes: 3 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ option('systemd', type: 'boolean', value: true,

option('systemduserunitdir', type: 'string', value: '',
description : 'Custom directory for systemd user units')

option('wayland', type: 'boolean', value: false,
description: 'Install Wayland session')
18 changes: 18 additions & 0 deletions session/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,24 @@ pantheon_session = configure_file(
install_dir: join_paths(datadir, 'gnome-session', 'sessions')
)

if get_option('wayland')
wayland_session_components = [
'gala-wayland',
'gala-daemon',
gsd_components
]

wayland_session_configuration = configuration_data()
wayland_session_configuration.set('SESSION_COMPONENTS', ';'.join(wayland_session_components))

configure_file(
input: 'pantheon-wayland.session.in',
output: '@BASENAME@',
configuration: wayland_session_configuration,
install_dir: datadir / 'gnome-session' / 'sessions'
)
endif

autostartdir = join_paths(get_option('sysconfdir'), 'xdg', 'autostart')

gsd_dir = gsd_dep.get_pkgconfig_variable('prefix')
Expand Down
5 changes: 5 additions & 0 deletions session/pantheon-wayland.session.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[GNOME Session]
Name=Pantheon (Wayland)
RequiredComponents=@SESSION_COMPONENTS@
FallbackSession=pantheon
DesktopName=Pantheon
4 changes: 4 additions & 0 deletions wayland-sessions/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
install_data(
'pantheon-wayland.desktop',
install_dir: datadir / 'wayland-sessions'
)
8 changes: 8 additions & 0 deletions wayland-sessions/pantheon-wayland.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Name=Pantheon (Wayland)
Comment=This session provides elementary experience
Exec=gnome-session --builtin --session=pantheon-wayland
TryExec=io.elementary.wingpanel
Icon=
DesktopNames=Pantheon
Type=Application

0 comments on commit cb1176b

Please sign in to comment.