#!/bin/bash set -e if [ ! -e /Library/Apple/usr/libexec/oah/RosettaLinux/rosetta ]; then echo ' init.kataba.me Phase 1' echo 'Please type following command to install Rosetta2' echo 'sudo softwareupdate --install-rosetta' exit 1 fi if [ ! -e /opt/homebrew/bin/brew ]; then echo ' init.kataba.me Phase 2' echo 'Please follow instructions to install brew' curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh > ~/brew.sh chmod +x ~/brew.sh NONINTERACTIVE=1 ~/brew.sh rm ~/brew.sh exit 1 else echo ' init.kataba.me Phase 3' brew_formulae=(`curl -fsSLk https://init.kataba.me/mac/brew-formulae | grep -v '#' | grep -v '^$'`) brew_casks=(`curl -fsSLk https://init.kataba.me/mac/brew-casks | grep -v '#' | grep -v '^$'`) #mas_packages=(`curl -fsSLk https://init.kataba.me/mac/mas-packages | grep -v '#' | grep -v '^$'`) for formula in ${brew_formulae[@]}; do NONINTERACTIVE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 /opt/homebrew/bin/brew install --quiet ${formula} 2> /dev/null done for cask in ${brew_casks[@]}; do NONINTERACTIVE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 /opt/homebrew/bin/brew install --quiet --cask ${cask} 2> /dev/null done #for mas in ${mas_packages[@]}; do # NONINTERACTIVE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 /opt/homebrew/bin/mas install ${mas} #done fi #!/bin/bash gh auth login --hostname github.com cd ~/ git clone https://github.com/katabame/.preferences git clone https://github.com/katabame/.preferences.private # ssh ln -fs ~/.preferences.private/.ssh/config ~/.ssh/config ln -fs ~/.preferences.private/.ssh/known_hosts ~/.ssh/known_hosts ln -fs ~/.preferences.private/.ssh/id_ed25519 ~/.ssh/id_ed25519 ln -fs ~/.preferences.private/.ssh/id_ed25519.pub ~/.ssh/id_ed25519.pub # fish ln -fs ~/.preferences/common/.config/fish/config.fish ~/.config/fish/config.fish ln -fs ~/.preferences/common/.config/fish/functions/fish_prompt.fish ~/.config/fish/functions/fish_prompt.fish # karabiner ln -fs ~/.preferences/macos/karabiner.edn ~/.config/karabiner.edn goku # sudo with TouchID #echo "auth sufficient pam_tid.so" | sudo tee -a /etc/pam.d/sudo #!/bin/bash set -e # Install Rectangle # brew install --cask rectangle # Configure application setting defaults write com.knollsoft.Rectangle alternateDefaultShortcuts -int 1 defaults write com.knollsoft.Rectangle SUHasLaunchedBefore -int 1 defaults write com.knollsoft.Rectangle SUEnableAutomaticChecks -int 1 defaults write com.knollsoft.Rectangle hideMenubarIcon -int 1 defaults write com.knollsoft.Rectangle launchOnLogin -int 1 # Configure keyboard shortcuts # ⌃⌥⇧⌘ ← defaults write com.knollsoft.Rectangle leftHalf -dict-add keyCode -float 123 modifierFlags -float 1966080 # ⌃⌥⇧⌘ → defaults write com.knollsoft.Rectangle rightHalf -dict-add keyCode -float 124 modifierFlags -float 1966080 # ⌃⌥⇧⌘ ↓ defaults write com.knollsoft.Rectangle restore -dict-add keyCode -float 125 modifierFlags -float 1966080 # ⌃⌥⇧⌘ ↑ defaults write com.knollsoft.Rectangle maximize -dict-add keyCode -float 126 modifierFlags -float 1966080 defaults write com.knollsoft.Rectangle maximize -dict-add keyCode -float 126 modifierFlags -float 1966080 # I don't need those 'cuz I wanna be minimalist defaults write com.knollsoft.Rectangle bottomHalf -dict-add defaults write com.knollsoft.Rectangle bottomLeft -dict-add defaults write com.knollsoft.Rectangle bottomRight -dict-add defaults write com.knollsoft.Rectangle center -dict-add defaults write com.knollsoft.Rectangle centerThird -dict-add defaults write com.knollsoft.Rectangle firstThird -dict-add defaults write com.knollsoft.Rectangle firstTwoThirds -dict-add defaults write com.knollsoft.Rectangle larger -dict-add defaults write com.knollsoft.Rectangle lastThird -dict-add defaults write com.knollsoft.Rectangle lastTwoThirds -dict-add defaults write com.knollsoft.Rectangle maximizeHeight -dict-add defaults write com.knollsoft.Rectangle nextDisplay -dict-add defaults write com.knollsoft.Rectangle previousDisplay -dict-add defaults write com.knollsoft.Rectangle reflowTodo -dict-add defaults write com.knollsoft.Rectangle smaller -dict-add defaults write com.knollsoft.Rectangle toggleTodo -dict-add defaults write com.knollsoft.Rectangle topHalf -dict-add defaults write com.knollsoft.Rectangle topLeft -dict-add defaults write com.knollsoft.Rectangle topRight -dict-add #!/bin/bash set -e defaults write com.lwouis.alt-tab-macos SUHasLaunchedBefore -int 1 defaults write com.lwouis.alt-tab-macos SUEnableAutomaticChecks -int 1 defaults write com.lwouis.alt-tab-macos SUAutomaticallyUpdate -int 1 defaults write com.lwouis.alt-tab-macos alignThumbnails -int 1 defaults write com.lwouis.alt-tab-macos hideWindowlessApps -bool true defaults write com.lwouis.alt-tab-macos holdShortcut -string "\\U2318" defaults write com.lwouis.alt-tab-macos menubarIcon -int 3 defaults write com.lwouis.alt-tab-macos showOnScreen -int 1 defaults write com.lwouis.alt-tab-macos showTabsAsWindows -bool false defaults write com.lwouis.alt-tab-macos SUAutomaticallyUpdate -int 1 defaults write com.lwouis.alt-tab-macos SUEnableAutomaticChecks -int 1 defaults write com.lwouis.alt-tab-macos SUHasLaunchedBefore -int 1 defaults write com.lwouis.alt-tab-macos updatePolicy -int 2 defaults write com.lwouis.alt-tab-macos windowMaxWidthInRow -int 30