-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
50 lines (39 loc) · 1.21 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
#!/usr/bin/env bash
#
# QaD installer
set -eEuo pipefail
SRC="$( cd -P "$(dirname -- "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd )"
# check if SIP is enabled
if command -v csrutil 2> /dev/null; then
csrutil status
# TODO if enabled show link to Yabai SIP doc
echo Some functionality is not available unless you disable SIP
echo https://github.com/koekeishiya/yabai/wiki/Disabling-System-Integrity-Protection
fi
# put scripts in path
for script in "$SRC"/bin/* ; do
script_name="$(basename "$script")"
if [ -d "$HOME/bin" ] ; then
ln -svi "$script" "$HOME/bin/$script_name"
else
sudo ln -svi "$script" "/usr/local/bin/$script_name"
fi
done
# dir for output of skhd_parse.py
[ -d "$HOME/.cache/skhd" ] || mkdir -p "$HOME/.cache/skhd"
# setup config files
[ -d "$HOME/.config" ] || mkdir -p "$HOME/.config"
for i in "$SRC"/config/* ; do
ln -svi "$i" "$HOME/.config/$(basename "$i")"
done
# set username in Alacritty config
sed -i '.bak' -e "s/USERNAME_GOES_HERE/${USER}/" "$HOME/.config/alacritty/alacritty.yml"
# tweaks
source "${SRC}/macos"
if [ -r "${SRC}/Brewfile" ]; then
cd "${SRC}" && brew bundle
fi
brew services start yabai
brew services start skhd
brew services start spacebar
echo "good luck!"