-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenelementconfig
executable file
·67 lines (58 loc) · 2.29 KB
/
genelementconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
# Generates element-desktop theme
. $HOME/.cache/wal/colors.sh
CONFIG=$HOME/.config/Element/config.json
PRE_WAL_CONFIG=$HOME/.config/Element/config_pre_wal.json
# copy config if it exists
if [[ -s $CONFIG ]]
then cp $CONFIG $PRE_WAL_CONFIG
else
echo "{}" > $PRE_WAL_CONFIG
fi
cat $PRE_WAL_CONFIG | \
# Delete Labs feature
jq \
'del(.showLabsSettings)' | \
# Remove older Wal theme
jq \
'del(.settingDefaults.custom_themes[]? | select(.name == "Wal"))' | \
# Add Labs feature back in
jq \
'. += {"showLabsSettings": true}' | \
# Add new Wal theme
jq \
'.settingDefaults.custom_themes += [{
"name": "Wal",
"is_dark": true,
"colors": {
"accent-color": "'"$foreground"'",
"accent": "'"$foreground"'",
"primary-color": "'"$color4"'",
"warning-color": "'"$color1"'",
"alert": "'"$color1"'",
"sidebar-color": "'"$background"'",
"roomlist-background-color": "'"$color1"'",
"roomlist-text-color": "'"$foreground"'",
"roomlist-text-secondary-color": "'"$color9"'",
"roomlist-highlights-color": "'"$color8"'",
"roomlist-separator-color": "'"$color5"'",
"timeline-background-color": "'"$background"'",
"timeline-text-color": "'"$foreground"'",
"timeline-text-secondary-color": "'"$foreground"'",
"timeline-highlights-color": "'"$color1"'",
"username-colors": ["'"$color0"'", "'"$color1"'", "'"$color2"'",
"'"$color3"'", "'"$color4"'", "'"$color5"'", "'"$color6"'",
"'"$color7"'"],
"avatar-background-colors": ["'"$color3"'", "'"$color4"'",
"'"$color5"'"],
"reaction-row-button-selected-bg-color": "'"$color4"'",
"menu-selected-color": "'"$color4"'",
"focus-bg-color": "'"$color4"'",
"room-highlight-color": "'"$color4"'",
"other-user-pill-bg-color": "'"$color4"'",
"icon-button-color": "'"$color6"'",
"togglesw-off-color": "'"$color4"'",
"secondary-content": "'"$foreground"'",
"tertiary-content": "'"$foreground"'"
}
}]'