-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall
executable file
·43 lines (34 loc) · 1003 Bytes
/
install
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
#!/bin/bash
schemas_dir=$HOME/.local/share/glib-2.0/schemas/
extension_dir=$HOME/.local/share/gnome-shell/extensions/$uuid
schemas_name=org.gnome.shell.extensions.pickawindow.gschema.xml
function red() {
printf "\033[31m%s\033[0m" "$@"
}
function green() {
printf "\033[32m%s\033[0m" "$@"
}
function run() {
echo "$(green [run]) $*"
$@
if [ "$?" != "0" ]; then
echo "$(red [err]) $@"
exit 1
fi
}
cd $(dirname $0)
[ -f ${uuid}.shell-extension.zip ] && \
run rm ${uuid}.shell-extension.zip
[ -d $extension_dir ] && \
run rm -r $extension_dir
run gnome-extensions pack $uuid
run gnome-extensions install --force ${uuid}.shell-extension.zip
run mkdir -p $schemas_dir
run ln -sf $extension_dir/schemas/$schemas_name $schemas_dir
run glib-compile-schemas $schemas_dir
run gsettings set org.gnome.shell disable-user-extensions false
echo
echo $(green \
'Relogin into session and use `gjs dist/mutter_settings.js` to change settings' \
)