-
Notifications
You must be signed in to change notification settings - Fork 16
/
.restoreFluxbox.sh
executable file
·82 lines (71 loc) · 3.05 KB
/
.restoreFluxbox.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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh
# curl https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.restoreFluxbox.sh | sh
# if [ "`find /var/log/packages/ -name tinyterm-*`" ]; then
# ## tinyterm
# sed -i.bak 's/^Mod1 F1 :Exec xterm/Mod1 F1 :Exec tinyterm\
# /g' ~/.fluxbox/keys
# else
# ## uxterm
# sed -i.bak 's/^Mod1 F1 :Exec xterm/Mod1 F1 :Exec uxterm -rv -geometry 130x30\
# /g' ~/.fluxbox/keys
# fi
## add additional audio keys, verify with xev
sed -i.bak 's@^176 :Exec amixer sset.*@123 :Exec pamixer -i 5\
176 :Exec pamixer -i 5@g' ~/.fluxbox/keys
sed -i.bak 's@^174 :Exec amixer sset.*@122 :Exec pamixer -d 5\
174 :Exec pamixer -d 5@g' ~/.fluxbox/keys
sed -i.bak 's@^160 :Exec amixer sset.*@121 :Exec pamixer -t\
160 :Exec pamixer -t@g' ~/.fluxbox/keys
## fix brightness keys
if [ -z "$(grep '232 :Exec' ~/.fluxbox/keys)" ]; then
echo >> ~/.fluxbox/keys
echo "232 :Exec xbacklight -dec 10" >> ~/.fluxbox/keys
echo "233 :Exec xbacklight -inc 10" >> ~/.fluxbox/keys
fi
if [ -z "$(grep 'Print :Exec' ~/.fluxbox/keys)" ]; then
echo 'Print :Exec import screenshot_$(date +%F__%H-%M-%S-%3N).png' >> ~/.fluxbox/keys
fi
sed -i.bak 's@^# idesk &@\
if [ -x /etc/rc.d/rc.networkmanager ]; then \
nm-applet \&\
fi \
if [ -e /usr/bin/compton ]; then \
compton \&\
fi \
gkrellm \&\
fbsetbg -l\
@g' ~/.fluxbox/startup
## grey is the new pink, uncomment to set bg
#fbsetbg -b -solid grey
## idempotent, finally!
if [ -z "$(grep workspaceNames ~/.fluxbox/init)" ]; then
echo "session.screen0.workspaceNames: 1,2,3,4," >> ~/.fluxbox/init
echo "session.screen0.toolbar.widthPercent: 50" >> ~/.fluxbox/init
echo "session.screen0.workspacewarping: false" >> ~/.fluxbox/init
# echo "session.screen0.focusModel: MouseFocus" >> ~/.fluxbox/init
# echo "session.autoRaiseDelay: 500" >> ~/.fluxbox/init
else
sed -i.bak "[email protected]:.*@session.screen0.workspaceNames: 1,2,3,4,@g" ~/.fluxbox/init
sed -i.bak "[email protected]:.*@session.screen0.toolbar.widthPercent: 50@g" ~/.fluxbox/init
sed -i.bak "[email protected]:.*@session.screen0.workspacewarping: false@g" ~/.fluxbox/init
# sed -i.bak "[email protected]:.*@session.screen0.focusModel: MouseFocus@g" ~/.fluxbox/init
# sed -i.bak "[email protected]:.*@session.autoRaiseDelay: 500@g" ~/.fluxbox/init
fi
if [ -d "/usr/share/fluxbox/styles/Stealthy" ]; then
sed -i.bak "[email protected]:.*@session.styleFile: /usr/share/fluxbox/styles/Stealthy@g" ~/.fluxbox/init
else
mkdir -pv ~/.fluxbox/styles/
wget -N https://github.com/ryanpcmcquen/themes/raw/master/67966-Stealthy-1.1.tgz -P ~/
tar xvf ~/67966-Stealthy-1.1.tgz -C ~/.fluxbox/styles/
rm -v ~/67966-Stealthy-1.1.tgz
sed -i.bak "[email protected]:.*@session.styleFile: /home/ry/.fluxbox/styles/Stealthy@g" ~/.fluxbox/init
fi
## make the cursor beautiful, maybe icons too
mkdir -pv ~/.icons/
if [ ! -e ~/.icons/default ]; then
if [ -d "/usr/share/icons/Oxygen_Zion/" ]; then
ln -sfv /usr/share/icons/Oxygen_Zion/ ~/.icons/default
else
ln -sfv /usr/share/icons/nuvola/ ~/.icons/default
fi
fi