forked from chenxiaolong/Unity-for-Arch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompiz.reset
45 lines (37 loc) · 1.16 KB
/
compiz.reset
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
#!/bin/bash
# Reset all of Compiz's settings for the current user
echo "This will reset all of Compiz's settings. Continue only if you know exactly"
echo "what is being done."
echo ""
echo "This program will:"
echo " 1. Switch to the metacity window manager"
echo " 2. Remove Compiz's configuration directories"
echo " 3. Reset Compiz's dconf/GSettings settings"
echo
read -p "Continue (y/N) " PROCEED
if [ "x${PROCEED}" == "xy" ] || [ "x${PROCEED}" == "xY" ]; then
echo
# Start metacity
echo -n "Switching to the metacity window manager..."
metacity --replace &>/dev/null &
echo "DONE"
# Wait for Compiz to exit
echo -n "Waiting for Compiz to exit..."
while $(pgrep compiz$ &>/dev/null); do
sleep 0.1
done
echo "DONE"
# Remove Compiz's configuration directories
echo -n "Removing Compiz's configuration directories..."
rm -rf ~/.compiz/
rm -rf ~/.compiz-1/
rm -rf ~/.cache/compizconfig-1/
rm -rf ~/.config/compiz-1/
echo "DONE"
echo -n "Resetting Compiz's dconf/GSettings settings..."
dconf reset -f /org/compiz/
echo "DONE"
echo
echo "Please log out and log back in. To log out, run:"
echo " gnome-session-quit --logout"
fi