Skip to content

Commit

Permalink
Add sessions and unity components for Sucharu (#29)
Browse files Browse the repository at this point in the history
Ripped off from Yaru.
  • Loading branch information
hsbasu authored Oct 15, 2022
1 parent 9cdc799 commit 4142996
Show file tree
Hide file tree
Showing 129 changed files with 652 additions and 4 deletions.
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ components = [
'gtk',
'gtksourceview',
# 'sounds',
# 'sessions',
# 'ubuntu-unity',
'sessions',
'ubuntu-unity',
'xfwm4',
'cinnamon-shell',
]
Expand Down
4 changes: 2 additions & 2 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ option('gtk', type: 'boolean', value: true, description:'build gtk component')
option('gtksourceview', type: 'boolean', value: true, description:'build gtksourceview component')
option('metacity', type: 'boolean', value: true, description:'build metacity component')
# option('sounds', type: 'boolean', value: true, description:'build sounds component')
# option('sessions', type: 'boolean', value: true, description:'build sessions component')
option('sessions', type: 'boolean', value: true, description:'build sessions component')
option('cinnamon-shell', type: 'boolean', value: true, description:'build for cinnamon component')

option('default', type: 'boolean', value: true, description:'build Sucharu default flavour')
option('dark', type: 'boolean', value: true, description:'build Sucharu dark flavour')
option('darker', type: 'boolean', value: true, description:'build Sucharu darker flavour')
# option('ubuntu-unity', type: 'boolean', value: false, description:'build Sucharu with Unity assets')
option('ubuntu-unity', type: 'boolean', value: false, description:'build Sucharu with Unity assets')
option('xfwm4', type: 'boolean', value: false, description:'build Sucharu with xfwm4 assets')
# option('cinnamon', type: 'boolean', value: false, description:'build Sucharu with Cinnamon flavour')
# option('cinnamon-dark', type: 'boolean', value: false, description:'build Sucharu with Cinnamon dark flavour')
Expand Down
8 changes: 8 additions & 0 deletions sessions/THEMENAME-xorg.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Name=@ThemeName@ session on Xorg
Comment=This session logs you with @ThemeName@ on xorg
Exec=env GNOME_SHELL_SESSION_MODE=@LowerCaseThemeName@ gnome-session
TryExec=gnome-session
Type=Application
DesktopNames=@ThemeName@:ubuntu:GNOME
X-Ubuntu-Gettext-Domain=gnome-session-3.0
8 changes: 8 additions & 0 deletions sessions/THEMENAME.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Name=@ThemeName@ session
Comment=This session logs you with @ThemeName@ on wayland
Exec=env GNOME_SHELL_SESSION_MODE=@LowerCaseThemeName@ gnome-session
TryExec=gnome-session
Type=Application
DesktopNames=@ThemeName@:ubuntu:GNOME
X-Ubuntu-Gettext-Domain=gnome-session-3.0
21 changes: 21 additions & 0 deletions sessions/THEMENAME.gschema.override.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
##########################################
# @ThemeName@ specific session for testers #
##########################################

[org.gnome.desktop.interface:@ThemeName@]
cursor-theme = "@ThemeName@"
icon-theme = "@ThemeName@"
gtk-theme = "@ThemeName@"

[org.gnome.gedit.preferences.editor:@ThemeName@]
scheme = "@ThemeName@"

[org.gnome.desktop.sound:@ThemeName@]
theme-name = "@ThemeName@"
input-feedback-sounds = true

[org.gnome.mutter:@ThemeName@]
center-new-windows = true

[org.gnome.desktop.wm.preferences:@ThemeName@]
button-layout = ':minimize,maximize,close'
32 changes: 32 additions & 0 deletions sessions/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
gnomeshell_mode_dir = join_paths(get_option('datadir'), 'gnome-shell', 'modes')

conf_data = configuration_data()
conf_data.set('ThemeName', meson.project_name())
conf_data.set('LowerCaseThemeName', meson.project_name().to_lower())

resource_path = gnomeshell_use_gresource ? join_paths('theme', meson.project_name(), '') : ''
conf_data.set('ThemeResourcePath', resource_path)

# NOTE: GNOME Shell only accept lowercase mode names.
configure_file(input : 'mode.json.in',
output : meson.project_name().to_lower()+'.json',
configuration : conf_data,
install_dir: gnomeshell_mode_dir)

configure_file(input : 'THEMENAME.desktop.in',
output : meson.project_name()+'.desktop',
configuration : conf_data,
install_dir: join_paths(get_option('datadir'), 'wayland-sessions'))

configure_file(input : 'THEMENAME-xorg.desktop.in',
output : meson.project_name()+'-xorg.desktop',
configuration : conf_data,
install_dir: join_paths(get_option('datadir'), 'xsessions'))

configure_file(input : 'THEMENAME.gschema.override.in',
output : '99_'+meson.project_name()+'.gschema.override',
configuration : conf_data,
install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas'))

meson.add_install_script('meson/install-dock-override', meson.project_name().to_lower())
meson.add_install_script('meson/compile-schemas')
9 changes: 9 additions & 0 deletions sessions/meson/compile-schemas
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env python3

from os import environ, path
from subprocess import call

if not environ.get('DESTDIR', ''):
PREFIX = environ.get('MESON_INSTALL_PREFIX', '/usr')
print('Compiling overridden schemas')
call(['glib-compile-schemas', path.join(PREFIX, 'share', 'glib-2.0', 'schemas')])
7 changes: 7 additions & 0 deletions sessions/meson/install-dock-override
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -eu

DOCK_DIR="${MESON_INSTALL_DESTDIR_PREFIX}/share/gnome-shell/extensions/[email protected]"

mkdir -p "${DOCK_DIR}"
touch "${DOCK_DIR}/$1.css"
11 changes: 11 additions & 0 deletions sessions/mode.json.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parentMode": "user",
"stylesheetName": "@ThemeName@/gnome-shell.css",
"themeResourceName": "@[email protected]",
"iconsResourceName": "@[email protected]",
"enabledExtensions": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}
11 changes: 11 additions & 0 deletions ubuntu-unity/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
flavours = []
foreach flavour: ['default', 'dark']
if not get_option(flavour)
message('skip flavour ' + flavour)
continue
endif
flavours += flavour
endforeach


subdir('src')
6 changes: 6 additions & 0 deletions ubuntu-unity/src/dark/unity/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/close_dash.svg
4 changes: 4 additions & 0 deletions ubuntu-unity/src/dark/unity/close_dash_disabled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/close_dash_prelight.svg
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/close_dash_pressed.svg
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/close_focused_normal.svg
6 changes: 6 additions & 0 deletions ubuntu-unity/src/dark/unity/close_focused_prelight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions ubuntu-unity/src/dark/unity/close_focused_pressed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions ubuntu-unity/src/dark/unity/close_unfocused.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/close_unfocused_prelight.svg
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/close_unfocused_pressed.svg
17 changes: 17 additions & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_back_150.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_back_54.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_edge_150.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_edge_54.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_glow_200.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_glow_62.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_shadow_200.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_shadow_62.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_shine_150.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/launcher_icon_shine_54.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions ubuntu-unity/src/dark/unity/maximize.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions ubuntu-unity/src/dark/unity/maximize_dash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions ubuntu-unity/src/dark/unity/maximize_dash_disabled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/maximize_dash_prelight.svg
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/maximize_dash_pressed.svg
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/maximize_focused_normal.svg
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/maximize_focused_prelight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions ubuntu-unity/src/dark/unity/maximize_focused_pressed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions ubuntu-unity/src/dark/unity/maximize_unfocused.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/maximize_unfocused_pressed.svg
6 changes: 6 additions & 0 deletions ubuntu-unity/src/dark/unity/minimize.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions ubuntu-unity/src/dark/unity/minimize_dash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions ubuntu-unity/src/dark/unity/minimize_dash_disabled.svg
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/minimize_dash_prelight.svg
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/minimize_dash_pressed.svg
1 change: 1 addition & 0 deletions ubuntu-unity/src/dark/unity/minimize_focused_normal.svg
Loading

0 comments on commit 4142996

Please sign in to comment.