Skip to content

Commit 4142996

Browse files
authored
Add sessions and unity components for Sucharu (#29)
Ripped off from Yaru.
1 parent 9cdc799 commit 4142996

File tree

129 files changed

+652
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+652
-4
lines changed

meson.build

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ components = [
1818
'gtk',
1919
'gtksourceview',
2020
# 'sounds',
21-
# 'sessions',
22-
# 'ubuntu-unity',
21+
'sessions',
22+
'ubuntu-unity',
2323
'xfwm4',
2424
'cinnamon-shell',
2525
]

meson_options.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ option('gtk', type: 'boolean', value: true, description:'build gtk component')
77
option('gtksourceview', type: 'boolean', value: true, description:'build gtksourceview component')
88
option('metacity', type: 'boolean', value: true, description:'build metacity component')
99
# option('sounds', type: 'boolean', value: true, description:'build sounds component')
10-
# option('sessions', type: 'boolean', value: true, description:'build sessions component')
10+
option('sessions', type: 'boolean', value: true, description:'build sessions component')
1111
option('cinnamon-shell', type: 'boolean', value: true, description:'build for cinnamon component')
1212

1313
option('default', type: 'boolean', value: true, description:'build Sucharu default flavour')
1414
option('dark', type: 'boolean', value: true, description:'build Sucharu dark flavour')
1515
option('darker', type: 'boolean', value: true, description:'build Sucharu darker flavour')
16-
# option('ubuntu-unity', type: 'boolean', value: false, description:'build Sucharu with Unity assets')
16+
option('ubuntu-unity', type: 'boolean', value: false, description:'build Sucharu with Unity assets')
1717
option('xfwm4', type: 'boolean', value: false, description:'build Sucharu with xfwm4 assets')
1818
# option('cinnamon', type: 'boolean', value: false, description:'build Sucharu with Cinnamon flavour')
1919
# option('cinnamon-dark', type: 'boolean', value: false, description:'build Sucharu with Cinnamon dark flavour')

sessions/THEMENAME-xorg.desktop.in

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Desktop Entry]
2+
Name=@ThemeName@ session on Xorg
3+
Comment=This session logs you with @ThemeName@ on xorg
4+
Exec=env GNOME_SHELL_SESSION_MODE=@LowerCaseThemeName@ gnome-session
5+
TryExec=gnome-session
6+
Type=Application
7+
DesktopNames=@ThemeName@:ubuntu:GNOME
8+
X-Ubuntu-Gettext-Domain=gnome-session-3.0

sessions/THEMENAME.desktop.in

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Desktop Entry]
2+
Name=@ThemeName@ session
3+
Comment=This session logs you with @ThemeName@ on wayland
4+
Exec=env GNOME_SHELL_SESSION_MODE=@LowerCaseThemeName@ gnome-session
5+
TryExec=gnome-session
6+
Type=Application
7+
DesktopNames=@ThemeName@:ubuntu:GNOME
8+
X-Ubuntu-Gettext-Domain=gnome-session-3.0
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
##########################################
2+
# @ThemeName@ specific session for testers #
3+
##########################################
4+
5+
[org.gnome.desktop.interface:@ThemeName@]
6+
cursor-theme = "@ThemeName@"
7+
icon-theme = "@ThemeName@"
8+
gtk-theme = "@ThemeName@"
9+
10+
[org.gnome.gedit.preferences.editor:@ThemeName@]
11+
scheme = "@ThemeName@"
12+
13+
[org.gnome.desktop.sound:@ThemeName@]
14+
theme-name = "@ThemeName@"
15+
input-feedback-sounds = true
16+
17+
[org.gnome.mutter:@ThemeName@]
18+
center-new-windows = true
19+
20+
[org.gnome.desktop.wm.preferences:@ThemeName@]
21+
button-layout = ':minimize,maximize,close'

sessions/meson.build

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
gnomeshell_mode_dir = join_paths(get_option('datadir'), 'gnome-shell', 'modes')
2+
3+
conf_data = configuration_data()
4+
conf_data.set('ThemeName', meson.project_name())
5+
conf_data.set('LowerCaseThemeName', meson.project_name().to_lower())
6+
7+
resource_path = gnomeshell_use_gresource ? join_paths('theme', meson.project_name(), '') : ''
8+
conf_data.set('ThemeResourcePath', resource_path)
9+
10+
# NOTE: GNOME Shell only accept lowercase mode names.
11+
configure_file(input : 'mode.json.in',
12+
output : meson.project_name().to_lower()+'.json',
13+
configuration : conf_data,
14+
install_dir: gnomeshell_mode_dir)
15+
16+
configure_file(input : 'THEMENAME.desktop.in',
17+
output : meson.project_name()+'.desktop',
18+
configuration : conf_data,
19+
install_dir: join_paths(get_option('datadir'), 'wayland-sessions'))
20+
21+
configure_file(input : 'THEMENAME-xorg.desktop.in',
22+
output : meson.project_name()+'-xorg.desktop',
23+
configuration : conf_data,
24+
install_dir: join_paths(get_option('datadir'), 'xsessions'))
25+
26+
configure_file(input : 'THEMENAME.gschema.override.in',
27+
output : '99_'+meson.project_name()+'.gschema.override',
28+
configuration : conf_data,
29+
install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas'))
30+
31+
meson.add_install_script('meson/install-dock-override', meson.project_name().to_lower())
32+
meson.add_install_script('meson/compile-schemas')

sessions/meson/compile-schemas

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env python3
2+
3+
from os import environ, path
4+
from subprocess import call
5+
6+
if not environ.get('DESTDIR', ''):
7+
PREFIX = environ.get('MESON_INSTALL_PREFIX', '/usr')
8+
print('Compiling overridden schemas')
9+
call(['glib-compile-schemas', path.join(PREFIX, 'share', 'glib-2.0', 'schemas')])

sessions/meson/install-dock-override

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
DOCK_DIR="${MESON_INSTALL_DESTDIR_PREFIX}/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com"
5+
6+
mkdir -p "${DOCK_DIR}"
7+
touch "${DOCK_DIR}/$1.css"

sessions/mode.json.in

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"parentMode": "user",
3+
"stylesheetName": "@ThemeName@/gnome-shell.css",
4+
"themeResourceName": "@ThemeResourcePath@gnome-shell-theme.gresource",
5+
"iconsResourceName": "@ThemeResourcePath@gnome-shell-icons.gresource",
6+
"enabledExtensions": [
7+
"ubuntu-dock@ubuntu.com",
8+
"ubuntu-appindicators@ubuntu.com",
9+
"ding@rastersoft.com"
10+
]
11+
}

ubuntu-unity/meson.build

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
flavours = []
2+
foreach flavour: ['default', 'dark']
3+
if not get_option(flavour)
4+
message('skip flavour ' + flavour)
5+
continue
6+
endif
7+
flavours += flavour
8+
endforeach
9+
10+
11+
subdir('src')

ubuntu-unity/src/dark/unity/close.svg

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
close.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
close_focused_prelight.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
close_focused_pressed.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
close.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
close_focused_prelight.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
close_focused_pressed.svg
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maximize_focused_prelight.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maximize_focused_pressed.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maximize.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maximize_focused_prelight.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maximize_focused_pressed.svg
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
minimize_focused_prelight.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
minimize_focused_pressed.svg
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
minimize.svg

0 commit comments

Comments
 (0)