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