-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·51 lines (38 loc) · 991 Bytes
/
setup.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
#!/usr/bin/env bash
set -euo pipefail
stderr() {
echo "${@}" 1>&2
}
fail() {
stderr "${1}"
stderr ""
stderr "Exiting …"
exit "${2:-1}"
}
readonly DOTFILES="${HOME}/git/lindhe/dotfiles"
while [[ ${ready:-x} != 'y' ]]; do
echo "Have you cloned dotfiles into ${DOTFILES}? (y/n)"
read -rn 1 ready
echo -e "\n"
done;
echo "Do you want a minimal setup? [Y/n]"
read -rn 1 yn
if [[ "${yn}" == [Nn]* ]]; then
readonly FULL_SETUP=y
else
readonly FULL_SETUP=n
fi
echo -e "\n"
./bootstrap.sh
if [[ "${FULL_SETUP}" == y ]]; then
pushd ~/.config
ln -fs "${DOTFILES}/.config/compton.conf" .
ln -fs "${DOTFILES}/.config/dunst/" .
ln -fs "${DOTFILES}/.config/i3" .
ln -fs "${DOTFILES}/.config/i3blocks/" .
ln -fs "${DOTFILES}/.config/monitors/" .
ln -fs "${DOTFILES}/.config/sway" .
popd
echo "Installing custom keyboard layouts"
sudo cp "${DOTFILES}/usr/share/X11/xkb/symbols"/* -t /usr/share/X11/xkb/symbols
fi