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.

 test.sh

View raw Download
text/x-shellscript • 4.41 kiB
Bourne-Again shell script, ASCII text executable
        
            
1
#!/bin/bash
2
#
3
# Once run the script, no need to run ./install.sh for testing. ;)
4
#
5
# NOTE: This is WIP and incomplete. Polish me with PRs!
6
# FIXME: Multiple arguments should be allowed.
7
8
REPO_DIR=$(cd $(dirname $0) && pwd)
9
SRC_PATH=${REPO_DIR}/src
10
11
THEME_NAME=Materia.dev
12
THEMES_DIR=~/.themes
13
14
GNOME_VERSION=3.24
15
GTK_VERSION=3.22
16
17
test() {
18
[[ ${color} == '-dark' ]] && ELSE_DARK=${color}
19
[[ ${color} == '-light' ]] && ELSE_LIGHT=${color}
20
21
THEME_DIR=${THEMES_DIR}/${THEME_NAME}${color}${size}
22
23
mkdir -p ${THEME_DIR}
24
ln -sfT ${SRC_PATH}/index${color}${size}.theme ${THEME_DIR}/index.theme
25
26
mkdir -p ${THEME_DIR}/gnome-shell
27
ln -sfT ${SRC_PATH}/gnome-shell/${GNOME_VERSION}/assets${ELSE_DARK} ${THEME_DIR}/gnome-shell/assets
28
ln -sfT ${SRC_PATH}/gnome-shell/${GNOME_VERSION}/extensions ${THEME_DIR}/gnome-shell/extensions
29
ln -sfT ${SRC_PATH}/gnome-shell/${GNOME_VERSION}/gnome-shell${color}${size}.css ${THEME_DIR}/gnome-shell/gnome-shell.css
30
# ln -sfT ${SRC_PATH}/gnome-shell/${GNOME_VERSION}/pad-osd.css ${THEME_DIR}/gnome-shell/pad-osd.css
31
32
mkdir -p ${THEME_DIR}/gtk-2.0
33
ln -sfT ${SRC_PATH}/gtk-2.0/assets${ELSE_DARK} ${THEME_DIR}/gtk-2.0/assets
34
ln -sfT ${SRC_PATH}/gtk-2.0/gtkrc${color} ${THEME_DIR}/gtk-2.0/gtkrc
35
ln -sfT ${SRC_PATH}/gtk-2.0/apps.rc ${THEME_DIR}/gtk-2.0/apps.rc
36
ln -sfT ${SRC_PATH}/gtk-2.0/hacks.rc ${THEME_DIR}/gtk-2.0/hacks.rc
37
ln -sfT ${SRC_PATH}/gtk-2.0/main.rc ${THEME_DIR}/gtk-2.0/main.rc
38
39
mkdir -p ${THEME_DIR}/gtk-3.0
40
ln -sfT ${SRC_PATH}/gtk-3.0/gtk-common/assets ${THEME_DIR}/gtk-3.0/assets
41
ln -sfT ${SRC_PATH}/gtk-3.0/${GTK_VERSION}/gtk${color}${size}.css ${THEME_DIR}/gtk-3.0/gtk.css
42
ln -sfT ${SRC_PATH}/gtk-3.0/${GTK_VERSION}/gtk-dark${size}.css ${THEME_DIR}/gtk-3.0/gtk-dark.css
43
44
mkdir -p ${THEME_DIR}/metacity-1
45
ln -sfT ${SRC_PATH}/metacity-1/assets ${THEME_DIR}/metacity-1/assets
46
ln -sfT ${SRC_PATH}/metacity-1/metacity-theme-2${ELSE_LIGHT}.xml ${THEME_DIR}/metacity-1/metacity-theme-2.xml
47
ln -sfT ${SRC_PATH}/metacity-1/metacity-theme-3${ELSE_LIGHT}.xml ${THEME_DIR}/metacity-1/metacity-theme-3.xml
48
49
mkdir -p ${THEME_DIR}/unity
50
ln -sfT ${SRC_PATH}/unity/assets${ELSE_LIGHT} ${THEME_DIR}/unity/assets
51
# ln -sfT ${SRC_PATH}/unity/*.svg ${THEME_DIR}/unity/*.svg
52
ln -sfT ${SRC_PATH}/unity/launcher_bfb.png ${THEME_DIR}/unity/launcher_bfb.png
53
ln -sfT ${SRC_PATH}/unity/dash-widgets.json ${THEME_DIR}/unity/dash-widgets.json
54
55
mkdir -p ${THEME_DIR}/xfwm4
56
ln -sfT ${SRC_PATH}/xfwm4/assets${ELSE_LIGHT} ${THEME_DIR}/xfwm4/assets
57
# ln -sfT ${SRC_PATH}/xfwm4/*.svg ${THEME_DIR}/xfwm4/*.svg
58
ln -sfT ${SRC_PATH}/xfwm4/themerc ${THEME_DIR}/xfwm4/themerc
59
60
echo Installed to ${THEME_DIR}
61
}
62
63
case "${1}" in
64
"")
65
color=''
66
size=''
67
test
68
;;
69
compact)
70
color=''
71
size='-compact'
72
test
73
;;
74
dark)
75
color='-dark'
76
size=''
77
test
78
;;
79
dark-compact)
80
color='-dark'
81
size='-compact'
82
test
83
;;
84
light)
85
color='-light'
86
size=''
87
test
88
;;
89
light-compact)
90
color='-light'
91
size='-compact'
92
test
93
;;
94
uninstall)
95
rm -rf ${THEMES_DIR}/${THEME_NAME}{,-compact,-dark,-dark-compact,-light,-light-compact}
96
;;
97
*)
98
echo "Unknown argument: '${1}'"
99
echo "Use 'compact', 'dark', 'dark-compact', 'light', 'light-compact' or 'uninstall' as an argument."
100
;;
101
esac
102