-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·100 lines (76 loc) · 3.13 KB
/
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
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
#!/usr/bin/env bash
# brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
sudo chgrp -R admin $(brew --prefix)/*
sudo chmod -R g+w $(brew --prefix)/*
# allow admins to homebrew's local cache of formulae and source files
if [ -e /Library/Caches/Homebrew ]; then
sudo chgrp -R admin /Library/Caches/Homebrew
sudo chmod -R g+w /Library/Caches/Homebrew
fi
# ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# install fzf-tab
git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab
# Install remaining software via brew bundle
brew bundle
# Stow configs
stow --adopt $(\ls -d */)
git restore .
# bat theme
bat cache --build
# neovim
# install packer
git clone --depth 1 https://github.com/wbthomason/packer.nvim "${HOME}/.local/share/nvim/site/pack/packer/start/packer.nvim"
# Links
cd "${HOME}"
ln -s "${HOME}/Library/Mobile Documents/com~apple~CloudDocs" iCloudDrive
ln -s "iCloudDrive/etc/.zsh-history"
cd -
# Defaults
# Finder
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.finder AppleShowAllFiles -bool true
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder FXPreferredViewStyle -string Nlsv
defaults write com.apple.finder _FXSortFoldersFirst -bool true
defaults write com.apple.finder FXRemoveOldTrashItems -bool true
defaults write NSGlobalDomain NSToolbarTitleViewRolloverDelay -float 0
# disable .ds_store file creation
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
killall Finder
# Keyrepeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
defaults write -g KeyRepeat -int 1
defaults write -g InitialKeyRepeat -int 10
# Dock
# defaults write com.apple.dock tilesize -float 42
# defaults write com.apple.dock mineffect scale
# defaults write com.apple.dock magnification -bool false
# defaults write com.apple.dock autohide -bool true
# defaults write com.apple.dock autohide-time-modifier -float 0.12
# defaults write com.apple.Dock autohide-delay -float 0.05
# defaults write com.apple.dock mru-spaces -bool false
defaults delete com.apple.dock
defaults import com.apple.dock "$(pwd)/com.apple.dock.plist"
killall Dock
# Menubar
# Date & Time
defaults write com.apple.menuextra.clock ShowDate -int 1
defaults write com.apple.menuextra.clock Show24Hour -int 1
defaults write com.apple.menuextra.clock ShowDayOfWeek -int 1
# Xcode
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool true
# Keyboard
# german nodeadkeys
defaults delete com.apple.HIToolbox
defaults import com.apple.HIToolbox "$(pwd)/com.apple.HIToolbox.plist"
# Preferences
cp com.lwouis.alt-tab-macos.plist ~/Library/Preferences/
cp com.crowdcafe.windowmagnet.plist ~/Library/Preferences/
cp me.guillaumeb.MonitorControl.plist ~/Library/Preferences/
# Reboot