A fork of the Materia GTK theme.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 meson.build

View raw Download
text/plain • 1.97 kiB
ASCII text
        
            
1
gtk3_scss_depend_files = files([
2
'../_color-palette.scss',
3
'../_theme.scss',
4
'../_theme-color.scss',
5
'sass/apps/_budgie.scss',
6
'sass/apps/_gnome.scss',
7
'sass/apps/_index.scss',
8
'sass/apps/_libhandy.scss',
9
'sass/apps/_lightdm.scss',
10
'sass/apps/_mate.scss',
11
'sass/apps/_misc.scss',
12
'sass/apps/_nemo.scss',
13
'sass/apps/_unity.scss',
14
'sass/apps/_xfce.scss',
15
'sass/_common.scss',
16
'sass/_drawing.scss',
17
'sass/_public-colors.scss',
18
])
19
20
foreach theme: themes
21
gtk3_dir = join_paths(theme['dir'], 'gtk-3.0')
22
23
gtk3_variants = [
24
'gtk',
25
]
26
27
# Only non-dark themes need a dark variant.
28
if theme['color'] != '-dark'
29
gtk3_variants += 'gtk-dark'
30
endif
31
32
install_subdir(
33
'assets',
34
install_dir: gtk3_dir,
35
)
36
37
install_subdir(
38
'icons',
39
install_dir: gtk3_dir,
40
)
41
42
#
43
# SCSS
44
#
45
46
gtk3_scss_conf = configuration_data()
47
gtk3_scss_conf.set('dark_theme', theme['scss_dark_theme'])
48
gtk3_scss_conf.set('light_topbar', theme['scss_light_topbar'])
49
gtk3_scss_conf.set('compact', theme['scss_compact'])
50
gtk3_scss_conf.set('current_source_dir', meson.current_source_dir())
51
52
foreach gtk3_variant: gtk3_variants
53
gtk3_temp_name = '@0@.gtk3.@1@'.format(theme['name'], gtk3_variant)
54
55
# Configure SCSS file
56
gtk3_scss = configure_file(
57
input: '@0@.scss.in'.format(gtk3_variant),
58
output: '@0@.scss'.format(gtk3_temp_name),
59
configuration: gtk3_scss_conf,
60
)
61
62
# Generate CSS file
63
gtk3_css = custom_target(
64
'@0@.css'.format(gtk3_temp_name),
65
input: gtk3_scss,
66
output: '@0@.css'.format(gtk3_temp_name),
67
command: [sass, sass_opts, '@INPUT@', '@OUTPUT@'],
68
depend_files: gtk3_scss_depend_files,
69
build_by_default: true,
70
)
71
72
# Install it while renaming to a valid name
73
meson.add_install_script(
74
sh, '-c', 'cp "@0@" "@1@"'.format(
75
gtk3_css.full_path(),
76
join_paths('$MESON_INSTALL_DESTDIR_PREFIX', gtk3_dir, '@0@.css'.format(gtk3_variant)),
77
),
78
)
79
endforeach
80
endforeach
81