chore(macos): add macos setup scripts
This commit is contained in:
parent
d94bffa41a
commit
7c08498c54
57
.chezmoidata/packages.yaml
Normal file
57
.chezmoidata/packages.yaml
Normal file
@ -0,0 +1,57 @@
|
||||
packages:
|
||||
darwin:
|
||||
taps:
|
||||
- "asmvik/formulae"
|
||||
- "epk/epk"
|
||||
- "felixkratz/formulae"
|
||||
casks:
|
||||
- "git"
|
||||
- "firefox"
|
||||
- "discord@canary"
|
||||
- "plex"
|
||||
- "spotify"
|
||||
- "visual-studio-code"
|
||||
- "iterm2"
|
||||
- "vlc"
|
||||
brews:
|
||||
- "bat"
|
||||
- "bottom"
|
||||
- "eza"
|
||||
- "lazygit"
|
||||
- "asmvik/formulae/yabai"
|
||||
- "felixkratz/formulae/sketchybar"
|
||||
- "ripgrep"
|
||||
- "fnm"
|
||||
- "gdu"
|
||||
- "hyfetch"
|
||||
vscode:
|
||||
- "aaron-bond.better-comments"
|
||||
- "bbenoist.nix"
|
||||
- "bradlc.vscode-tailwindcss"
|
||||
- "catppuccin.catppuccin-vsc"
|
||||
- "catppuccin.catppuccin-vsc-icons"
|
||||
- "compilenix.vscode-zonefile"
|
||||
- "dart-code.dart-code"
|
||||
- "dbaeumer.vscode-eslint"
|
||||
- "esbenp.prettier-vscode"
|
||||
- "imgildev.vscode-auto-barrel"
|
||||
- "jnoortheen.nix-ide"
|
||||
- "mechatroner.rainbow-csv"
|
||||
- "mongodb.mongodb-vscode"
|
||||
- "ms-azuretools.vscode-containers"
|
||||
- "ms-python.black-formatter"
|
||||
- "ms-python.debugpy"
|
||||
- "ms-python.python"
|
||||
- "ms-python.vscode-pylance"
|
||||
- "ms-python.vscode-python-envs"
|
||||
- "ms-vscode-remote.remote-ssh"
|
||||
- "ms-vscode-remote.remote-ssh-edit"
|
||||
- "ms-vscode.powershell"
|
||||
- "ms-vscode.remote-explorer"
|
||||
- "naumovs.color-highlight"
|
||||
- "orta.vscode-twoslash-queries"
|
||||
- "prisma.prisma"
|
||||
- "streetsidesoftware.code-spell-checker"
|
||||
- "tamasfe.even-better-toml"
|
||||
- "wallabyjs.quokka-vscode"
|
||||
- "yoavbls.pretty-ts-errors"
|
||||
49
.chezmoiscripts/run_once_macos_setup.sh.tmpl
Normal file
49
.chezmoiscripts/run_once_macos_setup.sh.tmpl
Normal file
@ -0,0 +1,49 @@
|
||||
{{ if eq .chezmoi.os "darwin" -}}
|
||||
#!/bin/zsh
|
||||
|
||||
defaults write NSGlobalDomain _HIHideMenuBar -bool TRUE # Auto hide menu bar
|
||||
defaults write NSGLobalDomain NSAutomaticCapitalizationEnabled -bool FALSE
|
||||
defaults write NSGLobalDomain NSAutomaticPeriodSubstitutionEnabled -bool FALSE
|
||||
|
||||
# Dock
|
||||
defaults write com.apple.dock autohide -bool TRUE # Enable auto hide dock
|
||||
defaults write com.apple.dock autohide-delay -float 0 # Dock appears instantly
|
||||
defaults write com.apple.dock autohide-time-modifier -float 0.15 # Autohide takes 0.15 secs
|
||||
defaults write com.apple.dock tile-size -int 36 # Set icon size to 36px
|
||||
defaults write com.apple.dock "show-recents" -bool FALSE # Dont show recent apps on dock
|
||||
killall Dock
|
||||
|
||||
# Screenshots
|
||||
defaults write com.apple.screencapture "location" -string "$HOME/Pictures/Screenshots/" # Screenshots get saved to ~/Pictures/Screenshots
|
||||
killall SystemUIServer
|
||||
|
||||
# Finder
|
||||
defaults write NSGlobalDomain "AppleShowAllExtensions" -bool TRUE # Show extensions
|
||||
defaults write com.apple.finder "AppleShowAllFiles" -bool TRUE
|
||||
defaults write com.apple.finder "FXPreferredViewStyle" -string "Nlsv" # Use list view
|
||||
defaults write com.apple.finder "FXEnableExtensionChangeWarning" -bool FALSE # Disable extension change warning
|
||||
defaults write com.apple.finder "ShowHardDrivesOnDesktop" -bool "false"
|
||||
defaults write com.apple.finder "ShowExternalHardDrivesOnDesktop" -bool "false"
|
||||
defaults write com.apple.finder "ShowRemovableMediaOnDesktop" -bool "false"
|
||||
defaults write com.apple.finder "ShowMountedServersOnDesktop" -bool "false"
|
||||
|
||||
# Time Machine
|
||||
defaults write com.apple.TimeMachine "DoNotOfferNewDisksForBackup" -bool FALSE
|
||||
|
||||
# Misc
|
||||
defaults write com.apple.CloudSubscriptionFeatures.optIn "545129924" -bool FALSE # Disable apple (un)inntelligence
|
||||
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE # Disable generation of .DS_Stores
|
||||
sudo nvram StartupMute=%00 # Disable startup BONGGGGGGGGGGG
|
||||
|
||||
|
||||
mkdir -p $HOME/walls
|
||||
|
||||
url="https://i.badstagram.gay/u/g5uhTJ.png"
|
||||
wallPath="$HOME/walls/$(basename $url)"
|
||||
wget $url -O $wallPath
|
||||
|
||||
# https://github.com/rgcr/m-cli/blob/main/plugins/wallpaper#L21
|
||||
osascript -e "tell application \"System Events\" to tell every desktop to set picture to \"$wallPath\" as POSIX file"
|
||||
|
||||
|
||||
{{ end -}}
|
||||
23
.chezmoiscripts/run_onchange_macos-install-packages.sh.tmpl
Normal file
23
.chezmoiscripts/run_onchange_macos-install-packages.sh.tmpl
Normal file
@ -0,0 +1,23 @@
|
||||
{{ if ne .chezmoi.os "darwin" -}}
|
||||
#!/bin/bash
|
||||
|
||||
if ! command -v brew > /dev/null 2>&1
|
||||
then
|
||||
echo "Installing homebrew"
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
brew bundle --file=/dev/stdin <<EOF
|
||||
{{ range .packages.darwin.taps -}}
|
||||
tap {{ . | quote }}
|
||||
{{ end -}}
|
||||
{{ range .packages.darwin.brews -}}
|
||||
brew {{ . | quote }}
|
||||
{{ end -}}
|
||||
{{ range .packages.darwin.casks -}}
|
||||
cask {{ . | quote }}
|
||||
{{ end -}}
|
||||
EOF
|
||||
{{ end -}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user