-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.sh
executable file
·32 lines (26 loc) · 947 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
#!/bin/bash
for i in $(ls -A); do
[ "README" != $i ] && ! [[ $i =~ ^skip- ]] && [ ".git" != $i ] && [[ $0 != *$i ]] && {
echo copying $i to ~
cp -r $i ~
}
done
if [[ "$OSTYPE" == "darwin"* ]]; then
# remove that annoying 'Last login..' msg
touch ~/.hushlogin
mkdir ~/bin || true
brew install $(cat skip-brew-stuff)
# annoying language indicator
sudo defaults write /Library/Preferences/FeatureFlags/Domain/UIKit.plist redesigned_text_cursor -dict-add Enabled -bool NO
else
# linux
gsettings set org.gnome.desktop.peripherals.keyboard repeat-interval 20
gsettings set org.gnome.desktop.peripherals.keyboard delay 300
fi
# gpg in .gitconfig
set -o pipefail
signingkey=$(gpg --list-secret-keys --keyid-format LONG | grep sec | head -1 | cut -d'/' -f2 | cut -d' ' -f1)
code=$?
[[ "$code" -eq 0 ]] && sed -i'' -e "s;\(signingkey = \).*;\1$signingkey;g" ~/.gitconfig
set +o pipefail
#cp -r .dotfiles ~/.dotfiles