Skip to content

Commit d1c8ec9

Browse files
committed
Fixed #91
1 parent 75933a9 commit d1c8ec9

File tree

114 files changed

+3914
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+3914
-180
lines changed

install.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ install() {
141141

142142
cp -r "${SRC_DIR}/assets/gnome-shell/common-assets" "${THEME_DIR}/gnome-shell/assets"
143143
cp -r "${SRC_DIR}/assets/gnome-shell/assets${ELSE_DARK:-}/"*.svg "${THEME_DIR}/gnome-shell/assets"
144-
cp -r "${SRC_DIR}/assets/gnome-shell/theme${theme}/"*.svg "${THEME_DIR}/gnome-shell/assets"
144+
cp -r "${SRC_DIR}/assets/gnome-shell/theme${theme}${ctype}/"*.svg "${THEME_DIR}/gnome-shell/assets"
145145

146146
cd "${THEME_DIR}/gnome-shell"
147147
ln -s assets/no-events.svg no-events.svg
@@ -261,12 +261,13 @@ install_gdm() {
261261
local theme="${2}"
262262
local gcolor="${3}"
263263
local size="${4}"
264+
local ctype="${5}"
264265
local TARGET=
265266

266267
[[ "${gcolor}" == '-Light' ]] && local ELSE_LIGHT="${gcolor}"
267268
[[ "${gcolor}" == '-Dark' ]] && local ELSE_DARK="${gcolor}"
268269

269-
local THEME_TEMP="/tmp/${1}${2}${3}${4}"
270+
local THEME_TEMP="/tmp/${1}${2}${3}${4}${5}"
270271

271272
theme_tweaks
272273

@@ -279,8 +280,9 @@ install_gdm() {
279280

280281
cp -r "${SRC_DIR}/assets/gnome-shell/common-assets" "${THEME_TEMP}/gnome-shell/assets"
281282
cp -r "${SRC_DIR}/assets/gnome-shell/assets${ELSE_DARK}/"*.svg "${THEME_TEMP}/gnome-shell/assets"
282-
cp -r "${SRC_DIR}/assets/gnome-shell/theme${theme}/"*.svg "${THEME_TEMP}/gnome-shell/assets"
283+
cp -r "${SRC_DIR}/assets/gnome-shell/theme${theme}${ctype}/"*.svg "${THEME_TEMP}/gnome-shell/assets"
283284
cp -r "${SRC_DIR}/assets/gnome-shell/scalable" "${THEME_TEMP}/gnome-shell"
285+
cp -r "${SRC_DIR}/assets/gnome-shell/background${gcolor}${ctype}.png" "${THEME_TEMP}/gnome-shell/background.png"
284286
mv "${THEME_TEMP}/gnome-shell/assets/process-working.svg" "${THEME_TEMP}/gnome-shell/process-working.svg"
285287

286288
if check_exist "${COMMON_CSS_FILE}"; then # CSS-based theme
@@ -747,7 +749,7 @@ install_gdm_theme() {
747749
for theme in "${themes[@]}"; do
748750
for gcolor in "${gcolors[@]}"; do
749751
for size in "${sizes[@]}"; do
750-
install_gdm "${name:-$THEME_NAME}" "$theme" "$gcolor" "$size"
752+
install_gdm "${name:-$THEME_NAME}" "$theme" "$gcolor" "$size" "$ctype"
751753
done
752754
done
753755
done
190 KB
Loading
117 KB
Loading
218 KB
Loading
126 KB
Loading

src/assets/gnome-shell/background.svg

Lines changed: 457 additions & 0 deletions
Loading
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
#! /usr/bin/env bash
2+
3+
RENDER_SVG="$(command -v rendersvg)" || true
4+
INKSCAPE="$(command -v inkscape)" || true
5+
OPTIPNG="$(command -v optipng)" || true
6+
7+
for theme in '' '-purple' '-pink' '-red' '-orange' '-yellow' '-green' '-teal' '-blue'; do
8+
for type in '' '-nord'; do
9+
case "$theme" in
10+
'')
11+
theme_color_dark='#333333'
12+
theme_color_light='#e0e0e0'
13+
;;
14+
-purple)
15+
theme_color_dark='#AB47BC'
16+
theme_color_light='#BA68C8'
17+
;;
18+
-pink)
19+
theme_color_dark='#EC407A'
20+
theme_color_light='#F06292'
21+
;;
22+
-red)
23+
theme_color_dark='#E53935'
24+
theme_color_light='#F44336'
25+
;;
26+
-orange)
27+
theme_color_dark='#F57C00'
28+
theme_color_light='#FB8C00'
29+
;;
30+
-yellow)
31+
theme_color_dark='#FBC02D'
32+
theme_color_light='#FFD600'
33+
;;
34+
-green)
35+
theme_color_dark='#4CAF50'
36+
theme_color_light='#66BB6A'
37+
;;
38+
-teal)
39+
theme_color_dark='#009688'
40+
theme_color_light='#4DB6AC'
41+
;;
42+
-blue)
43+
theme_color_dark='#1A73E8'
44+
theme_color_light='#3281EA'
45+
;;
46+
esac
47+
48+
if [[ "$type" == '-nord' ]]; then
49+
case "$theme" in
50+
'')
51+
theme_color_dark='#434c5e'
52+
theme_color_light='#dbdee5'
53+
;;
54+
-purple)
55+
theme_color_dark='#b57daa'
56+
theme_color_light='#c89dbf'
57+
;;
58+
-pink)
59+
theme_color_dark='#cd7092'
60+
theme_color_light='#dc98b1'
61+
;;
62+
-red)
63+
theme_color_dark='#c35b65'
64+
theme_color_light='#d4878f'
65+
;;
66+
-orange)
67+
theme_color_dark='#d0846c'
68+
theme_color_light='#dca493'
69+
;;
70+
-yellow)
71+
theme_color_dark='#e4b558'
72+
theme_color_light='#eac985'
73+
;;
74+
-green)
75+
theme_color_dark='#82ac5d'
76+
theme_color_light='#a0c082'
77+
;;
78+
-teal)
79+
theme_color_dark='#63a6a5'
80+
theme_color_light='#83b9b8'
81+
;;
82+
-blue)
83+
theme_color_dark='#5e81ac'
84+
theme_color_light='#89a3c2'
85+
;;
86+
esac
87+
fi
88+
89+
if [[ "$type" != '' ]]; then
90+
rm -rf "theme${theme}${type}"
91+
cp -rf "theme" "theme${theme}${type}"
92+
sed -i "s/#333333/${theme_color_dark}/g" "theme${theme}${type}"/*.svg
93+
sed -i "s/#e0e0e0/${theme_color_light}/g" "theme${theme}${type}"/*.svg
94+
sed -i "s/#2c2c2c/#313744/g" "theme${theme}"/*.svg
95+
elif [[ "$theme" != '' ]]; then
96+
rm -rf "theme${theme}"
97+
cp -rf "theme" "theme${theme}"
98+
sed -i "s/#333333/${theme_color_dark}/g" "theme${theme}"/*.svg
99+
sed -i "s/#e0e0e0/${theme_color_light}/g" "theme${theme}"/*.svg
100+
101+
fi
102+
done
103+
done
104+
105+
for color in '-Light' '-Dark'; do
106+
for type in '' '-nord'; do
107+
echo "Rendering 'background pictures ...'"
108+
109+
if [[ -n "${RENDER_SVG}" ]]; then
110+
"$RENDER_SVG" --export-id "background${color}${type}" \
111+
--dpi 192 \
112+
--zoom 2 \
113+
background.svg "background${color}${type}.png"
114+
else
115+
"$INKSCAPE" --export-id="background${color}${type}" \
116+
--export-id-only \
117+
--export-dpi=192 \
118+
--export-filename="background${color}${type}.png" background.svg >/dev/null
119+
fi
120+
if [[ -n "${OPTIPNG}" ]]; then
121+
"$OPTIPNG" -o7 --quiet "background${color}${type}.png"
122+
fi
123+
done
124+
done
125+
126+
echo -e "DONE!"
Lines changed: 41 additions & 0 deletions
Loading
Lines changed: 41 additions & 0 deletions
Loading
Lines changed: 51 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)