-
Notifications
You must be signed in to change notification settings - Fork 42
/
test.sh
executable file
·26 lines (20 loc) · 875 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# You need to global.context.unsafe_mode = true in looking glass
old=$(gnome-extensions list | grep -e '-switcher@landau.fi')
d=$RANDOM-switcher@landau.fi
sed -i'.bak' -e "s/switcher@landau.fi/$d/" metadata.json
sed -i'.bak' -e "s/switcher@landau.fi/$d/" prefs.js
sed -i'.bak' -e "s/switcher@landau.fi/$d/" convenience.js
./build.sh
zip=$(readlink -f switcher.zip)
mv metadata.json.bak metadata.json
mv prefs.js.bak prefs.js
mv convenience.js.bak convenience.js
gnome-extensions install $zip
busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s "Main.extensionManager.loadExtension(Main.extensionManager.createExtensionObject('$d', Gio.File.new_for_path('/home/dlandau/.local/share/gnome-shell/extensions/$d' ), 2))"
if [[ -n $old ]]
then
gnome-extensions disable $old
gnome-extensions uninstall $old
fi
gnome-extensions enable $d