A fork of the Materia GTK theme.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 meson.build

View raw Download
text/plain • 2.28 kiB
ASCII text
        
            
1
gtk_versions = [
2
'3.0',
3
]
4
5
gtk_scss_depend_files = files([
6
'../_color-palette.scss',
7
'../_colors.scss',
8
'../_variables.scss',
9
'sass/apps/_budgie.scss',
10
'sass/apps/_gnome-3.22.scss',
11
'sass/apps/_libhandy.scss',
12
'sass/apps/_lightdm.scss',
13
'sass/apps/_mate.scss',
14
'sass/apps/_misc.scss',
15
'sass/apps/_nemo.scss',
16
'sass/apps/_unity.scss',
17
'sass/apps/_xfce.scss',
18
'sass/_apps-3.22.scss',
19
'sass/_colors-public.scss',
20
'sass/_common-3.20.scss',
21
'sass/_drawing-3.20.scss',
22
])
23
24
foreach theme: themes
25
gtk_variants = [
26
'',
27
]
28
29
# Only non-dark themes need a dark variant.
30
if theme['color'] != '-dark'
31
gtk_variants += '-dark'
32
endif
33
34
gtk_scss_conf = configuration_data()
35
gtk_scss_conf.set('dark_theme', theme['scss_dark_theme'])
36
gtk_scss_conf.set('light_topbar', theme['scss_light_topbar'])
37
gtk_scss_conf.set('compact', theme['scss_compact'])
38
39
foreach gtk_version: gtk_versions
40
gtk_version_dir = join_paths(theme['dir'], 'gtk-@0@'.format(gtk_version))
41
42
install_subdir(
43
'assets',
44
install_dir: gtk_version_dir,
45
)
46
47
install_subdir(
48
'icons',
49
install_dir: gtk_version_dir,
50
)
51
52
#
53
# SCSS
54
#
55
56
foreach gtk_variant: gtk_variants
57
gtk_temp_name = 'gtk@0@.gtk-@1@.@2@'.format(gtk_variant, gtk_version, theme['name'])
58
59
# Configure SCSS file
60
gtk_scss = configure_file(
61
input: 'gtk@0@.scss.in'.format(gtk_variant),
62
output: '@0@.scss'.format(gtk_temp_name),
63
configuration: gtk_scss_conf,
64
)
65
66
# Copy it from build dir to source dir
67
run_command(
68
'cp',
69
gtk_scss,
70
meson.current_source_dir(),
71
)
72
73
# Generate CSS file
74
gtk_css = custom_target(
75
'@0@.css'.format(gtk_temp_name),
76
input: '@0@.scss'.format(gtk_temp_name),
77
output: '@0@.css'.format(gtk_temp_name),
78
command: [sassc, sassc_opts, '@INPUT@', '@OUTPUT@'],
79
depend_files: gtk_scss_depend_files,
80
build_by_default: true,
81
)
82
83
# Install it while renaming to a valid name
84
meson.add_install_script(
85
'sh', '-c', 'cp "@0@" "@1@"'.format(
86
gtk_css.full_path(),
87
join_paths('$MESON_INSTALL_DESTDIR_PREFIX', gtk_version_dir, 'gtk@0@.css'.format(gtk_variant)),
88
),
89
)
90
endforeach
91
endforeach
92
endforeach
93