forked from 0x90/kali-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkali-gnome.sh
executable file
·124 lines (106 loc) · 6.24 KB
/
kali-gnome.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/bash
#
# WARNING WARNING WARNING WARNING WARNING
#
# Run only under X11 sessions
#
# WARNING WARNING WARNING WARNING WARNING
. helper.sh
#TODO: check bugs with dconf, add check for X11 session
config_gnome(){
if ask "Do you want to change some Gnome 3 settings?" Y; then
if ask "Do you want to install some terminal changes and tweaks?" Y; then
gconftool-2 --type bool --set /apps/gnome-terminal/profiles/Default/scrollback_unlimited true #Terminal -> Edit -> Profile Preferences -> Scrolling -> Scrollback: Unlimited -> Close
gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/background_darkness 0.85611499999999996 # Not working 100%!
gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/background_type transparent
fi
#TODO: add check for X11 session
if ask "Enable real transparency?" Y; then
gsettings set org.gnome.metacity compositing-manager true
fi
if ask "Do you want to change Gnome pannel settings?" Y; then
gsettings set org.gnome.gnome-panel.layout toplevel-id-list "['top-panel']"
dconf write /org/gnome/gnome-panel/layout/objects/workspace-switcher/toplevel-id "'top-panel'"
dconf write /org/gnome/gnome-panel/layout/objects/window-list/toplevel-id "'top-panel'"
dconf write /org/gnome/gnome-panel/layout/toplevels/top-panel/orientation "'top'" #"'right'" # Issue with window-list
dconf write /org/gnome/gnome-panel/layout/objects/menu-bar/pack-type "'start'"
dconf write /org/gnome/gnome-panel/layout/objects/menu-bar/pack-index 0
dconf write /org/gnome/gnome-panel/layout/objects/window-list/pack-type "'start'" # "'center'"
dconf write /org/gnome/gnome-panel/layout/objects/window-list/pack-index 5 #0
dconf write /org/gnome/gnome-panel/layout/objects/workspace-switcher/pack-type "'end'"
dconf write /org/gnome/gnome-panel/layout/objects/clock/pack-type "'end'"
dconf write /org/gnome/gnome-panel/layout/objects/user-menu/pack-type "'end'"
dconf write /org/gnome/gnome-panel/layout/objects/notification-area/pack-type "'end'"
dconf write /org/gnome/gnome-panel/layout/objects/workspace-switcher/pack-index 1
dconf write /org/gnome/gnome-panel/layout/objects/clock/pack-index 2
dconf write /org/gnome/gnome-panel/layout/objects/user-menu/pack-index 3
dconf write /org/gnome/gnome-panel/layout/objects/notification-area/pack-index 4
fi
if ask "Enable Auto hide pannels?" N; then
dconf write /org/gnome/gnome-panel/layout/toplevels/top-panel/auto-hide true
fi
if ask "Add top 10 tools to toolbar?" Y; then
dconf load /org/gnome/gnome-panel/layout/objects/object-10-top/ << EOT
[instance-config]
menu-path='applications:/Kali/Top 10 Security Tools/'
tooltip='Top 10 Security Tools'
[/]
object-iid='PanelInternalFactory::MenuButton'
toplevel-id='top-panel'
pack-type='start'
pack-index=4
EOT
dconf write /org/gnome/gnome-panel/layout/object-id-list "$(dconf read /org/gnome/gnome-panel/layout/object-id-list | sed "s/]/, 'object-10-top']/")"
fi
if ask "Show desktop applet?" Y; then
dconf load /org/gnome/gnome-panel/layout/objects/object-show-desktop/ << EOT
[/]
object-iid='WnckletFactory::ShowDesktopApplet'
toplevel-id='top-panel'
pack-type='end'
pack-index=0
EOT
dconf write /org/gnome/gnome-panel/layout/object-id-list "$(dconf read /org/gnome/gnome-panel/layout/object-id-list | sed "s/]/, 'object-show-desktop']/")"
fi
if ask "Remove nasty notifications by installing notify-osd?" Y; then
apt-get install -y notify-osd
fi
if ask "Fix icon top 10 shortcut icon?" Y; then
convert /usr/share/icons/hicolor/48x48/apps/k.png -negate /usr/share/icons/hicolor/48x48/apps/k-invert.png
#/usr/share/icons/gnome/48x48/status/security-medium.png
fi
if ask "Enable only two workspaces" Y; then
gsettings set org.gnome.desktop.wm.preferences num-workspaces 2 #gconftool-2 --type int --set /apps/metacity/general/num_workspaces 2 #dconf write /org/gnome/gnome-panel/layout/objects/workspace-switcher/instance-config/num-rows 4
gsettings set org.gnome.shell.overrides dynamic-workspaces false
fi
if ask "Smaller title bar?" Y; then
#sed -i "/title_vertical_pad/s/value=\"[0-9]\{1,2\}\"/value=\"0\"/g" /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml
#sed -i 's/title_scale=".*"/title_scale="small"/g' /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml
gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Droid Bold 10' # 'Cantarell Bold 11'
gsettings set org.gnome.desktop.wm.preferences titlebar-uses-system-font false
fi
if ask "Hide desktop icon?" Y; then
dconf write /org/gnome/nautilus/desktop/computer-icon-visible false
fi
if ask "Restart GNOME panel to apply/take effect (Need to restart xserver)" Y; then
#killall gnome-panel && gnome-panel& #Still need to logoff!
mkdir -p ~/.config/gtk-2.0/
if [ -e ~/.config/gtk-2.0/gtkfilechooser.ini ]; then
sed -i 's/^.*ShowHidden.*/ShowHidden=true/' ~/.config/gtk-2.0/gtkfilechooser.ini;
else
echo -e "\n[Filechooser Settings]\nLocationMode=path-bar\nShowHidden=true\nExpandFolders=false\nShowSizeColumn=true\nGeometryX=66\nGeometryY=39\nGeometryWidth=780\nGeometryHeight=618\nSortColumn=name\nSortOrder=ascending" > ~/.config/gtk-2.0/gtkfilechooser.ini;
fi
fi
if ask "Show Hidden Files: Enabled?" Y; then
dconf write /org/gnome/nautilus/preferences/show-hidden-files true
fi
if ask "Add bookmarks?" N; then
if [ ! -e ~/.gtk-bookmarks.bkup ]; then
cp -f ~/.gtk-bookmarks{,.bkup};
fi
echo -e 'file:///var/www www\nfile:///usr/share apps\nfile:///tmp tmp\nfile:///usr/local/src/ src' >> ~/.gtk-bookmarks
#Places -> Location: {/usr/share,/var/www/,/tmp/, /usr/local/src/} -> Bookmarks -> Add bookmark
fi
fi
}
config_gnome