-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.bash
executable file
·110 lines (78 loc) · 2.98 KB
/
main.bash
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
#!/bin/bash
# exit on error
set -e
# start of script logging
echo "Switching your gnome DE theme to a macOS-like look :)"
# params souring logging
echo "loading script parameters..."
# source script params
source ./params.bash
# windows button logging
echo "adding closing, maximizing and minimzing buttons to windows..."
# windows button config
dconf write $WINDOWS_BUTTONS_KEY "'$WINDOWS_ALL_BUTTONS'"
# theme logging
echo "downloading and installing appearance theme..."
# create user themes directory, also works if already exist because of the -p fleg
mkdir -p ~/.themes
# change current directory to user themes directory
cd ~/.themes
# download theme xz compressed file
wget -q $THEME_URL
# xz decompress file
xz -d `basename $THEME_URL`
# untar the directory
tar -xf `basename $THEME_URL | cut -d "." -f 1,2`
# change gnome desktop theme configuration
dconf write $THEME_KEY "'$THEME_NAME'"
# icons logging
echo "downloading and installing icons..."
# create user icons directory, also works if already exist because of the -p fleg
mkdir -p ~/.icons
# change current directory to user icons directory
cd ~/.icons
# git cloning the icons repo from github
git clone --quiet $ICONS_REPO_URL
# change gnome desktop icons configuration
dconf write $ICONS_KEY "'$ICONS_NAME'"
# logging fonts
echo "downloading and installing fonts..."
# create user fonts directory, also works if already exist because of the -p fleg
mkdir -p ~/.fonts
# change current directory to user fonts directory
cd ~/.fonts
# download San Francisco font
wget -q "$FONT_URL" -O $FONT_FILE_NAME
# save interface font size
INTERFACE_FONT_SIZE=`echo /org/gnome/desktop/interface/font-name | rev | cut -d " " -f 1 | rev` &&
# save window title font size
WINDOW_TITLE_FONT_SIZE=`echo /org/gnome/desktop/wm/preferences/titlebar-font | rev | cut -d " " -f 1 | rev` &&
# config interface font
dconf write $WINDOW_TITLE_FONT_KEY "'$FONT_NAME $INTERFACE_FONT_SIZE'" &&
# config window title font
dconf write $WINDOW_TITLE_FONT_KEY "'$FONT_NAME $WINDOW_TITLE_FONT_SIZE'" &&
# dash to dock extension logging
echo "downloading and installing dash-to-dock extension..." &&
# create user extensions directory, also works if already exist because of the -p fleg
mkdir -p ~/.extensions
# change current directory to user extensions directory
cd ~/.extensions
# git cloning the dash repo from github
git clone --quiet $DASH_REPO_URL
# change current directory to dash extension repo directory
cd `basename $DASH_REPO_URL | cut -d "." -f 1`
make > /dev/null
make install > /dev/null
# get extensions list
EXTENSIONS=`dconf read $EXTENSIONS_KEY`
if [[ $EXTENSIONS == *"$EXTENSION_NAME"* ]];
then
echo "dash extension is already on, so we are done"
else
# enabling the dash extension
gnome-extensions enable $EXTENSION_NAME
# describing to user what he needs to choose in the prefs window
echo "Select position 'Bottom' and you are done."
# open extension prefs window
gnome-extensions prefs $EXTENSION_NAME
fi