-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstall.sh
157 lines (137 loc) Β· 3.51 KB
/
install.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#!/bin/sh
set -e
PACKAGES="awesome-git picom-git redshift kitty rofi xclip xorg-xwininfo scrot ttf-jetbrains-mono-nerd noto-fonts noto-fonts-cjk networkmanager betterlockscreen brightnessctl acpi zsh gvfs gvfs-mtp thunar lsd zoxide bat lxappearance jq curl p7zip sxiv"
if [ -t 1 ]; then
is_tty() {
true
}
else
is_tty() {
false
}
fi
setup_color() {
if ! is_tty; then
# Reset
Normal=''
# Regular Colors
Black=''
Red=''
Green=''
Yellow=''
Blue=''
Purple=''
Cyan=''
White=''
# Bold
BBlack=''
BRed=''
BGreen=''
BYellow=''
BBlue=''
BPurple=''
BCyan=''
BWhite=''
# Undeline
UBlack=''
URed=''
UGreen=''
UYellow=''
UBlue=''
UPurple=''
UCyan=''
UWhite=''
# Background
On_Black=''
On_Red=''
On_Green=''
On_Yellow=''
On_Blue=''
On_Purple=''
On_Cyan=''
On_White=''
return
fi
# Reset
Normal='\033[0m'
# Regular Colors
Black='\033[0;30m'
Red='\033[0;31m'
Green='\033[0;32m'
Yellow='\033[0;33m'
Blue='\033[0;34m'
Purple='\033[0;35m'
Cyan='\033[0;36m'
White='\033[0;37m'
# Bold
BBlack='\033[1;30m'
BRed='\033[1;31m'
BGreen='\033[1;32m'
BYellow='\033[1;33m'
BBlue='\033[1;34m'
BPurple='\033[1;35m'
BCyan='\033[1;36m'
BWhite='\033[1;37m'
# Underline
UBlack='\033[4;30m'
URed='\033[4;31m'
UGreen='\033[4;32m'
UYellow='\033[4;33m'
UBlue='\033[4;34m'
UPurple='\033[4;35m'
UCyan='\033[4;36m'
UWhite='\033[4;37m'
# Background
On_Black='\033[40m'
On_Red='\033[41m'
On_Green='\033[42m'
On_Yellow='\033[43m'
On_Blue='\033[44m'
On_Purple='\033[45m'
On_Cyan='\033[46m'
On_White='\033[47m'
}
print_style() {
printf "%s$*${Normal}\n"
}
error() {
print_style "${Red}err: $*"
exit 1
}
setup_policromia() {
print_style ${Yellow} "downloading and installing packages"
sudo pacman -Syy
paru -S ${PACKAGES}
cd /tmp
print_style ${Yellow} "cloning policromia"
git clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/mdmrk/policromia
cd policromia
print_style ${Yellow} "installing"
mkdir -p ~/.config/awesome && cp -r config/awesome/* ~/.config/awesome
cp ~/.config/awesome/env.example.lua ~/.config/awesome/env.lua
mkdir -p ~/.config/picom && cp -r config/picom/* ~/.config/picom
mkdir -p ~/.config/kitty && cp -r config/kitty/* ~/.config/kitty
mkdir -p ~/.config/rofi && cp -r config/rofi/* ~/.config/rofi
mkdir -p ~/.local/share/fonts && cp -r fonts/* ~/.local/share/fonts
mkdir -p ~/.themes && 7z x config/gtk/themes.7z -oconfig/gtk && rm config/gtk/themes.7z && cp -r config/gtk/* ~/.themes
chmod +x ~/.config/awesome/scripts/*.sh
print_style ${BYellow} "installation complete"
print_success
}
print_title() {
print_style "${Yellow} βββΒ· βββ βͺ ββΒ· βββ β’ β β Β·. βͺ βββΒ· "
print_style "${Yellow}ββ βββͺ βββ’ ββ ββ ββͺββ βΒ·βͺ Β·ββ βββββͺββ ββ ββ "
print_style "${Yellow} βββΒ· ββββ βββͺ ββΒ·ββ ββββββ ββββ ββ βββββΒ·ββΒ·βββββ "
print_style "${Yellow}βββͺΒ·β’βββ.ββββββββββββββββββ’βββββ.ββββ βββββββββββ βͺββ"
print_style "${Yellow}.β βββββͺ.βββ βββΒ·βββ .β β βββββͺββ ββͺββββββ β β "
}
print_success() {
print_style "${Green}success!"
print_style "${UGreen}rebooting is recommended"
}
main() {
setup_color
print_title
setup_policromia # Main workflow
}
main "$@"