curl -s https://raw.githubusercontent.com/maptv/setup/main/scripts/setup.sh | /bin/bash
MacOS is UNIX-based, unlike Windows, though Windows Subsystem for Linux (WSL) is a really big step forward.
The Command key is used for MacOS keyboard shortcuts, limiting conflicts with Unix shortcuts that use Alt/Option or Control.
The best option would be to install Linux on a Mac and configure the modifier keys (Cmd/Alt/Ctrl) to work like in MacOS, but who has time for that?
curl https://raw.githubusercontent.com/maptv/setup/main/macos.terminal -o ~/macos.terminal
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
echo A | softwareupdate --install-rosetta
defaults write -g KeyRepeat -int 1
defaults write -g InitialKeyRepeat -int 20
defaults write -g ApplePressAndHoldEnabled -bool false
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false # For VS Code
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider
defaults write com.visualstudio.code.oss ApplePressAndHoldEnabled -bool false # For VS Codium
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
defaults write NSGlobalDomain com.apple.trackpad.scaling -float 3
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write com.apple.notificationcenterui bannerTime 1
defaults write com.apple.dock persistent-apps -array
defaults write com.apple.dock static-only -bool true
defaults write com.apple.dock autohide -bool true
defaults write com.apple.Dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
defaults write com.apple.dock launchanim -bool false
Make Dock icons of hidden applications translucent
defaults write com.apple.dock showhidden -bool true
defaults write com.apple.dock show-recents -bool false
defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
defaults write com.apple.dock show-process-indicators -bool true
sudo nvram SystemAudioVolume=" "
defaults write "Apple Global Domain" com.apple.sound.uiaudio.enabled -int 0
defaults write com.apple.systemsound com.apple.sound.uiaudio.enabled -bool false
defaults write NSGlobalDomain com.apple.sound.beep.feedback -bool false
defaults write NSGlobalDomain com.apple.sound.beep.flash -bool false
defaults write com.apple.systemuiserver menuExtras -array
"/System/Library/CoreServices/Menu Extras/AirPort.menu"
"/System/Library/CoreServices/Menu Extras/Bluetooth.menu"
"/System/Library/CoreServices/Menu Extras/Displays.menu"
"/System/Library/CoreServices/Menu Extras/Volume.menu"
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.finder ShowPathbar -bool true
defaults write com.apple.finder _FXSortFoldersFirst -bool true
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
defaults write NSGlobalDomain com.apple.springing.enabled -bool true
defaults write NSGlobalDomain com.apple.springing.delay -float 0
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
defaults write com.apple.finder WarnOnEmptyTrash -bool false
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 3
defaults write com.apple.finder QuitMenuItem -bool true
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144
defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 20
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
defaults write NSGlobalDomain _HIHideMenuBar -bool true
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
defaults write NSGlobalDomain AppleMetricUnits -bool true
sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true
defaults write com.apple.screencapture disable-shadow -bool true
defaults write com.apple.dock expose-animation-duration -float 0.1
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2
defaults write com.apple.LaunchServices LSQuarantine -bool false
defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true
defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null
killall Finder
killall Dock
Download keyboard layout and icon files undead.keylayout
and undead.icns
to /Library/Keyboard Layouts/
sudo curl https://raw.githubusercontent.com/maptv/setup/main/undead.icns -o /Library/Keyboard\ Layouts/undead.icns
sudo curl https://raw.githubusercontent.com/maptv/setup/main/undead.keylayout -o /Library/Keyboard\ Layouts/undead.layout
curl https://raw.githubusercontent.com/maptv/setup/main/DefaultKeyBinding.dict -o ~/Library/KeyBindings/DefaultKeyBinding.dict --create-dirs
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
git config --global user.email [email protected]
curl https://raw.githubusercontent.com/maptv/setup/main/Brewfile -o ~/.Brewfile
brew bundle install --file ~/.Brewfile
model=$(sysctl hw.model | cut -d\ -f2)
yes y | ssh-keygen -t ed25519 -f ~/.ssh/$(whoami)$model -C $(whoami)$model -N ''
ssh-add ~/.ssh/$(whoami)_$model
cat ~/.ssh/$(whoami)_$model.pub | pbcopy
echo "Host *\n\tIdentityFile ~/.ssh/$(whoami)_$model" >> ~/.ssh/config
git clone --depth 1 https://github.com/maptv/ewka ~/maptv/ewka
cp ~/maptv/ewka/nerd/* ~/Library/Fonts
duti -s com.neovide.neovide txt all
duti -s org.jupyter.jupyterlab-desktop ipynb all
curl https://raw.githubusercontent.com/maptv/setup/main/init.lua -o ~/.hammerspoon/init.lua --create-dirs
curl https://raw.githubusercontent.com/miromannino/miro-windows-manager/master/MiroWindowsManager.spoon.zip | tar -xf - -C ~/.hammerspoon/Spoons
curl https://raw.githubusercontent.com/maptv/setup/main/MiroWindowsManager.lua -o ~/.hammerspoon/Spoons/MiroWindowsManager.spoon/init.lua --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/alacritty.yml -o ~/.config/alacritty/alacritty.yml --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/kitty.conf -o ~/.config/kitty/kitty.conf --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/.hyper.js -o ~/.hyper.js --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/config.yaml -o ~/Library/Application\ Support/tabby/config.yaml --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/com.googlecode.iterm2.plist -o ~/Library/Preferences/com.googlecode.iterm2.plist
curl https://raw.githubusercontent.com/maptv/setup/main/karabiner.json -o ~/.config/karabiner/karabiner.json --create-dirs
mkdir -p ~/.vim/undodir
mkdir -p ~/.local/share/nvim/undo
Install fzf key bindings and fuzzy completion using the install script which runs the commented out code below
/opt/homebrew/opt/fzf/install --completion --key-bindings --no-fish --no-update-rc
curl https://raw.githubusercontent.com/maptv/setup/main/.bash_profile -o ~/.bash_profile
curl https://raw.githubusercontent.com/maptv/setup/main/.inputrc -o ~/.inputrc
curl https://raw.githubusercontent.com/maptv/setup/main/.zshrc -o ~/.zshrc
curl https://raw.githubusercontent.com/maptv/setup/main/.p10k.zsh -o ~/.p10k.zsh
curl https://raw.githubusercontent.com/maptv/setup/main/.gitconfig -o ~/.gitconfig
curl https://gist.githubusercontent.com/tekin/12500956bd56784728e490d8cef9cb81/raw/e474af61231687b0e1a4ec59d4becd97537ef6c0/.gitattributes -o ~/.gitattributes
curl https://raw.githubusercontent.com/maptv/setup/main/.gitignore -o ~/.gitignore
curl https://raw.githubusercontent.com/maptv/setup/main/.vimrc -o ~/.vimrc
curl https://raw.githubusercontent.com/maptv/setup/main/all.snippets -o ~/.config/coc/ultisnips/all.snippets --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/init.vim -o ~/.config/nvim/init.vim --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/init.vim -o ~/.config/page/init.vim --create-dirs
echo 'let g:better_whitespace_enabled=0' >> ~/.config/page/init.vim
curl https://raw.githubusercontent.com/maptv/setup/main/ginit.vim -o ~/.config/nvim/ginit.vim --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/coc-settings.json -o ~/.config/nvim/coc-settings.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/coc-settings.json -o ~/.vim/coc-settings.json --create-dirs
git clone --depth 1 https://github.com/SpaceVim/SpaceVim.git ~/.SpaceVim
curl https://raw.githubusercontent.com/maptv/setup/main/spacevim/init.toml -o ~/.SpaceVim.d/init.toml --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/spacevim/myspacevim.vim -o ~/.SpaceVim.d/autoload/myspacevim.vim --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/zed.json -o ~/.config/zed/settings.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/.ideavimrc -o ~/.ideavimrc
curl https://raw.githubusercontent.com/gpakosz/.tmux/master/.tmux.conf -o ~/.tmux.conf
curl https://raw.githubusercontent.com/maptv/setup/main/.tmux.conf.local -o ~/.tmux.conf.local
git clone --depth 1 https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
curl https://raw.githubusercontent.com/maptv/setup/main/ipython_config.py -o ~/.ipython/profile_default/ipython_config.py --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/keybindings.py -o ~/.ipython/profile_default/startup/keybindings.py --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/config.py -o ~/Library/Application\ Support/ptpython/config.py --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/.radian_profile -o ~/.radian_profile
ln -sf .radian_profile radian_profile.R
curl https://raw.githubusercontent.com/maptv/setup/main/bottom.toml -o ~/.config/bottom/bottom.toml --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/tabnine_config.json -o ~/.config/TabNine/tabnine_config.json --create-dirs
/opt/homebrew/Caskroom/miniforge/base/bin/mamba install -yc conda-forge python neovim
/opt/homebrew/Caskroom/miniforge/base/bin/mamba create -yc conda-forge -n py python neovim jupyterlab jupyterlab_vim jupyter-cache joblib seaborn numpy pandas scikit-learn scipy
/opt/homebrew/Caskroom/miniforge/base/envs/py/bin/python -m pip install jupyterlab-quarto radian
curl https://raw.githubusercontent.com/maptv/setup/main/shortcuts.jupyterlab-settings -o ~/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/vimrc.jupyterlab-settings -o ~/.jupyter/lab/user-settings/jupyterlab-vimrc/vimrc.jupyterlab-settings --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/settings.zip -o ~/settings.zip
curl https://raw.githubusercontent.com/maptv/setup/main/rstudio-prefs.json -o ~/.config/rstudio/rstudio-prefs.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/editor_bindings.json -o ~/.config/rstudio/keybindings/editor_bindings.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/rstudio_bindings.json -o ~/.config/rstudio/keybindings/rstudio_bindings.json --create-dirs
/opt/homebrew/bin/mamba init zsh
curl https://raw.githubusercontent.com/maptv/setup/main/settings.json -o ~/Library/Application\ Support/Code/User/settings.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/settings.json -o ~/Library/Application\ Support/VSCodium/User/settings.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/settings.json -o ~/Library/Application\ Support/Positron/User/settings.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/keybindings.json -o ~/Library/Application\ Support/Code/User/keybindings.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/keybindings.json -o ~/Library/Application\ Support/VSCodium/User/keybindings.json --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/keybindings.json -o ~/Library/Application\ Support/Positron/User/keybindings.json --create-dirs
yes n | bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)
curl https://raw.githubusercontent.com/maptv/setup/main/config.lua -o ~/.config/lvim/config.lua --create-dirs
git clone --depth 1 https://github.com/whjvenyl/fasd.git whjvenyl/fasd && cd whjvenyl/fasd && sudo make install && cd
touch ~/bibliography.bib
rm -rf ~/.emacs.d
git clone --depth 1 https://github.com/syl20bnr/spacemacs ~/.emacs.d
curl https://raw.githubusercontent.com/maptv/setup/main/.spacemacs -o ~/.spacemacs
/opt/homebrew/bin/emacs --no-window-system --daemon --no-init-file --load ~/.emacs.d/init.el
export DOOMDIR=$HOME/.config/doom
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.config/emacs/
curl https://raw.githubusercontent.com/maptv/setup/main/config.el -o ~/.config/doom/config.el --create-dirs
curl https://raw.githubusercontent.com/maptv/setup/main/packages.el -o ~/.config/doom/packages.el
yes y | ~/.config/emacs/bin/doom install
~/.config/emacs/bin/doom sync