macOS: Set keyboard repeat rate and install only required powerline font
This commit is contained in:
parent
6ae2f935ca
commit
74846cc1df
|
@ -33,7 +33,7 @@ ln -sf $ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme $ZSH_CUSTOM/theme
|
|||
|
||||
zsh_path=$(which zsh)
|
||||
if ! grep $zsh_path /etc/shells; then
|
||||
echo $zsh_path | sudo tee /etc/shells
|
||||
echo $zsh_path | sudo tee -a /etc/shells
|
||||
fi
|
||||
|
||||
if [ $SHELL != $zsh_path ]; then
|
||||
|
|
26
setup-osx.sh
26
setup-osx.sh
|
@ -10,6 +10,7 @@ fi
|
|||
|
||||
|
||||
brew tap caskroom/cask
|
||||
brew tap caskroom/versions
|
||||
brew tap jlhonora/lsusb
|
||||
|
||||
brew update
|
||||
|
@ -49,10 +50,7 @@ brew install --with-nghttp2 --with-libssh2 curl
|
|||
# force-link keg-only formulas
|
||||
brew link --force unzip sqlite curl
|
||||
|
||||
|
||||
# brew cask
|
||||
brew tap caskroom/versions
|
||||
|
||||
# GUI applications
|
||||
brew cask install qlmarkdown quicklook-json
|
||||
brew cask install blender
|
||||
brew cask install wireshark
|
||||
|
@ -64,6 +62,9 @@ brew cask install insomniax
|
|||
brew cask install franz
|
||||
brew cask install bettertouchtool || true
|
||||
|
||||
# Install terminal font
|
||||
brew install homebrew/cask-fonts/font-roboto-mono-for-powerline
|
||||
|
||||
# clean up
|
||||
brew cleanup -s --prune=0
|
||||
|
||||
|
@ -71,11 +72,8 @@ brew cleanup -s --prune=0
|
|||
mkdir -p $HOME/Library/Python/2.7/lib/python/site-packages
|
||||
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> $HOME/Library/Python/2.7/lib/python/site-packages/homebrew.pth
|
||||
|
||||
echo '/usr/local/bin/bash' | sudo tee -a /etc/shells
|
||||
sudo chsh -s /usr/local/bin/bash $USER
|
||||
|
||||
if hash xcode-select > /dev/null; then
|
||||
xcode-select --install || echo
|
||||
xcode-select --install || echo
|
||||
fi
|
||||
|
||||
# Install rust[up] and cargo
|
||||
|
@ -91,6 +89,10 @@ defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
|
|||
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
|
||||
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
|
||||
|
||||
# Make keyboard repeat faster
|
||||
defaults write -g InitialKeyRepeat -int 12
|
||||
defaults write -g KeyRepeat -int 1
|
||||
|
||||
# Automatically loads keys into ssh-agent
|
||||
mkdir -p ~/.ssh
|
||||
cat >> ~/.ssh/config <<EOF
|
||||
|
@ -100,13 +102,5 @@ Host *
|
|||
IdentityFile ~/.ssh/id_rsa
|
||||
EOF
|
||||
|
||||
# Install powerline fonts for zsh
|
||||
tmpdir=$(mktemp -d)
|
||||
git clone --depth=1 https://github.com/powerline/fonts.git "$tmpdir"
|
||||
pushd "$tmpdir"
|
||||
./install.sh
|
||||
popd
|
||||
|
||||
|
||||
source ./common.sh
|
||||
cp -av files/.zsh_platform_darwin $HOME/.zsh_platform
|
||||
|
|
Reference in a new issue