├── .github └── workflows │ ├── check-links.yml │ └── check-markdown.yml ├── .gitignore ├── LICENSE ├── README.md └── macsetup.sh /.github/workflows/check-links.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Markdown Links Validation 3 | on: [push, workflow_dispatch] 4 | 5 | jobs: 6 | markdown-link-check: 7 | runs-on: ubuntu-latest 8 | steps: 9 | 10 | - name: Checkout this repository 11 | uses: actions/checkout@v4.1.1 12 | 13 | - name: Download .markdownlint.json 14 | uses: suisei-cn/actions-download-file@v1.6.0 15 | with: 16 | url: "https://raw.githubusercontent.com/fharper/gh-configs/main/.markdownlinkcheck.json" 17 | 18 | - name: Validate Links 19 | uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 20 | with: 21 | use-quiet-mode: 'yes' 22 | config-file: '.markdownlinkcheck.json' 23 | -------------------------------------------------------------------------------- /.github/workflows/check-markdown.yml: -------------------------------------------------------------------------------- 1 | name: Markdown Syntax Validation 2 | on: [push, workflow_dispatch] 3 | 4 | jobs: 5 | markdown-check: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Checkout this repository 9 | uses: actions/checkout@v4.1.4 10 | 11 | - name: Download .markdownlint.json 12 | uses: suisei-cn/actions-download-file@v1.4.0 13 | with: 14 | url: "https://raw.githubusercontent.com/fharper/gh-configs/main/.markdownlint.json" 15 | 16 | - name: Validate Markdown 17 | uses: DavidAnson/markdownlint-cli2-action@v9 18 | with: 19 | command: config 20 | globs: | 21 | .markdownlint.json 22 | **/*.md 23 | #**/node_modules 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # macsetup 2 | 3 | A Zsh script I use to setup my MacBook. 4 | 5 | Feel free to suggest other great tools! 6 | 7 | ## Getting started 8 | 9 | Clone this repo 10 | ```git clone git@github.com:fharper/macsetup.git``` 11 | 12 | Run the script 13 | ```zsh /path/to/script/macsetup.sh``` 14 | 15 | Have fun! 16 | -------------------------------------------------------------------------------- /macsetup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | source $HOME/.zshrc 4 | 5 | # 6 | # - run this script with "zsh macsetup.sh" 7 | # - to erase correctly previous laptop disk, use the command: "diskutil secureErase 4 /dev/disk0" 8 | # 9 | 10 | ######################### 11 | # # 12 | # Script Configurations # 13 | # # 14 | ######################### 15 | 16 | email="hi@fred.dev" 17 | workemail="fred@kubeshop.io" 18 | username="fharper" 19 | 20 | # 21 | # Load the colors function from ZSH 22 | # 23 | autoload colors; colors 24 | 25 | # 26 | # Pause the script until the user hit ENTER & display information to the user 27 | # 28 | # @param message for the user 29 | # 30 | function pausethescript { 31 | echo $fg[yellow]"$1"$reset_color 32 | echo "Press ENTER to continue the installation script" 33 | read -r < /dev/tty 34 | } 35 | 36 | # 37 | # Open file without knowing their exact file name. 38 | # 39 | # @param part of the file name 40 | # 41 | function openfilewithregex { 42 | local file=$(findfilewithregex "$1") 43 | open "${file}" 44 | pausethescript "Wait for the $file installtion to end before continuing." 45 | rm "${file}" 46 | } 47 | 48 | # 49 | # Find a filename without knowing the exact file name 50 | # 51 | # @param part of the file name 52 | # 53 | function findfilewithregex { 54 | echo $(find . -maxdepth 1 -execdir echo {} ';' | grep "$1") 55 | } 56 | 57 | # 58 | # Detect if a GUI application has been installed 59 | # 60 | # @param the application name 61 | # 62 | # @return true if installed, false if not 63 | # 64 | function isAppInstalled { 65 | if [[ $(osascript -e "id of application \"$1\"" 2>/dev/null) ]]; then 66 | print $fg[green]"Skipped $fg[blue]$1$fg[green] already installed"$reset_color >&2 67 | echo true 68 | else 69 | print $fg[blue]"Starting the installation of $1"$reset_color >&2 70 | echo false 71 | fi 72 | } 73 | 74 | # 75 | # Install a Homebrew Keg, if not already installed 76 | # 77 | # @param the application name 78 | # 79 | function installkeg { 80 | local alreadyInstalled=$(brew list "$1" 2>&1 | grep "No such keg") 81 | 82 | if [[ -n "$alreadyInstalled" ]]; then 83 | echo $fg[blue]"Starting the installation of $1"$reset_color 84 | brew install "$1" 85 | else 86 | echo $fg[green]"Skipped $fg[blue]$1$fg[green] already installed"$reset_color 87 | return 1 88 | fi 89 | } 90 | 91 | function installfont { 92 | local alreadyInstalled=$(brew list "$1" 2>&1 | grep "No such keg") 93 | 94 | if [[ -n "$alreadyInstalled" ]]; then 95 | echo $fg[blue]"Starting the installation of $1"$reset_color 96 | brew install --cask "$1" 97 | else 98 | echo $fg[green]"Skipped $fg[blue]$1$fg[green] already installed"$reset_color 99 | return 1 100 | fi 101 | } 102 | 103 | # 104 | # Detect if a Node.js package has been installed globally 105 | # 106 | # @param the package name 107 | # 108 | # @return true if installed, false if not 109 | # 110 | function isNodePackageInstalled { 111 | if npm list -g $1 --depth=0 > /dev/null; then 112 | echo true 113 | else 114 | echo false 115 | fi 116 | } 117 | 118 | # 119 | # Install the Node.js package globally, if not already installed 120 | # 121 | # @param Node.js package name 122 | # 123 | function installNodePackages { 124 | if [[ "$(isNodePackageInstalled $1)" = "false" ]]; then 125 | echo $fg[blue]"Starting the installation of $1"$reset_color 126 | npm install -g "$1" 127 | rehash 128 | else 129 | echo $fg[green]"Skipped $fg[blue]$1$fg[green] already installed"$reset_color 130 | return 1 131 | fi 132 | } 133 | 134 | # 135 | # Install a Homebrew Cask, if not already installed 136 | # 137 | # @param the application name 138 | # 139 | function installcask { 140 | if [[ "$(isAppInstalled $1)" = "false" ]]; then 141 | brew install --cask $1 142 | else 143 | return 1 144 | fi 145 | } 146 | 147 | # 148 | # Install a App Store application, if not already installed 149 | # 150 | # @param the application ID 151 | # 152 | function installFromAppStore { 153 | if [[ "$(isAppInstalled $1)" = "false" ]]; then 154 | mas install "$2" 155 | else 156 | return 1 157 | fi 158 | } 159 | 160 | # 161 | # Obtain the full path of a GUI application 162 | # 163 | # @param the application name 164 | # 165 | # @return the full path of the application, empty if it does not exist 166 | # 167 | function getAppFullPath { 168 | mdfind -name 'kMDItemFSName=="'"$1"'.app"' -onlyin /Applications -onlyin /System/Applications 169 | } 170 | 171 | # 172 | # Detect if a CLI application has been installed 173 | # 174 | # @param the application name 175 | # 176 | # @return true if installed, false if not 177 | # 178 | function isCLAppInstalled { 179 | if which "$1" > /dev/null; then 180 | print $fg[green]"Skipped $fg[blue]$1$fg[green] already installed"$reset_color >&2 181 | echo true 182 | else 183 | print $fg[blue]"Starting the installation of $1"$reset_color >&2 184 | echo false 185 | fi 186 | } 187 | 188 | # 189 | # Install a Python package, if not already installed 190 | # 191 | # @param the package name 192 | # 193 | function installPythonPackage { 194 | local package=$(pip list | grep "$1") 195 | 196 | if [[ -n "$package" ]]; then 197 | echo $fg[green]"Skipped $fg[blue]$1$fg[green] already installed"$reset_color 198 | else 199 | echo $fg[blue]"Installing the Python package $1"$reset_color 200 | pip install "$1" 201 | fi 202 | } 203 | 204 | # 205 | # Install a Python application, if not already installed 206 | # 207 | # @param the application name 208 | # 209 | function installPythonApp { 210 | local package=$(pipx list | grep "$1") 211 | 212 | if [[ -n "$package" ]]; then 213 | echo $fg[green]"Skipped $fg[blue]$1$fg[green] already installed"$reset_color 214 | return 1 215 | else 216 | echo $fg[blue]"Installing the Python application $1"$reset_color 217 | pipx install "$1" 218 | fi 219 | } 220 | 221 | # 222 | # Overwrite of the sudo command to give more context on why it's needed within the script 223 | # 224 | # @param the command to be executed with sudo 225 | # 226 | function sudo { 227 | local needpass=$(/usr/bin/sudo -nv 2>&1 | grep "Input required") 228 | #For whatever reason, chalk doesn't play well with $@, 229 | # but is fine if the value is stored in another variable 230 | local command=$@ 231 | 232 | if [[ "$needpass" ]]; then 233 | echo $fg[blue]"The script need to use root (sudo) to run the $fg[green]$command$fg[blue] command"$reset_color 234 | else 235 | echo $fg[blue]"Using previously root (sudo) access to run the $fg[green]$command$fg[blue] command"$reset_color 236 | fi 237 | /usr/bin/sudo $@ 238 | } 239 | 240 | # 241 | # Use Mackup to restore a specific application settings 242 | # 243 | # @param the application name from Mackup 244 | # 245 | function restoreAppSettings { 246 | echo "[storage]\nengine = icloud\n\n[applications_to_sync]\n$1" > $HOME/.mackup.cfg 247 | mackup restore 248 | echo "[storage]\nengine = icloud\n" > $HOME/.mackup.cfg 249 | } 250 | 251 | # 252 | # Install the application from PKG inside of a DMG 253 | # 254 | # @param DMG filename 255 | # 256 | function installPKGfromDMG { 257 | hdiutil attach "$1" 258 | local volume="/Volumes/$(hdiutil info | grep /Volumes/ | sed 's@.*\/Volumes/@@' | tail -1)" 259 | local pkg=$(/bin/ls "$volume" | grep .pkg) 260 | 261 | installPKG "$volume/$pkg" 262 | 263 | hdiutil detach "$volume" 264 | rm "$1" 265 | } 266 | 267 | # Install the application from a PKG 268 | # 269 | # @param DMG filename 270 | # 271 | function installPKG { 272 | sudo installer -pkg "$1" -target / 273 | 274 | # Cannot delete the pkg from inside a volume (happen when run from installPKGfromDMG) 275 | if [[ "$1" != "/Volumes/"* ]]; then 276 | rm "$1" 277 | fi 278 | } 279 | 280 | # 281 | # Install the application from a DMG image when you just need to move the 282 | # application into the macOS Applications folder 283 | # 284 | # @param DMG filename 285 | # @param delete the DMG or not 286 | # 287 | function installDMG { 288 | hdiutil attach "$1" 289 | local volume="/Volumes/$(hdiutil info | grep /Volumes/ | sed 's@.*\/Volumes/@@')" 290 | local app=$(/bin/ls "$volume" | grep .app) 291 | mv "$volume/$app" /Applications 292 | hdiutil detach "$volume" 293 | 294 | if [[ "$2" = "true" ]]; then 295 | rm "$1" 296 | fi 297 | } 298 | 299 | # 300 | # Reload .zshrc in the current shell 301 | # 302 | function reload { 303 | source $HOME/.zshrc 304 | } 305 | 306 | # 307 | # Create a csreq blob for a specific application 308 | # 309 | # @param app name 310 | # 311 | # @return csreq blob in hexadecimal 312 | # 313 | # Notes: 314 | # - Process taken from https://stackoverflow.com/a/57259004/895232 315 | # 316 | function getCsreqBlob { 317 | local app=$(getAppFullPath "$1") 318 | # Get the requirement string from codesign 319 | local req_str=$(codesign -d -r- "$app" 2>&1 | awk -F ' => ' '/designated/{print $2}') 320 | echo "$req_str" | csreq -r- -b /tmp/csreq.bin 321 | local hex_blob=$(xxd -p /tmp/csreq.bin | tr -d '\n') 322 | rm /tmp/csreq.bin 323 | echo "$hex_blob" 324 | } 325 | 326 | # 327 | # Get the application bundle identifier 328 | # 329 | # @param app name 330 | # 331 | # @return the application bundle identifier 332 | # 333 | function getAppBundleIdentifier { 334 | local app=$(getAppFullPath "$1") 335 | mdls -name kMDItemCFBundleIdentifier -r "$app" 336 | } 337 | 338 | # 339 | # Give Full Disk Access Permission for a specific application 340 | # 341 | # @param app name 342 | # 343 | function giveFullDiskAccessPermission { 344 | updateTCC "kTCCServiceSystemPolicyAllFiles" "$1" 345 | } 346 | 347 | # 348 | # Give Screen Recording Permission for a specific application 349 | # 350 | # @param app name 351 | # 352 | function giveScreenRecordingPermission { 353 | updateTCC "kTCCServiceScreenCapture" "$1" 354 | } 355 | 356 | # 357 | # Give Accessibility Permission for a specific application 358 | # 359 | # @param app name 360 | # 361 | function giveAccessibilityPermission { 362 | updateTCC "kTCCServiceAccessibility" "$1" 363 | } 364 | 365 | # 366 | # Update the access table in the TCC database with the new permission 367 | # 368 | # @param service for permission 369 | # @param application identifier 370 | # @param application csreq blob 371 | # 372 | # Notes: 373 | # - More information on TCC at https://www.rainforestqa.com/blog/macos-tcc-db-deep-dive 374 | # 375 | function updateTCC { 376 | local app_identifier=$(getAppBundleIdentifier "$2") 377 | local app_csreq_blob=$(getCsreqBlob "$2") 378 | 379 | # Columns: 380 | # - service: the service for the permission (ex.: kTCCServiceSystemPolicyAllFiles for Full Disk Access permission) 381 | # - client: app bundle identifier 382 | # - client_type: 0 since it's the bundle identifier 383 | # - auth_value: 2 for allowed 384 | # - auth_reason: 3 user set 385 | # - auth_version: always 1 for now 386 | # - csreq: binary code signing requirement blob that the client must satisfy in order for access to be granted 387 | # - policy_id: null, related to MDM 388 | # - indirect_object_identifier_type: 0 since it's the bundle identifier 389 | # - indirect_object_identifier: UNUSED since it's not needed for this permission 390 | # - indirect_object_code_identity: same as csreq policy_id, so NULL 391 | # - flags: not sure, always 0 392 | # - last_modifified: last time entry was modified 393 | 394 | local exist=$(sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "select count(service) from access where service = '$1' and client = '$app_identifier';") 395 | if [[ exist ]]; then 396 | sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "update access SET auth_value=2 where service = '$1' and client = '$app_identifier';" 397 | else 398 | sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "insert into access values('$1', '$app_identifier', 0, 2, 3, 1, '$app_csreq_blob', NULL, 0, 'UNUSED', NULL, 0, CAST(strftime('%s','now') AS INTEGER));" 399 | fi 400 | 401 | } 402 | 403 | # 404 | # Get the license key from 1Password & copy it to the clipboard 405 | # 406 | # @param the application we want the license key 407 | # 408 | function getLicense { 409 | op item get "$1" --fields label="license key" | pbcopy 410 | pausethescript "Add the license key from the clipboard to $1 before continuing" 411 | } 412 | 413 | # 414 | # Get the license file from 1Password & open it 415 | # 416 | # @param the application we want the license key 417 | # @param the filename of the license (will automate that when 1Password let you get the document file name) 418 | # 419 | function getLicenseFile { 420 | op document get "$1" --output="$2" 421 | open "$2" 422 | pausethescript "Wait for $1 license to be added properly" 423 | rm "$2" 424 | } 425 | 426 | # 427 | # Remove an application from the Dock, if it's there 428 | # 429 | # @param the application we want to remove 430 | # 431 | function removeAppFromDock { 432 | if [[ $(dockutil --list | grep "$1") ]]; then 433 | echo $fg[blue]"Removing $1 from the Dock. The Dock will flash, it's normal."$reset_color 434 | dockutil --remove "$1" --allhomes 435 | fi 436 | } 437 | 438 | # 439 | # Confirm running or not the command 440 | # 441 | # @param the text for the confirmation 442 | # @param the command to run if accepted 443 | # 444 | function confirm { 445 | vared -p "$1 [y/N]: " -c ANSWER 446 | if [[ "$ANSWER" = "Y" ]] || [[ "$ANSWER" = "y" ]] || [[ "$ANSWER" = "yes" ]] || [[ "$ANSWER" = "YES" ]]; then 447 | eval $2 448 | fi 449 | } 450 | 451 | # 452 | # Remove a pre-installed application 453 | # 454 | # @param application name 455 | # 456 | function removeApp { 457 | 458 | local app=$(getAppFullPath "$1") 459 | 460 | if [[ "$app" ]]; then 461 | echo $fg[blue]"Removing $1 from your computer."$reset_color 462 | sudo rm -rf "$app" 463 | fi 464 | } 465 | 466 | # 467 | # Display the section information for the script section being run 468 | # 469 | # @param section name 470 | # 471 | function displaySection { 472 | local length=${#1}+4 473 | 474 | print "\n" 475 | 476 | for (( i=1; i<=$length; i++ )); do 477 | print -n "$fg[magenta]#"; 478 | done 479 | 480 | print -n "\n#" 481 | 482 | for (( i=1; i<=$length-2; i++ )); do 483 | print -n " "; 484 | done 485 | 486 | print "#" 487 | 488 | print "# $1 #" 489 | 490 | print -n "#" 491 | 492 | for (( i=1; i<=$length-2; i++ )); do 493 | print -n " "; 494 | done 495 | 496 | print "#" 497 | 498 | for (( i=1; i<=$length; i++ )); do 499 | print -n "#"; 500 | done 501 | 502 | print "\n$reset_color" 503 | } 504 | 505 | # 506 | # Install a Rust application, if not already installed 507 | # 508 | # @param the application name 509 | # 510 | function installRustApp { 511 | local package=$(cargo install --list | grep "$1") 512 | 513 | if [[ -n "$package" ]]; then 514 | echo $fg[green]"Skipped $fg[blue]$1$fg[green] already installed"$reset_color 515 | return 1 516 | else 517 | echo $fg[blue]"Installing the Python application $1"$reset_color 518 | cargo install "$1" 519 | reload 520 | fi 521 | } 522 | 523 | # 524 | # Install asdf plugin, and a specific version of the plugin while setting it as the global version 525 | # 526 | # @param plugin name 527 | # @param version of the plugin to instal 528 | # 529 | function installAsdfPlugin { 530 | if [[ $(asdf current $1) ]]; then 531 | echo $fg[green]"Skipped asdf plugin $fg[blue]$1$fg[green] already installed"$reset_color 532 | return 1 533 | else 534 | echo $fg[blue]"Installing the asdf plugin $1 & its version $2"$reset_color 535 | asdf plugin-add $1 536 | asdf install $1 $2 537 | asdf global $1 $2 538 | reload 539 | fi 540 | } 541 | 542 | # 543 | # Install Go applications 544 | # 545 | # @param application name 546 | # @param version of the application (default to latest) 547 | # 548 | function installGoApp { 549 | if [[ "$(isCLAppInstalled $1)" = "true" ]]; then 550 | echo $fg[green]"Skipped $fg[blue]$1$fg[green] already installed"$reset_color 551 | return 1 552 | else 553 | version=$2 554 | if [[ "$version" = "" ]]; then 555 | version="latest" 556 | fi 557 | 558 | echo $fg[blue]"Installing the version $version of the Go application $1"$reset_color 559 | go install "$1"@"$version" 560 | asdf reshim golang 561 | fi 562 | } 563 | 564 | # 565 | # Get macOS codename (Monterey, Ventura, Sonoma...) 566 | # 567 | # @return macOS codename 568 | # 569 | function getmacOSCodename { 570 | sed -nE '/SOFTWARE LICENSE AGREEMENT FOR/s/.*([A-Za-z]+ ){5}|\\$//gp' /System/Library/CoreServices/Setup\ Assistant.app/Contents/Resources/en.lproj/OSXSoftwareLicense.rtf 571 | } 572 | 573 | 574 | 575 | 576 | 577 | ############################ 578 | # # 579 | # Utils to run this script # 580 | # # 581 | # (the order is important) # 582 | # # 583 | ############################ 584 | 585 | displaySection "Utils to run this script" 586 | 587 | # 588 | # Rosetta2 589 | # 590 | # Run x86_64 app on arm64 chip 591 | # 592 | # https://developer.apple.com/documentation/apple_silicon/about_the_rosetta_translation_environment 593 | # 594 | # Notes 595 | # - You may get a "Package Authoring Error" even if the installation worked (https://discussions.apple.com/thread/253780410) 596 | # - Cannot be added to apps.yml for now as it doesn't manage custom installation check 597 | # 598 | if [[ -z $(pgrep oahd) ]]; then 599 | /usr/sbin/softwareupdate --install-rosetta --agree-to-license 600 | fi 601 | 602 | # 603 | # Xcode Command Line Tools 604 | # 605 | # Command line XCode tools & the macOS SDK frameworks and headers 606 | # 607 | # https://developer.apple.com/xcode 608 | # 609 | # Notes 610 | # - Cannot be added to apps.yml for now as it doesn't manage custom installation check 611 | # 612 | if [[ $(xcode-select -p 1> /dev/null; echo $?) -eq 2 ]]; then 613 | xcode-select --install 614 | pausethescript "Wait for the XCode Tools installation to finish before continuing." 615 | fi 616 | 617 | # 618 | # Homebrew + homebrew-cask-versions + brew-cask-upgrade + Casks for Fonts 619 | # 620 | # macOS package manager 621 | # Alternate versions of Homebrew Casks 622 | # CLI for upgrading outdated Homebrew Casks 623 | # Casks for Fonts 624 | # 625 | # https://github.com/Homebrew/brew 626 | # https://github.com/Homebrew/homebrew-cask-versions 627 | # https://github.com/buo/homebrew-cask-upgrade 628 | # https://github.com/Homebrew/homebrew-cask-fonts 629 | # 630 | # Notes 631 | # - Cannot be added to apps.yml for now as it doesn't manage custom installation 632 | # 633 | if [[ "$(isCLAppInstalled brew)" = "false" ]]; then 634 | echo $fg[blue]"Starting the installation of Homebrew"$reset_color 635 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 636 | 637 | # Needed once here since we didn't restore & source $HOME/.zshrc yet, but we need Homebrew 638 | eval "$(/opt/homebrew/bin/brew shellenv)" 639 | 640 | brew analytics off 641 | brew tap homebrew/cask-versions 642 | brew tap buo/cask-upgrade 643 | brew tap homebrew/cask-fonts 644 | fi 645 | 646 | # 647 | # Mackup 648 | # 649 | # Sync applications settings with any file sync services 650 | # 651 | # https://github.com/lra/mackup 652 | # 653 | # Notes: needed right after Homebrew so configurations files can be restored 654 | # 655 | installkeg mackup 656 | 657 | # 658 | # asdf 659 | # 660 | # Version manager with support for everything 661 | # 662 | # https://github.com/asdf-vm/asdf 663 | # 664 | # Notes 665 | # - Needed before Python 666 | # 667 | # Help 668 | # - To list all available versions for a language, use: asdf list all nodejs 669 | # - To install a language version, use: asdf install nodejs 22.4.1 670 | # 671 | if [[ "$(isCLAppInstalled asdf)" = "false" ]]; then 672 | installkeg asdf 673 | reload 674 | fi 675 | 676 | # 677 | # Python + PipX + Wheel + Pylint + pytest + Twine 678 | # 679 | # Python SDK 680 | # Isolated Environments Pip alternative for app (not packages) 681 | # Python wheel packaging tool 682 | # Python linter 683 | # Python tests framework 684 | # Utilities for interacting with PyPI 685 | # 686 | # https://www.python.org 687 | # https://github.com/pypa/pipx 688 | # https://github.com/pypa/wheel 689 | # https://github.com/PyCQA/pylint/ 690 | # https://github.com/pytest-dev/pytest 691 | # https://github.com/pypa/twine/ 692 | # 693 | # Notes 694 | # - Needed before lastversion 695 | # 696 | if [[ ! $(asdf current python) ]]; then 697 | installAsdfPlugin python 3.13.3 698 | 699 | installkeg pipx 700 | pipx ensurepath 701 | installPythonPackage wheel 702 | installPythonApp pylint 703 | installPythonApp pytest 704 | installPythonApp twine 705 | fi 706 | 707 | # 708 | # lastversion 709 | # 710 | # CLI to get latest GitHub Repo Release assets URL 711 | # 712 | # https://github.com/dvershinin/lastversion 713 | # 714 | # Notes 715 | # - Needed before Dockutil 716 | # 717 | installPythonApp lastversion 718 | 719 | # 720 | # macports-base 721 | # 722 | # MacPorts CLI 723 | # 724 | # https://github.com/macports/macports-base/ 725 | # 726 | # Notes: 727 | # - Needed after lastversion install 728 | # - Cannot be added to apps.yml for now as it doesn't manage custom installation check 729 | # 730 | if [[ "$(isCLAppInstalled port)" = "false" ]]; then 731 | curl -L "$(lastversion macports/macports-base --assets --filter $(getmacOSCodename)\.pkg$)" --output macports.pkg 732 | 733 | installPKG macports.pkg 734 | fi 735 | 736 | # 737 | # Dockutil 738 | # 739 | # Utility to manage macOS Dock items 740 | # 741 | # https://github.com/kcrawford/dockutil 742 | # 743 | # Notes 744 | # - Homebrew version not updated 745 | # - Needed before iTerm2 746 | # - Cannot be added to apps.yml for now as it doesn't manage custom installation check 747 | # 748 | if [[ "$(isCLAppInstalled dockutil)" = "false" ]]; then 749 | echo $fg[blue]"Starting the installation of Dockutil"$reset_color 750 | curl -L "$(lastversion kcrawford/dockutil --assets)" --output dockutil.pkg 751 | sudo installer -pkg dockutil.pkg -target / 752 | rm dockutil.pkg 753 | fi 754 | 755 | # 756 | # iTerm2 757 | # iTerm2 Shell Integration 758 | # 759 | # Terminal replacement 760 | # 761 | # https://github.com/gnachman/iTerm2 762 | # https://iterm2.com/documentation-shell-integration.html 763 | # 764 | if [[ "$(isAppInstalled iTerm)" = "false" ]]; then 765 | installcask iterm2 766 | giveFullDiskAccessPermission iTerm 767 | dockutil --add /Applications/iTerm.app/ --allhomes 768 | 769 | curl -L https://iterm2.com/shell_integration/install_shell_integration.sh | bash 770 | open -a iTerm 771 | echo $fg[yellow]"You can now close the Terminal app, and continue on iTerm"$reset_color 772 | exit 773 | fi 774 | 775 | # 776 | # Git 777 | # 778 | # File versioning 779 | # 780 | # https://github.com/git/git 781 | # 782 | # Notes: needed before Oh My Zsh as .zhrc have some git usage in it 783 | # 784 | if [[brew list git 2>&1 | grep "No such keg"]]; then 785 | installkeg git 786 | git config --replace-all --global advice.addIgnoredFile false 787 | git config --replace-all --global advice.addEmptyPathspec false 788 | git config --replace-all --global advice.skippedCherryPicks false 789 | git config --replace-all --global clean.requireForce false 790 | git config --replace-all --global core.hooksPath $HOME/.git/hooks 791 | git config --replace-all --global core.ignorecase false 792 | git config --replace-all --global core.pager "diff-so-fancy | less --tabs=4 -RFX" 793 | git config --replace-all --global credential.username $email 794 | git config --replace-all --global diff.tool vscode 795 | git config --replace-all --global difftool.prompt false 796 | git config --replace-all --global difftool.vscode.cmd "code --diff --wait $LOCAL $REMOTE" 797 | git config --replace-all --global fetch.prune true 798 | git config --replace-all --global help.autocorrect 10 799 | git config --replace-all --global http.postBuffer 2097152000 800 | git config --replace-all --global init.defaultBranch main 801 | git config --replace-all --global interactive.diffFilter "diff-so-fancy --patch" 802 | git config --replace-all --global pull.rebase true 803 | git config --replace-all --global push.autoSetupRemote true 804 | git config --replace-all --global push.default current 805 | git config --replace-all --global push.followTags true 806 | git config --replace-all --global rebase.autoStash true 807 | git config --replace-all --global user.email $email 808 | git config --replace-all --global user.name "Frédéric Harper" 809 | fi 810 | 811 | 812 | # 813 | # GitPython 814 | # 815 | # Python library for Git 816 | # 817 | # https://github.com/gitpython-developers/GitPython 818 | # 819 | # Notes: needed for the file size pre-commit hook 820 | # 821 | installPythonPackage gitpython 822 | 823 | # 824 | # Oh My Zsh 825 | # 826 | # Zsh configurations framework & management 827 | # 828 | # https://github.com/ohmyzsh/ohmyzsh 829 | # 830 | 831 | if [[ "$(isCLAppInstalled omz)" = "false" ]]; then 832 | echo $fg[blue]"Starting the installation of Oh My Zsh"$reset_color 833 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 834 | 835 | # Restoring here since OMZ backup $HOME/.zshrc to $HOME/.zshrc.pre-oh-my-zsh 836 | restoreAppSettings zsh 837 | rm $HOME/.zshrc.pre-oh-my-zsh 838 | reload 839 | fi 840 | 841 | # 842 | # starship 843 | # 844 | # The minimal, blazing-fast, and infinitely customizable prompt for any shell 845 | # 846 | # https://github.com/starship/starship 847 | # 848 | # Notes: need to be after Oh My Zsh 849 | # 850 | if [[ ! -d "/opt/homebrew/opt/spaceship/" ]]; then 851 | instalkeg starship 852 | reload 853 | fi 854 | 855 | # 856 | # Restore different files with Mackup (not app specifics) 857 | # 858 | if [[ ! -L "$HOME/.zshrc" ]]; then 859 | restoreAppSettings files 860 | restoreAppSettings vim 861 | reload 862 | fi 863 | 864 | # 865 | # mas-cli 866 | # 867 | # Unofficial macOS App Store CLI 868 | # 869 | # https://github.com/mas-cli/mas 870 | # 871 | # Notes: Need to install before Xcode 872 | # 873 | if [[ "$(isCLAppInstalled mas)" = "false" ]]; then 874 | installkeg mas 875 | open -a "App Store" 876 | pausethescript "Sign in into the App Store before continuing" 877 | fi 878 | 879 | # 880 | # Xcode 881 | # 882 | # macOS/iOS Swift/Ojective-C IDE 883 | # 884 | # https://developer.apple.com/xcode 885 | # 886 | # Notes: need to install before defbro 887 | # 888 | if [[ "$(isAppInstalled Xcode)" = "false" ]]; then 889 | installFromAppStore XCode 497799835 890 | sudo xcodebuild -license accept 891 | xcodebuild -runFirstLaunch 892 | restoreAppSettings Xcode 893 | fi 894 | 895 | # 896 | # defbro 897 | # 898 | # CLI to change the default browser 899 | # 900 | # https://github.com/jwbargsten/defbro 901 | # 902 | if [[ "$(isCLAppInstalled defbro)" = "false" ]]; then 903 | brew tap jwbargsten/misc 904 | installkeg defbro 905 | fi 906 | 907 | # 908 | # Duti 909 | # 910 | # Utility to set default applications for document types (file extensions) 911 | # 912 | # https://github.com/moretension/duti 913 | # 914 | installkeg duti 915 | 916 | # 917 | # jq 918 | # 919 | # Command-line JSON processor 920 | # 921 | # https://github.com/stedolan/jq 922 | # 923 | # JSON processor 924 | # 925 | installkeg jq 926 | 927 | # 928 | # icalBuddy 929 | # 930 | # Command-line utility for printing events and tasks from the OS X calendar database 931 | # 932 | # https://github.com/ali-rantakari/icalBuddy 933 | # 934 | installkeg ical-buddy 935 | 936 | # 937 | # loginitems 938 | # 939 | # Utility to manage startup applications 940 | # 941 | # https://github.com/ojford/loginitems 942 | # 943 | if [[ "$(isCLAppInstalled loginitems)" = "false" ]]; then 944 | brew tap OJFord/formulae 945 | installkeg loginitems 946 | fi 947 | 948 | # 949 | # mysides 950 | # 951 | # Finder sidebar tool 952 | # 953 | # https://github.com/mosen/mysides 954 | # 955 | installkeg mysides 956 | 957 | # 958 | # Node.js + npm CLI 959 | # 960 | # Node.js programming language SDK 961 | # Node Package Manager CLI 962 | # 963 | # https://github.com/nodejs/node 964 | # https://github.com/npm/cli 965 | # 966 | if [[ ! $(asdf current nodejs) ]]; then 967 | installAsdfPlugin nodejs 23.9.0 968 | 969 | npm i -g npm@latest 970 | npm adduser 971 | fi 972 | 973 | # 974 | # BZip2 975 | # 976 | # Data compressor 977 | # 978 | # https://sourceware.org/bzip2/ 979 | # 980 | installkeg BZip2 981 | 982 | # 983 | # osXiconUtils 984 | # 985 | # Utilities for working with macOS icons 986 | # 987 | # https://github.com/sveinbjornt/osxiconutils 988 | # 989 | if [[ "$(isCLAppInstalled geticon)" = "false" ]]; then 990 | echo $fg[blue]"Starting the installation of osXiconUtils"$reset_color 991 | curl -L https://sveinbjorn.org/files/software/osxiconutils.zip --output osxiconutils.zip 992 | unzip osxiconutils.zip 993 | rm osxiconutils.zip 994 | rm -rf __MACOSX #created by the unzip call 995 | sudo chown $username:admin /usr/local/bin 996 | mv bin/geticon /usr/local/bin/ 997 | mv bin/seticon /usr/local/bin/ 998 | rm -rf bin/ 999 | fi 1000 | 1001 | # 1002 | # Script Editor 1003 | # 1004 | giveAccessibilityPermission "Script Editor" 1005 | 1006 | # 1007 | # terminal-notifier 1008 | # 1009 | # Utility to send macOS notifications 1010 | # 1011 | # https://github.com/julienXX/terminal-notifier 1012 | # 1013 | installkeg terminal-notifier 1014 | 1015 | # 1016 | # wallpaper 1017 | # 1018 | # Manage the wallpaper(s) from command line 1019 | # 1020 | # https://github.com/sindresorhus/macos-wallpaper 1021 | # 1022 | installkeg wallpaper 1023 | 1024 | 1025 | ######################## 1026 | # # 1027 | # Applications Cleanup # 1028 | # # 1029 | ######################## 1030 | 1031 | displaySection "Applications Cleanup" 1032 | 1033 | removeApp GarageBand 1034 | removeApp iMovie 1035 | removeApp Keynote 1036 | removeApp Numbers 1037 | removeApp Pages 1038 | 1039 | ################ 1040 | # # 1041 | # Dock Cleanup # 1042 | # # 1043 | ################ 1044 | 1045 | displaySection "Dock Cleanup" 1046 | 1047 | removeAppFromDock "App Store" 1048 | removeAppFromDock "Calendar" 1049 | removeAppFromDock "Contacts" 1050 | removeAppFromDock "FaceTime" 1051 | removeAppFromDock "Freeform" 1052 | removeAppFromDock "Launchpad" 1053 | removeAppFromDock "Mail" 1054 | removeAppFromDock "Maps" 1055 | removeAppFromDock "Music" 1056 | removeAppFromDock "News" 1057 | removeAppFromDock "Notes" 1058 | removeAppFromDock "Podcasts" 1059 | removeAppFromDock "Reminders" 1060 | removeAppFromDock "Safari" 1061 | removeAppFromDock "System Settings" 1062 | removeAppFromDock "TV" 1063 | 1064 | ########################### 1065 | # # 1066 | # Top Helper Applications # 1067 | # # 1068 | ########################### 1069 | 1070 | displaySection "Top Helper Applications" 1071 | 1072 | # 1073 | # Alfred & alfred-google-translate & alfred-language-configuration 1074 | # 1075 | # Spotlight replacement 1076 | # 1077 | # https://www.alfredapp.com 1078 | # 1079 | if [[ "$(isAppInstalled "Alfred 5")" = "false" ]]; then 1080 | installcask alfred 1081 | open /System/Library/PreferencePanes/Keyboard.prefPane 1082 | pausethescript "In System Preferences, Keyboard, click on the 'Keyboard Shortcuts...' button. Select the 'Spotlight' pane & uncheck the 'Show Spotlight Search' checkbox." 1083 | open -a Alfred 1084 | getLicense Alfred 1085 | giveAccessibilityPermission "Alfred 5" 1086 | giveFullDiskAccessPermission "Alfred 5" 1087 | #TODO: add Contacts Permission 1088 | #TODO: add Automation Permission 1089 | installNodePackages alfred-google-translate 1090 | installNodePackages alfred-language-configuration 1091 | pbcopy "trc en&fr" 1092 | pausethescript "Configure alfred-google-translate with 'trc en&fr' (in your clipboard) before continuing" 1093 | fi 1094 | 1095 | # 1096 | # Apple Juice 1097 | # 1098 | # Advanced battery gauge 1099 | # 1100 | # https://github.com/raphaelhanneken/apple-juice 1101 | # 1102 | installcask apple-juice 1103 | 1104 | # 1105 | # Bartender 1106 | # 1107 | # macOS menubar manager 1108 | # 1109 | # https://www.macbartender.com 1110 | # 1111 | # Notes 1112 | # - Cannot use mackup with Bartender (https://github.com/lra/mackup/issues/1126) 1113 | # 1114 | if [[ "$(isAppInstalled "Bartender 5")" = "false" ]]; then 1115 | installcask bartender 1116 | giveAccessibilityPermission "Bartender 5" 1117 | giveScreenRecordingPermission "Bartender 5" 1118 | open -a "Bartender 5" 1119 | getLicense "Bartender" 1120 | fi 1121 | 1122 | # 1123 | # CleanShot X 1124 | # 1125 | # Screenshot utility 1126 | # 1127 | # https://cleanshot.com 1128 | # 1129 | if [[ "$(isAppInstalled "CleanShot X")" = "false" ]]; then 1130 | installcask cleanshot 1131 | giveAccessibilityPermission "CleanShot X" 1132 | getLicense "CleanShot X" 1133 | open -a "CleanShot X" 1134 | pausethescript "Install the audio component for video audio recording before continuing. Go in Settings >> Recording >> Video >> Computer Audio, and click on the 'Configure' button. In the new window, check the 'Record Computer Audio' checkbox, and click 'Install' in the popup." 1135 | pausethescript "You now need to configure the right keyboard shortcuts before continuing. Go in Settings >> Shortcuts. In the 'Screenshoots' section, add 'CMD + Shift + 4' for 'Capture Area'. In the 'Screen Recording' section, add 'CMD + Shift + 6' for 'Record Screen / Stop Recording'. In the 'Scrolling Capture' section, add 'CMD + Shift + 5' for 'Scrolling Capture'. Finally, in the 'OCR' section, add 'CMD + Shift + 2' for 'Capture Text'. You can now close the window." 1136 | fi 1137 | 1138 | # 1139 | # CommandQ 1140 | # 1141 | # Utility to prevent accidentally quiting an application 1142 | # 1143 | # https://commandqapp.com 1144 | # 1145 | if [[ "$(isAppInstalled CommandQ)" = "false" ]]; then 1146 | installcask commandq 1147 | getLicense CommandQ 1148 | open -a CommandQ 1149 | fi 1150 | 1151 | # 1152 | # Contexts 1153 | # 1154 | # Application windows switcher 1155 | # 1156 | # https://contexts.co 1157 | # 1158 | if [[ "$(isAppInstalled Contexts)" = "false" ]]; then 1159 | installcask contexts 1160 | giveAccessibilityPermission Contexts 1161 | getLicenseFile "Contexts" "contexts.contexts-license" 1162 | open -a Contexts 1163 | fi 1164 | 1165 | # 1166 | # Espanso 1167 | # 1168 | # Text expander / snipet 1169 | # 1170 | # https://github.com/federico-terzi/espanso 1171 | # 1172 | if [[ "$(isAppInstalled Espanso)" = "false" ]]; then 1173 | brew tap espanso/espanso 1174 | installcask espanso 1175 | giveAccessibilityPermission Espanso 1176 | restoreAppSettings espanso 1177 | loginitems -a Espanso 1178 | fi 1179 | 1180 | # 1181 | # HSTR 1182 | # 1183 | # Shell command history management 1184 | # 1185 | # https://github.com/dvorka/hstr 1186 | # 1187 | installkeg hstr 1188 | 1189 | # 1190 | # Karabiner-Elements 1191 | # 1192 | # Keyboard customization utility 1193 | # 1194 | # https://github.com/pqrs-org/Karabiner-Elements 1195 | # 1196 | if [[ "$(isAppInstalled "Karabiner-Elements")" = "false" ]]; then 1197 | installcask karabiner-elements 1198 | restoreAppSettings karabiner-elements 1199 | #TODO: add karabiner_observer Receive Keystrokes Permission 1200 | #TODO: add karabiner_observer & karabiner_graber Input Monitor Permission 1201 | #TODO: add karabiner_graber Full Disk Access Permission (needed because of Mackup) 1202 | fi 1203 | 1204 | # 1205 | # KeepingYouAwake 1206 | # 1207 | # Menubar app to manage caffeinate 1208 | # 1209 | # https://github.com/newmarcel/KeepingYouAwake 1210 | # 1211 | installcask keepingyouawake 1212 | 1213 | # 1214 | # Little Snitch 1215 | # 1216 | # Kinda dynamic firewall 1217 | # 1218 | # https://www.obdev.at/products/littlesnitch/index.html 1219 | # 1220 | # Notes 1221 | # - To backup the rules, run 'sudo littlesnitch export-model > little-snitch.json' on previous laptop 1222 | # 1223 | if [[ "$(isAppInstalled "Little Snitch")" = "false" ]]; then 1224 | installcask little-snitch 1225 | restoreAppSettings littlesnitch 1226 | pausethescript "Activate the CLI by opening Little Snitch Preferences, go to Security, and click the lock icon. Check the 'Allow access via Terminal' option, and run 'sudo littlesnitch restore-model little-snitch.json' (copied in your clipboard) in your Terminal where the backup file is." 1227 | reload 1228 | pbcopy "sudo littlesnitch restore-model little-snitch.json" 1229 | fi 1230 | 1231 | # 1232 | # lolcat 1233 | # 1234 | # Display any terminal output in rainbows colors 1235 | # 1236 | # https://github.com/busyloop/lolcat 1237 | # 1238 | installkeg lolcat 1239 | 1240 | # 1241 | # MeetingBar 1242 | # 1243 | # Calendar menubar app 1244 | # 1245 | # https://github.com/leits/MeetingBar 1246 | # 1247 | installcask meetingbar 1248 | 1249 | # 1250 | # Mic Drop 1251 | # 1252 | # Easily mute or unmute your microphone 1253 | # 1254 | # https://getmicdrop.com 1255 | # 1256 | if [[ "$(isAppInstalled Moom)" = "false" ]]; then 1257 | installcask mic-drop 1258 | getLicense "Mic Drop" 1259 | fi 1260 | 1261 | # 1262 | # Moom 1263 | # 1264 | # Applications' windows management 1265 | # 1266 | # https://manytricks.com/moom 1267 | # 1268 | # Notes: 1269 | # - Need to install the App Store version, since you bought it there 1270 | # 1271 | if [[ "$(isAppInstalled Moom)" = "false" ]]; then 1272 | installFromAppStore Moom 419330170 1273 | giveAccessibilityPermission Moom 1274 | fi 1275 | 1276 | # 1277 | # The Clock 1278 | # 1279 | # macOS Clock replacement with more advance features like work clocks & time zones 1280 | # 1281 | # https://www.seense.com/the_clock/ 1282 | # 1283 | # Notes 1284 | # - You cannot remove the clock from the menubar anymore: minimizing used space as analog 1285 | # 1286 | if [[ "$(isAppInstalled "The Clock")" = "false" ]]; then 1287 | defaults write com.apple.menuextra.clock IsAnalog -bool true 1288 | installcask the-clock 1289 | open -a "The Clock" 1290 | getLicense "The Clock" 1291 | pausethescript "Before continuing, restore the settings of The Clock by going in 'Preferences' and select the tab 'Backup/Restore'. Click on the 'iCloud' checkbox, and click the 'Restore' button." 1292 | fi 1293 | 1294 | # 1295 | # TripMode 1296 | # 1297 | # Manage applications internet access 1298 | # 1299 | # https://tripmode.ch 1300 | # 1301 | installcask TripMode 1302 | 1303 | # 1304 | # Zoom 1305 | # 1306 | # Video conference 1307 | # 1308 | # https://zoom.us 1309 | # 1310 | if [[ "$(isAppInstalled "zoom.us")" = "false" ]]; then 1311 | installcask zoom 1312 | giveScreenRecordingPermission "zoom.us" 1313 | #TODO: add Notifications Permission 1314 | fi 1315 | 1316 | 1317 | ################################## 1318 | # # 1319 | # Dock & Menu Bar Configurations # 1320 | # # 1321 | ################################## 1322 | 1323 | displaySection "Dock & Menu Bar Configurations" 1324 | 1325 | # 1326 | # Minimize window into application icon 1327 | # 1328 | defaults write com.apple.dock minimize-to-application -bool true 1329 | 1330 | # 1331 | # Position on screen 1332 | # 1333 | defaults write com.apple.dock "orientation" -string "right" 1334 | 1335 | # 1336 | # Show recent applications in Dock 1337 | # 1338 | defaults write com.apple.dock show-recents -bool false 1339 | 1340 | # 1341 | # Tile Size 1342 | # 1343 | defaults write com.apple.dock tilesize -int 35 1344 | 1345 | 1346 | ######################### 1347 | # # 1348 | # Finder Configurations # 1349 | # # 1350 | ######################### 1351 | 1352 | displaySection "Finder Configurations" 1353 | 1354 | # 1355 | # .DS_Store files creation on Network Disk 1356 | # 1357 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 1358 | 1359 | # 1360 | # Extension Change Warning 1361 | # 1362 | defaults write com.apple.finder FXEnableExtensionChangeWarning -boolean false 1363 | 1364 | # 1365 | # Show Library Folder 1366 | # 1367 | sudo chflags nohidden $HOME/Library 1368 | 1369 | # 1370 | # Settings - General - New Finder windows show 1371 | # 1372 | defaults write com.apple.finder NewWindowTarget -string "PfLo" 1373 | defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Downloads" 1374 | 1375 | # 1376 | # Settings - Advanced - Show all filename extensions 1377 | # 1378 | defaults write -g AppleShowAllExtensions -bool true 1379 | 1380 | # 1381 | # View - Show Path Bar 1382 | # 1383 | defaults write com.apple.finder ShowPathbar -bool true 1384 | 1385 | # 1386 | # View - Show Status Bar 1387 | # 1388 | defaults write com.apple.finder ShowStatusBar -bool true 1389 | 1390 | # 1391 | # Settings - General - Show these items on the desktop - CDs, DVDs, and iPods 1392 | # 1393 | defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false 1394 | 1395 | # 1396 | # Settings - General - Show these items on the desktop - External disks 1397 | # 1398 | defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false 1399 | 1400 | # 1401 | # Settings - Sidebar - Show these items in the sidebar 1402 | # 1403 | defaults write com.apple.Finder ShowRecentTags -bool false 1404 | 1405 | # 1406 | # Default Search Scope: search the current folder by default 1407 | # 1408 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" 1409 | 1410 | # 1411 | # Expand Save Panel by default 1412 | # 1413 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true 1414 | 1415 | # 1416 | # Sidebar Favorites Reordering 1417 | # 1418 | mysides remove all 1419 | mysides add Downloads file://$HOME/Downloads 1420 | mysides add Documents file://$HOME/Documents 1421 | mysides add Applications file:///Applications/ 1422 | 1423 | 1424 | ########################### 1425 | # # 1426 | # Keyboard Configurations # 1427 | # # 1428 | ########################### 1429 | 1430 | displaySection "Keyboard Configurations" 1431 | 1432 | # 1433 | # Accent characters menu on press & hold a letter with possible accents 1434 | # 1435 | defaults write -g ApplePressAndHoldEnabled -bool true 1436 | 1437 | # Press Fn to (do nothing) 1438 | defaults write com.apple.HIToolbox AppleFnUsageType -bool false 1439 | 1440 | 1441 | ################################## 1442 | # # 1443 | # Mission Control Configurations # 1444 | # # 1445 | ################################## 1446 | 1447 | displaySection "Mission Control Configurations" 1448 | 1449 | # 1450 | # Hot Corners - Bottom Right (disable Note app) 1451 | # 1452 | defaults write com.apple.dock wvous-br-corner -int 0 1453 | 1454 | 1455 | ##################################### 1456 | # # 1457 | # Security & Privacy Configurations # 1458 | # # 1459 | ##################################### 1460 | 1461 | displaySection "Security & Privacy Configurations" 1462 | 1463 | # 1464 | # General - Allow apps downloaded from Anywhere 1465 | # 1466 | sudo spctl --master-disable 1467 | 1468 | ########################### 1469 | # # 1470 | # Sharing Configurations # 1471 | # # 1472 | ########################### 1473 | 1474 | displaySection "Sharing Configurations" 1475 | 1476 | # 1477 | # Computer name 1478 | # 1479 | sudo scutil --set ComputerName "lapta" 1480 | sudo scutil --set HostName "lapta" 1481 | sudo scutil --set LocalHostName "lapta" 1482 | sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "lapta" 1483 | 1484 | 1485 | ######################## 1486 | # # 1487 | # Sound Configurations # 1488 | # # 1489 | ######################## 1490 | 1491 | displaySection "Sound Configurations" 1492 | 1493 | # 1494 | # Show volume in menu bar 1495 | # 1496 | open /System/Library/PreferencePanes/Sound.prefPane 1497 | pausethescript "Uncheck 'Show Sound in menu bar' before continuing" 1498 | 1499 | # 1500 | # Sound Effects - Play sound on startup 1501 | # 1502 | sudo nvram StartupMute=%01 1503 | 1504 | # 1505 | # Sound Effects - Play user interface sound effects 1506 | # 1507 | defaults write com.apple.sound.uiaudio.enabled -bool false 1508 | 1509 | 1510 | ########################### 1511 | # # 1512 | # Trackpad Configurations # 1513 | # # 1514 | ########################### 1515 | 1516 | displaySection "Trackpad Configurations" 1517 | 1518 | # 1519 | # More Gestures - App Exposé 1520 | # 1521 | defaults write com.apple.AppleMultitouchTrackpad TrackpadFourFingerVertSwipeGesture -bool false 1522 | 1523 | # 1524 | # More Gestures - Launchpad 1525 | # 1526 | defaults write com.apple.AppleMultitouchTrackpad TrackpadFourFingerPinchGesture -bool false 1527 | 1528 | # 1529 | # More Gestures - Mission Control 1530 | # 1531 | defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerVertSwipeGesture -bool false 1532 | 1533 | # 1534 | # More Gestures - Notification Center 1535 | # 1536 | defaults write com.apple.AppleMultitouchTrackpad TrackpadTwoFingerFromRightEdgeSwipeGesture -bool false 1537 | 1538 | # 1539 | # More Gestures - Show Desktop 1540 | # 1541 | defaults write com.apple.AppleMultitouchTrackpad TrackpadFiveFingerPinchGesture -bool false 1542 | 1543 | # 1544 | # Point & Click - Look up & data detector 1545 | # 1546 | defaults write NSGlobalDomain com.apple.trackpad.forceClick -bool false 1547 | 1548 | # Point & Click - Silent clicking (not in the settings page anymore) 1549 | defaults write com.apple.AppleMultitouchTrackpad ActuationStrength -int 0 1550 | 1551 | 1552 | ################################ 1553 | # # 1554 | # User & Groups Configurations # 1555 | # # 1556 | ################################ 1557 | 1558 | displaySection "User & Groups Configurations" 1559 | 1560 | # 1561 | # Guest User 1562 | # 1563 | sudo defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess -bool false 1564 | sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server AllowGuestAccess -bool false 1565 | 1566 | 1567 | ####################### 1568 | # # 1569 | # Misc Configurations # 1570 | # # 1571 | ####################### 1572 | 1573 | displaySection "Misc Configurations" 1574 | 1575 | # 1576 | # Input source switch popup 1577 | # 1578 | # Notes: This is the keyboard layout blue icons that is sometimes shown by macOS on application text input. 1579 | # 1580 | defaults write kCFPreferencesAnyApplication TSMLanguageIndicatorEnabled 0 1581 | 1582 | # 1583 | # Internet Accounts 1584 | # 1585 | # Notes: 1586 | # - I assume that if my work calendar is available, it means this step was done during a previous run of this script 1587 | # 1588 | if [[ ! "$(icalbuddy calendars | grep "$workemail")" ]]; then 1589 | open /System/Library/PreferencePanes/InternetAccounts.prefPane 1590 | pausethescript "Add your Email accounts to the macOS Internet Accounts" 1591 | fi 1592 | 1593 | # 1594 | # Locate database generation 1595 | # 1596 | sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist 1597 | 1598 | # 1599 | # Printer 1600 | # 1601 | local alreadyInstalled=$(system_profiler SPPrintersDataType | grep "The printers list is empty") 1602 | if [[ -n "$alreadyInstalled" ]]; then 1603 | open /System/Library/PreferencePanes/PrintAndScan.prefPane 1604 | pausethescript "Add your HP OfficeJet 7740" 1605 | fi 1606 | 1607 | # 1608 | # Time Machine 1609 | # 1610 | sudo tmutil setdestination -p "smb://fharper@synology.local/Time Machine Backup/" 1611 | 1612 | # 1613 | # Wallpaper 1614 | # 1615 | wallpaper set /Users/fharper/Documents/misc/background.png 1616 | 1617 | 1618 | ######################## 1619 | # # 1620 | # Apply Configurations # 1621 | # # 1622 | ######################## 1623 | 1624 | echo $fg[blue]"The Dock, Finder & SystemUIServer will restart, giving a flashing impression: it's normal\n"$reset_color 1625 | killall Finder 1626 | killall Dock 1627 | killall SystemUIServer 1628 | 1629 | 1630 | ##################### 1631 | # # 1632 | # Main applications # 1633 | # # 1634 | ##################### 1635 | 1636 | displaySection "Main applications" 1637 | 1638 | # 1639 | # 1Password + 1Password CLI + git-credential-1password + Safari Extension 1640 | # 1641 | # Password manager 1642 | # CLI for 1Password 1643 | # Safari integration 1644 | # 1645 | # https://1password.com 1646 | # https://1password.com/downloads/command-line/ 1647 | # https://apps.apple.com/us/app/1password-for-safari/id1569813296 1648 | # 1649 | if [[ "$(isAppInstalled 1Password)" = "false" ]]; then 1650 | installcask 1password 1651 | giveScreenRecordingPermission 1Password 1652 | dockutil --add /Applications/1Password.app --allhomes 1653 | installkeg 1password-cli 1654 | open -a 1Password 1655 | pausethescript "Open 1Password settings, and check 'Connect with 1Password CLI' & click the 'Set up SSH Agent' button in the 'Developer' tab before continuing" 1656 | restoreAppSettings ssh 1657 | eval $(op signin) 1658 | pausethescript "Sign in to 1Password before continuing" 1659 | brew tap develerik/tools 1660 | installFromAppStore "1Password Safari Extension" 1569813296 1661 | open -a Safari 1662 | pausethescript "Open Safari Settings, and in the Extensions tab, check the box for '1Password for Safari' before continuing" 1663 | fi 1664 | 1665 | # 1666 | # Antidote 1667 | # 1668 | # English & French corrector & dictionary 1669 | # 1670 | # https://www.antidote.info 1671 | # 1672 | if [[ "$(isAppInstalled "Antidote 11")" = "false" ]]; then 1673 | open https://services.druide.com/ 1674 | pausethescript "Download Antidote in the macsetup folder before continuing" 1675 | cd $HOME/Downloads/ 1676 | local filename=$(findfilewithregex "Antidote") 1677 | installPKGfromDMG "$filename" 1678 | cd - 1679 | dockutil --add /Applications/Antidote/Antidote\ 11.app/ 1680 | loginitems -a Antidote 1681 | fi 1682 | 1683 | # 1684 | # Google Chrome 1685 | # 1686 | # Browser 1687 | # 1688 | # https://www.google.com/chrome 1689 | # 1690 | if [[ "$(isAppInstalled "Google Chrome")" = "false" ]]; then 1691 | installcask google-chrome 1692 | dockutil --add "/Applications/Google Chrome.app" --position 2 --allhomes 1693 | 1694 | defaults write com.google.Chrome ExternalProtocolDialogShowAlwaysOpenCheckbox -bool true 1695 | defaults write com.google.Chrome DisablePrintPreview -bool true 1696 | defbro com.google.Chrome 1697 | 1698 | /Applications/Google\ Chrome/Contents/MacOS/Google\ Chrome "chrome-extension://jinjaccalgkegednnccohejagnlnfdag/options/index.html#settings" 1699 | pausethescript "Authorize Dropbox for Violentmonkey sync before continuing" 1700 | 1701 | /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome "chrome-extension://clngdbkpkpeebahjckkjfobafhncgmne/manage.html#stylus-options" 1702 | pausethescript "Authorize Dropbox for Stylus sync before continuing" 1703 | 1704 | /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome "chrome-extension://pncfbmialoiaghdehhbnbhkkgmjanfhe/pages/options.html" 1705 | pausethescript "Authorize Dropbox for uBlacklist sync before continuing" 1706 | 1707 | duti -s com.google.Chrome com.compuserve.gif all #GIF (Image) 1708 | 1709 | #TODO: add Location Services permission 1710 | fi 1711 | 1712 | # 1713 | # Home Assistant 1714 | # 1715 | # Home automation 1716 | # 1717 | # https://github.com/home-assistant/iOS 1718 | # 1719 | if [[ "$(isAppInstalled "Home Assistant")" = "false" ]]; then 1720 | installcask home-assistant 1721 | fi 1722 | 1723 | # 1724 | # macos-trash 1725 | # 1726 | # rm replacement that moves files to the Trash folder 1727 | # 1728 | # https://github.com/sindresorhus/macos-trash 1729 | # 1730 | brew install macos-trash 1731 | 1732 | # 1733 | # Mumu X 1734 | # 1735 | # Emoji picker 1736 | # 1737 | # https://getmumu.com 1738 | # 1739 | # Notes 1740 | # - Need to install manually as Mumu X is not in Hombrew (just Mumu) 1741 | # 1742 | if [[ "$(isAppInstalled "Mumu X")" = "false" ]]; then 1743 | echo $fg[blue]"Starting the installation of Mumu X"$reset_color 1744 | curl -L $(op item get "Mumu X" --fields label="download link") --output mumux.dmg 1745 | installDMG mumux.dmg true 1746 | loginitems -a "Mumu X" 1747 | giveAccessibilityPermission "Mumu X" 1748 | fi 1749 | 1750 | # 1751 | # Notion 1752 | # 1753 | # Notes application 1754 | # 1755 | # https://www.notion.so 1756 | # 1757 | if [[ "$(isAppInstalled "Notion")" = "false" ]]; then 1758 | installcask notion 1759 | dockutil --add "/Applications/Notion.app" --allhomes 1760 | fi 1761 | 1762 | # 1763 | # OpenInEditor-Lite 1764 | # 1765 | # Finder Toolbar app to open the current directory in your preferred Editor 1766 | # 1767 | # https://github.com/Ji4n1ng/OpenInTerminal 1768 | # 1769 | if [[ "$(isAppInstalled OpenInEditor-Lite)" = "false" ]]; then 1770 | installcask openineditor-lite 1771 | defaults write wang.jianing.app.OpenInEditor-Lite LiteDefaultEditor "Visual Studio Code" 1772 | open /Applications 1773 | pausethescript "drag openineditor-lite in Finder toolbar while pressing Command before continuing" 1774 | curl -L https://github.com/Ji4n1ng/OpenInTerminal/releases/download/v1.2.0/Icons.zip --output icons.zip 1775 | unzip icons.zip 1776 | rm icons.zip 1777 | rm -rf __MACOSX #created by the unzip call 1778 | seticon icons/icon_vscode_dark.icns /Applications/OpenInEditor-Lite.app 1779 | rm -rf icons 1780 | fi 1781 | 1782 | # 1783 | # OpenInTerminal-Lite 1784 | # 1785 | # Finder Toolbar app to open the current directory in your preferred Terminal 1786 | # 1787 | # https://github.com/Ji4n1ng/OpenInTerminal 1788 | # 1789 | if [[ "$(isAppInstalled OpenInTerminal-Lite)" = "false" ]]; then 1790 | installcask openinterminal-lite 1791 | defaults write wang.jianing.app.OpenInTerminal-Lite LiteDefaultTerminal iTerm 1792 | open /Applications 1793 | pausethescript "drag openinterminal-lite in Finder toolbar while pressing Command before continuing" 1794 | curl -L https://github.com/Ji4n1ng/OpenInTerminal/releases/download/v1.2.0/Icons.zip --output icons.zip 1795 | unzip icons.zip 1796 | rm icons.zip 1797 | rm -rf __MACOSX #created by the unzip call 1798 | seticon icons/icon_terminal_dark.icns /Applications/OpenInTerminal-Lite.app 1799 | rm -rf icons 1800 | fi 1801 | 1802 | # 1803 | # Rain 1804 | # 1805 | # Simple macOS menubar app that play rainforest sound 1806 | # 1807 | # https://github.com/fharper/rain 1808 | # 1809 | if [[ "$(isAppInstalled rain)" = "false" ]]; then 1810 | echo $fg[blue]"Starting the installation of Rain"$reset_color 1811 | curl -L https://github.com/fharper/rain/releases/download/v1.0b2/rain.app.zip --output rain.zip 1812 | unzip rain.zip 1813 | rm rain.zip 1814 | rm -rf __MACOSX #created by the unzip call 1815 | mv rain.app /Applications 1816 | loginitems -a Rain 1817 | fi 1818 | 1819 | # 1820 | # Slack 1821 | # 1822 | # Text-based communication app 1823 | # 1824 | # https://slack.com 1825 | # 1826 | if [[ "$(isAppInstalled Slack)" = "false" ]]; then 1827 | installcask slack 1828 | dockutil --add /Applications/Slack.app/ --allhomes 1829 | open -a Slack 1830 | local slack_workspaces=($(op item list --categories Login --format json | jq '.[] | select(.title|test("Slack")) | .urls[0].href' | tr -d '"')) 1831 | for slack in "${slack_workspaces[@]}"; do 1832 | open "$slack" 1833 | pausethescript "Sign in this Slack community: $slack" 1834 | done 1835 | fi 1836 | 1837 | # 1838 | # Spotify 1839 | # 1840 | # Music service player 1841 | # 1842 | # https://www.spotify.com 1843 | # 1844 | if [[ "$(isAppInstalled Spotify)" = "false" ]]; then 1845 | installcask spotify 1846 | dockutil --add /Applications/Spotify.app --allhomes 1847 | fi 1848 | 1849 | # 1850 | # Todoist 1851 | # 1852 | # Todo app 1853 | # 1854 | # https://todoist.com 1855 | # 1856 | if [[ "$(isAppInstalled Todoist)" = "false" ]]; then 1857 | installcask todoist 1858 | dockutil --add /Applications/Todoist.app --allhomes 1859 | loginitems -a Todoist 1860 | fi 1861 | 1862 | # 1863 | # Visual Studio Code 1864 | # 1865 | # Code editor 1866 | # 1867 | # https://github.com/microsoft/vscode 1868 | # 1869 | if [[ "$(isAppInstalled "Visual Studio Code")" = "false" ]]; then 1870 | installcask visual-studio-code 1871 | dockutil --add /Applications/Visual\ Studio\ Code.app/ --allhomes 1872 | 1873 | npm config set editor code 1874 | 1875 | duti -s com.microsoft.VSCode public.css all #CSS 1876 | duti -s com.microsoft.VSCode public.comma-separated-values-text all #CSV 1877 | duti -s com.microsoft.VSCode com.netscape.javascript-source all #JavaScript 1878 | duti -s com.microsoft.VSCode public.json all #JSON 1879 | duti -s com.microsoft.VSCode dyn.ah62d4rv4ge8027pb all #lua 1880 | duti -s com.microsoft.VSCode com.apple.log all #logs 1881 | duti -s com.microsoft.VSCode net.daringfireball.markdown all #Markdown 1882 | duti -s com.microsoft.VSCode public.php-script all #PHP 1883 | duti -s com.microsoft.VSCode com.apple.property-list all # Plist 1884 | duti -s com.microsoft.VSCode public.python-script all # Python 1885 | duti -s com.microsoft.VSCode public.rtf all #RTF 1886 | duti -s com.microsoft.VSCode public.ruby-script all #Ruby 1887 | duti -s com.microsoft.VSCode com.apple.terminal.shell-script all #SH 1888 | duti -s com.microsoft.VSCode public.shell-script all #Shell script 1889 | duti -s com.microsoft.VSCode public.svg-image all #SVG 1890 | duti -s com.microsoft.VSCode dyn.ah62d4rv4ge81g6pq all #SQL 1891 | duti -s com.microsoft.VSCode dyn.ah62d4rv4ge81k3u all #Terraform tf 1892 | duti -s com.microsoft.VSCode dyn.ah62d4rv4ge81k3xxsvu1k3k all #Terraform tfstate 1893 | duti -s com.microsoft.VSCode dyn.ah62d4rv4ge81k3x0qf3hg all #Terraform tfvars 1894 | duti -s com.microsoft.VSCode public.plain-text all #TXT 1895 | duti -s public.mpeg-2-transport-stream all #TypeScript (there's no official UTI, so using the recognized one as I never have MPEG .ts files) 1896 | duti -s com.microsoft.VSCode public.xml all #XML 1897 | duti -s com.microsoft.VSCode public.yaml all #YAML 1898 | duti -s com.microsoft.VSCode public.zsh-script all #ZSH 1899 | duti -s com.microsoft.VSCode text/x-shellscript all #ZSH 1900 | fi 1901 | 1902 | 1903 | ################### 1904 | # # 1905 | # Developer stuff # 1906 | # # 1907 | ################### 1908 | 1909 | displaySection "Developer stuff" 1910 | 1911 | # 1912 | # .Net Core 1913 | # 1914 | # .Net Core Programming Language 1915 | # 1916 | # https://github.com/dotnet/core 1917 | # 1918 | installAsdfPlugin dotnet-core 7.0.305 1919 | 1920 | # 1921 | # Act 1922 | # 1923 | # Run your GitHub Actions locally 1924 | # 1925 | # https://github.com/nektos/act 1926 | # 1927 | installkeg act 1928 | 1929 | # 1930 | # actionlint 1931 | # 1932 | # Static checker for GitHub Actions workflow files 1933 | # 1934 | # https://github.com/rhysd/actionlint 1935 | # 1936 | installkeg actionlint 1937 | 1938 | # 1939 | # Air 1940 | # 1941 | # Live reload for Go applications 1942 | # 1943 | # https://github.com/cosmtrek/air 1944 | # 1945 | installGoApp air latest 1946 | 1947 | # 1948 | # ajv-cli 1949 | # 1950 | # Ajv JSON Schema Validator CLI 1951 | # 1952 | # https://github.com/ajv-validator/ajv-cli 1953 | # 1954 | installNodePackages ajv-cli 1955 | 1956 | # 1957 | # Akamai Linode 1958 | # 1959 | # Linode CLI 1960 | # 1961 | # https://github.com/linode/linode-cli 1962 | # 1963 | if [[ "$(isCLAppInstalled linode)" = "false" ]]; then 1964 | installkeg linode-cli 1965 | confirm "Do you want to configure the Akamai Linode CLI now?" "linode configure" 1966 | fi 1967 | 1968 | # 1969 | # argo 1970 | # 1971 | # Argo Workflows CLI 1972 | # 1973 | # https://github.com/argoproj/argo-workflows/ 1974 | # 1975 | installkeg argo 1976 | 1977 | # 1978 | # argocd 1979 | # 1980 | # Argo CD CLI 1981 | # 1982 | # https://github.com/argoproj/argo-cd 1983 | # 1984 | installkeg argocd 1985 | 1986 | # 1987 | # aws-cli 1988 | # 1989 | # Amazon Web Services CLI 1990 | # 1991 | # https://github.com/aws/aws-cli 1992 | # 1993 | if [[ "$(isCLAppInstalled aws)" = "false" ]]; then 1994 | installkeg awscli 1995 | 1996 | confirm "Do you want to configure the AWS CLI now?" "aws configure" 1997 | fi 1998 | 1999 | # 2000 | # BFG Repo-Cleaner 2001 | # 2002 | # git-filter-branch replacement 2003 | # 2004 | # https://github.com/rtyley/bfg-repo-cleaner 2005 | # 2006 | installkeg bfg 2007 | 2008 | # 2009 | # Black 2010 | # 2011 | # Python code formatter 2012 | # 2013 | # https://github.com/psf/black 2014 | # 2015 | installkeg black 2016 | 2017 | # 2018 | # cabal-install 2019 | # 2020 | # Build & installation tool for Haskell application 2021 | # 2022 | # https://github.com/haskell/cabal 2023 | # 2024 | installkeg cabal-install 2025 | 2026 | # 2027 | # Caddy 2028 | # 2029 | # HTTP server 2030 | # 2031 | # https://github.com/caddyserver/caddy 2032 | # 2033 | installkeg caddy 2034 | 2035 | # 2036 | # caniuse-cmd 2037 | # 2038 | # Search caniuse.com from the command line 2039 | # 2040 | # https://github.com/sgentle/caniuse-cmd 2041 | # 2042 | npm install -g caniuse-cmd 2043 | 2044 | # 2045 | # Charles Proxy 2046 | # 2047 | # HTTP proxy, monitor & reverse proxy 2048 | # 2049 | # https://www.charlesproxy.com 2050 | # 2051 | installcask charles 2052 | 2053 | # 2054 | # Chrome Webstore CLI 2055 | # 2056 | # CLI for interacting with Google Chrome Webstore 2057 | # 2058 | # https://github.com/vladimyr/chrome-webstore-cli 2059 | # 2060 | installNodePackages chrome-webstore-cli 2061 | 2062 | # 2063 | # Civo 2064 | # 2065 | # Civo CLI 2066 | # 2067 | # https://github.com/civo/cli 2068 | # 2069 | if [[ "$(isCLAppInstalled civo)" = "false" ]]; then 2070 | brew tap civo/tools 2071 | installkeg civo 2072 | fi 2073 | 2074 | # 2075 | # cockroach-sql 2076 | # 2077 | # CockroachDB CLI 2078 | # 2079 | # https://www.cockroachlabs.com 2080 | # 2081 | installkeg cockroachdb/tap/cockroach-sql 2082 | 2083 | # 2084 | # CocoaPods 2085 | # 2086 | # XCode dependency manager 2087 | # 2088 | # https://github.com/CocoaPods/CocoaPods 2089 | # 2090 | installkeg cocoapods 2091 | 2092 | # 2093 | # commitlint 2094 | # 2095 | # Lint commit messages 2096 | # 2097 | # https://github.com/conventional-changelog/commitlint 2098 | # 2099 | installkeg commitlint 2100 | 2101 | # 2102 | # Cordova CLI 2103 | # 2104 | # CLI for Cordova 2105 | # 2106 | # https://github.com/apache/cordova-cli 2107 | # 2108 | installNodePackages cordova 2109 | 2110 | # 2111 | # Curl 2112 | # 2113 | # Transfer data from URL CLI 2114 | # 2115 | # https://github.com/curl/curl 2116 | # 2117 | installkeg curl 2118 | 2119 | # 2120 | # Cypress 2121 | # 2122 | # E2E testing 2123 | # 2124 | # https://github.com/cypress-io/cypress 2125 | # 2126 | installNodePackages cypress 2127 | 2128 | # 2129 | # delete-gh-workflow-runs + fzf 2130 | # 2131 | # Easily mass-delete GitHub Workflow runs 2132 | # A command-line fuzzy finder 2133 | # 2134 | # https://github.com/jv-k/delete-gh-workflow-runs 2135 | # https://github.com/junegunn/fzf 2136 | # 2137 | # Notes: 2138 | # - fzf is a dependency for delete-gh-workflow-runs 2139 | # 2140 | if [[ "$(isCLAppInstalled delete-workflow-runs)" = "false" ]]; then 2141 | installNodePackages delete-workflow-runs 2142 | installkeg fzf 2143 | fi 2144 | 2145 | # 2146 | # Delve 2147 | # 2148 | # Go Debugger 2149 | # 2150 | # https://github.com/go-delve/delve 2151 | # 2152 | installkeg delve 2153 | 2154 | # 2155 | # Deno 2156 | # 2157 | # deno programming language (runtime) 2158 | # 2159 | # https://github.com/denoland/deno 2160 | # 2161 | installAsdfPlugin deno 1.30.3 2162 | 2163 | # 2164 | # diff-so-fancy 2165 | # 2166 | # better looking git diff 2167 | # 2168 | # https://github.com/so-fancy/diff-so-fancy 2169 | # 2170 | installkeg diff-so-fancy 2171 | 2172 | # 2173 | # direnv 2174 | # 2175 | # Load and unload environment variables depending on the current directory 2176 | # 2177 | # https://github.com/direnv/direnv 2178 | # 2179 | installkeg direnv 2180 | 2181 | # 2182 | # dive 2183 | # 2184 | # A tool for exploring each layer of Docker images 2185 | # 2186 | # https://github.com/wagoodman/dive 2187 | # 2188 | installkeg dive 2189 | 2190 | # 2191 | # Docker Desktop 2192 | # 2193 | # Virtualization tool 2194 | # 2195 | # https://www.docker.com 2196 | # 2197 | if [[ "$(isAppInstalled Docker)" = "false" ]]; then 2198 | installcask docker 2199 | docker extension install docker/resource-usage-extension 2200 | docker login -u $username 2201 | fi 2202 | 2203 | # 2204 | # ESLint 2205 | # ESLint Formatter Pretty 2206 | # ESLint plugins: 2207 | # - eslint-plugin-markdown 2208 | # - eslint-plugin-react 2209 | # - eslint-plugin-ui-testing (using for Puppeteer) 2210 | # - eslint-plugin-jest 2211 | # - eslint-plugin-security-node 2212 | # - eslint-plugin-jsx-a11y 2213 | # - eslint-plugin-i18n 2214 | # - eslint-plugin-jsdoc 2215 | # - eslint-plugin-json 2216 | # - eslint-mdx 2217 | # 2218 | # JavaScript linter 2219 | # Pretty ESLint formatter 2220 | # Lint JavaScript code blocks in Markdown documents 2221 | # React-specific linting rules for ESLint 2222 | # ESLint plugin that helps following best practices when writing UI tests like with Puppeteer 2223 | # ESLint plugin for Jest 2224 | # ESLint security plugin for Node.js 2225 | # a11y rules on JSX elements 2226 | # ESLint rules to find out the texts and messages not internationalized in the project 2227 | # JSDoc specific linting rules for ESLint 2228 | # JSON files rules 2229 | # ESLint Parser/Plugin for MDX 2230 | # 2231 | # https://github.com/eslint/eslint 2232 | # https://github.com/sindresorhus/eslint-formatter-pretty 2233 | # https://github.com/eslint/eslint-plugin-markdown 2234 | # https://github.com/yannickcr/eslint-plugin-react 2235 | # https://github.com/kwoding/eslint-plugin-ui-testing 2236 | # https://github.com/jest-community/eslint-plugin-jest 2237 | # https://github.com/gkouziik/eslint-plugin-security-node 2238 | # https://github.com/jsx-eslint/eslint-plugin-jsx-a11y 2239 | # https://github.com/chejen/eslint-plugin-i18n 2240 | # https://github.com/gajus/eslint-plugin-jsdoc 2241 | # https://github.com/azeemba/eslint-plugin-json 2242 | # https://github.com/mdx-js/eslint-mdx 2243 | # 2244 | installkeg eslint 2245 | installNodePackages eslint-formatter-pretty 2246 | installNodePackages eslint-plugin-markdown 2247 | installNodePackages eslint-plugin-react 2248 | installNodePackages eslint-plugin-ui-testing 2249 | installNodePackages eslint-plugin-jest 2250 | installNodePackages eslint-plugin-security-node 2251 | installNodePackages eslint-plugin-jsx-a11y 2252 | installNodePackages eslint-plugin-i18n 2253 | installNodePackages eslint-plugin-jsdoc 2254 | installNodePackages eslint-plugin-json 2255 | installNodePackages eslint-plugin-mdx 2256 | 2257 | # 2258 | # doctl 2259 | # 2260 | # DigitalOcean CLI 2261 | # 2262 | # https://github.com/digitalocean/doctl 2263 | # 2264 | if [[ "$(isCLAppInstalled doctl)" = "false" ]]; then 2265 | installkeg doctl 2266 | doctl auth init 2267 | fi 2268 | 2269 | # 2270 | # Expo CLI 2271 | # 2272 | # Tools for creating, running, and deploying Universal Expo & React Native apps 2273 | # 2274 | # https://github.com/expo/expo-cli 2275 | # 2276 | installNodePackages expo-cli 2277 | 2278 | # 2279 | # flow-bin 2280 | # 2281 | # Binary wrapper for Flow - A static type checker for JavaScript 2282 | # 2283 | # https://github.com/flow/flow-bin 2284 | # 2285 | # Notes: 2286 | # - Needed by the vscode-flow-ide Visual Studio Code extension 2287 | # 2288 | installNodePackages flow-bin 2289 | 2290 | # 2291 | # Gist 2292 | # 2293 | # CLI to manage gist 2294 | # 2295 | # https://github.com/defunkt/gist 2296 | # 2297 | if [[ "$(isCLAppInstalled gist)" = "false" ]]; then 2298 | installkeg gist 2299 | gist --login 2300 | fi 2301 | 2302 | # 2303 | # Git Branch Status 2304 | # 2305 | # Prints git branch sync status reports 2306 | # 2307 | # https://github.com/bill-auger/git-branch-status 2308 | # 2309 | installNodePackages git-branch-status 2310 | 2311 | # 2312 | # Git Large File Storage 2313 | # 2314 | # Git extension for versioning large files 2315 | # 2316 | # https://github.com/git-lfs/git-lfs 2317 | # 2318 | installkeg git-lfs 2319 | 2320 | # 2321 | # Git Open 2322 | # 2323 | # Open the GitHub page for a repository 2324 | # 2325 | # https://github.com/paulirish/git-open 2326 | # 2327 | # Notes: 2328 | # - git-open in Homebrew isn't the same 2329 | # 2330 | installNodePackages git-open 2331 | 2332 | # 2333 | # Git Recent 2334 | # 2335 | # See your latest local git branches, formatted real fancy 2336 | # 2337 | # https://github.com/paulirish/git-recent 2338 | # 2339 | installkeg git-recent 2340 | 2341 | # 2342 | # Git Sizer 2343 | # 2344 | # Compute various size metrics for a Git repository 2345 | # 2346 | # https://github.com/github/git-sizer 2347 | # 2348 | installkeg git-sizer 2349 | 2350 | # 2351 | # GitHub CLI & gh-pr-draft 2352 | # 2353 | # GitHub CLI 2354 | # GitHub CLI Extension for converting PR to Draft 2355 | # 2356 | # https://github.com/cli/cli 2357 | # https://github.com/kyanny/gh-pr-draft 2358 | # 2359 | if [[ "$(isCLAppInstalled gh)" = "false" ]]; then 2360 | installkeg gh 2361 | gh auth login 2362 | gh config set editor "code --wait" 2363 | gh extension install kyanny/gh-pr-draft 2364 | fi 2365 | 2366 | # 2367 | # GitLab CLI 2368 | # 2369 | # GitLab CLI 2370 | # 2371 | # https://gitlab.com/gitlab-org/cli 2372 | # 2373 | if [[ "$(isCLAppInstalled glab)" = "false" ]]; then 2374 | installkeg glab 2375 | 2376 | if [[ -z "${GITLAB_TOKEN}" ]]; then 2377 | glab auth login 2378 | fi 2379 | fi 2380 | 2381 | # 2382 | # Gitleaks 2383 | # 2384 | # Detect hardcoded secrets 2385 | # 2386 | # https://github.com/gitleaks/gitleaks 2387 | # 2388 | installkeg gitleaks 2389 | 2390 | # 2391 | # GNU sed 2392 | # 2393 | # GNU implementation of the famous sed 2394 | # 2395 | # https://www.gnu.org/software/sed/ 2396 | # 2397 | installkeg gnu-sed 2398 | 2399 | # 2400 | # Go 2401 | # 2402 | # Go programming language 2403 | # 2404 | # https://golang.org 2405 | # 2406 | installAsdfPlugin golang 1.23.2 2407 | 2408 | # 2409 | # go-jira 2410 | # 2411 | # CLI for Jira 2412 | # 2413 | # https://github.com/go-jira/jira 2414 | # 2415 | if [[ "$(isCLAppInstalled jira)" = "false" ]]; then 2416 | installkeg go-jira 2417 | 2418 | confirm "Do you want to connect the JIRA CLI right now?" "jira session" 2419 | fi 2420 | 2421 | # 2422 | # golangci-lint 2423 | # 2424 | # Go linter 2425 | # 2426 | # https://github.com/golangci/golangci-lint 2427 | # 2428 | installkeg golangci-lint 2429 | 2430 | # 2431 | # Google Cloud SDK 2432 | # 2433 | # Google Cloud CLI 2434 | # 2435 | # https://cloud.google.com/sdk 2436 | # 2437 | if [[ "$(isCLAppInstalled gcloud)" = "false" ]]; then 2438 | installcask google-cloud-sdk 2439 | gcloud config set disable_usage_reporting true 2440 | gcloud components install gke-gcloud-auth-plugin 2441 | 2442 | # Configure gcloud 2443 | local confirmation=$(gum confirm "Do you want to log into Google Cloud right now?" && echo "true" || echo "false") 2444 | if [[ $confirmation == "true" ]] ; then 2445 | gcloud auth login 2446 | gcloud config set compute/region us-east1 2447 | gcloud config set compute/zone us-east1-b 2448 | fi 2449 | fi 2450 | 2451 | # 2452 | # gopls 2453 | # 2454 | # Go language server 2455 | # 2456 | # https://github.com/golang/tools/tree/master/gopls 2457 | # 2458 | # Notes: 2459 | # - Needed by the Go extension for Visual Studio Code 2460 | # 2461 | installkeg gopls 2462 | 2463 | # 2464 | # GPG Suite 2465 | # 2466 | # GPG keychain management & tools 2467 | # 2468 | # https://gpgtools.org 2469 | # 2470 | if [[ "$(isAppInstalled "GPG Keychain")" = "false" ]]; then 2471 | installcask gpg-suite 2472 | op document get "PGP/GPG Key" --output=private.key 2473 | gpg --import private.key 2474 | pausethescript "Enter your passphrase to finish the import of your private PGP key before continuing" 2475 | rm private.key 2476 | git config --replace-all --global user.signingkey 523390FAB896836F8769F6E1A3E03EE956F9208C 2477 | git config --replace-all --global commit.gpgsign true 2478 | fi 2479 | 2480 | # 2481 | # Grip 2482 | # 2483 | # GitHub Readme Instant Preview 2484 | # 2485 | # https://github.com/joeyespo/grip 2486 | # 2487 | installkeg grip 2488 | 2489 | # 2490 | # gulp-cli 2491 | # 2492 | # Gulp CLI 2493 | # 2494 | # https://github.com/gulpjs/gulp-cli 2495 | # 2496 | installkeg gulp-cli 2497 | 2498 | # 2499 | # Gum 2500 | # 2501 | # Utils for Shell Scripts 2502 | # 2503 | # https://github.com/charmbracelet/gum 2504 | # 2505 | installkeg gum 2506 | 2507 | # 2508 | # Hadolint 2509 | # 2510 | # Docker file linter 2511 | # 2512 | # https://github.com/hadolint/hadolint 2513 | # 2514 | installkeg hadolint 2515 | 2516 | # 2517 | # Helm 2518 | # 2519 | # Kubernetes Package Manager 2520 | # 2521 | # https://github.com/helm/helm 2522 | # 2523 | if [[ "$(isCLAppInstalled helm)" = "false" ]]; then 2524 | installkeg helm 2525 | 2526 | helm repo add argo https://argoproj.github.io/argo-helm 2527 | helm repo add bitnami https://charts.bitnami.com/bitnami 2528 | helm repo add chaoskube https://linki.github.io/chaoskube/ 2529 | helm repo add grafana https://grafana.github.io/helm-charts 2530 | helm repo add kubeinvaders https://lucky-sideburn.github.io/helm-charts/ 2531 | helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/ 2532 | helm repo add kubescape https://kubescape.github.io/helm-charts/ 2533 | helm repo add opencost https://opencost.github.io/opencost-helm-chart/ 2534 | helm repo add portainer https://portainer.github.io/k8s 2535 | helm repo add robusta https://robusta-charts.storage.googleapis.com 2536 | helm repo add yourls https://charts.yourls.org 2537 | helm repo add yugabytedb https://charts.yugabyte.com 2538 | 2539 | helm repo update 2540 | fi 2541 | 2542 | # 2543 | # Hukum 2544 | # 2545 | # Displays Github Action live progress in the terminal 2546 | # 2547 | # https://github.com/abskmj/hukum 2548 | # 2549 | installNodePackages hukum 2550 | 2551 | # 2552 | # ImageMagick 2553 | # 2554 | # Images tooling suite 2555 | # 2556 | # https://github.com/ImageMagick/ImageMagick 2557 | # 2558 | # Notes: 2559 | # - Needed before PHP install with asdf 2560 | # 2561 | installkeg imagemagick 2562 | 2563 | # 2564 | # iOS Deploy 2565 | # 2566 | # Install and debug iPhone apps from the command line, without using Xcode 2567 | # 2568 | # https://github.com/ios-control/ios-deploy 2569 | # 2570 | installkeg ios-deploy 2571 | 2572 | # 2573 | # iTermocil 2574 | # 2575 | # Pre-defined iTerm2 window/pane layouts 2576 | # 2577 | # https://github.com/TomAnthony/itermocil 2578 | # 2579 | if [[ "$(isCLAppInstalled itermocil)" = "false" ]]; then 2580 | brew install TomAnthony/brews/itermocil 2581 | restoreAppSettings itermocil 2582 | fi 2583 | 2584 | # 2585 | # Java (OpenJDK) 2586 | # 2587 | # Java programming language 2588 | # 2589 | # https://openjdk.org 2590 | # 2591 | installAsdfPlugin java openjdk-19.0.2 2592 | 2593 | # 2594 | # Jest 2595 | # 2596 | # JavaScript Testing Framework 2597 | # 2598 | # https://github.com/facebook/jest 2599 | # 2600 | installNodePackages jest 2601 | 2602 | # 2603 | # json2csv 2604 | # 2605 | # JSON to CSV converting tool 2606 | # 2607 | # https://github.com/zemirco/json2csv 2608 | # 2609 | installNodePackages json2csv 2610 | 2611 | # 2612 | # Jsonnet 2613 | # 2614 | # JSON extension for data templating 2615 | # 2616 | # https://github.com/google/jsonnet 2617 | # 2618 | installkeg jsonnet 2619 | 2620 | # 2621 | # JupyterLab 2622 | # 2623 | # Jupyter notebooks IDE 2624 | # 2625 | # https://jupyter.org/ 2626 | 2627 | installcask jupyterlab 2628 | 2629 | # 2630 | # k3d 2631 | # 2632 | # k3s multi-nodes tools for Docker 2633 | # 2634 | # https://github.com/k3d-io/k3d 2635 | # 2636 | installkeg k3d 2637 | 2638 | # 2639 | # K9s 2640 | # 2641 | # Kubernetes cluster management from the CLI 2642 | # 2643 | # https://github.com/derailed/k9s 2644 | # 2645 | installkeg k9s 2646 | 2647 | # 2648 | # Korb 2649 | # 2650 | # Move Kubernetes PVCs between Storage Classes and Namespaces (or export their content) 2651 | # 2652 | # https://github.com/BeryJu/korb 2653 | # 2654 | installkeg krob 2655 | 2656 | # 2657 | # Krew 2658 | # 2659 | # kubectl plugins manager 2660 | # 2661 | # https://github.com/kubernetes-sigs/krew 2662 | # 2663 | installkeg krew 2664 | 2665 | # 2666 | # KubeColor 2667 | # 2668 | # Colorize your kubectl output 2669 | # 2670 | # https://github.com/kubecolor/kubecolor 2671 | # 2672 | installkeg kubecolor 2673 | 2674 | # 2675 | # kubectl 2676 | # 2677 | # Kubernetes CLI 2678 | # 2679 | # https://github.com/kubernetes/kubectl 2680 | # 2681 | if [[ "$(isCLAppInstalled kubectl)" = "false" ]]; then 2682 | installkeg kubectl 2683 | kubectl krew update 2684 | fi 2685 | 2686 | # 2687 | # kubectx & kubens 2688 | # 2689 | # Kubernetes clusters & namespaces switcher 2690 | # 2691 | # https://github.com/ahmetb/kubectx 2692 | # 2693 | installkeg kubectx 2694 | 2695 | # 2696 | # Kubescape 2697 | # 2698 | # Kubernetes security audit tool 2699 | # 2700 | # https://github.com/kubescape/kubescape 2701 | # 2702 | installkeg kubescape 2703 | 2704 | # 2705 | # kustomize 2706 | # 2707 | # Customize Kubernetes YAML configurations files 2708 | # 2709 | # https://github.com/kubernetes-sigs/kustomize 2710 | # 2711 | installkeg kustomize 2712 | 2713 | # 2714 | # Lighthouse 2715 | # 2716 | # Analyzes web pages for performance & best practices 2717 | # 2718 | # https://github.com/GoogleChrome/lighthouse 2719 | # 2720 | installNodePackages lighthouse 2721 | 2722 | # 2723 | # localtunnel 2724 | # 2725 | # Expose localhost to the web 2726 | # 2727 | # https://github.com/localtunnel/localtunnel 2728 | # 2729 | installkeg localtunnel 2730 | 2731 | # 2732 | # lsof 2733 | # 2734 | # List open files 2735 | # 2736 | # https://github.com/lsof-org/lsof 2737 | # 2738 | # Notes: newer version than the macOS default one 2739 | # 2740 | installkeg lsof 2741 | 2742 | # 2743 | # Lynis 2744 | # 2745 | # Security auditing tool for Linux, macOS, and UNIX-based systems 2746 | # 2747 | # https://github.com/CISOfy/lynis 2748 | # 2749 | installkeg lynis 2750 | 2751 | # 2752 | # MAC Address Vendor Lookup 2753 | # 2754 | # Command line tool for macaddress.io API 2755 | # 2756 | # https://github.com/CodeLineFi/maclookup-cli 2757 | # 2758 | installPythonApp maclookup-cli 2759 | 2760 | # 2761 | # markdown-link-check 2762 | # 2763 | # Check links inside Markdown files 2764 | # 2765 | # https://github.com/tcort/markdown-link-check 2766 | # 2767 | installNodePackages markdown-link-check 2768 | 2769 | # 2770 | # markdownlint-cli2 2771 | # 2772 | # Markdown linting CLI 2773 | # 2774 | # https://github.com/DavidAnson/markdownlint-cli2 2775 | # 2776 | installkeg markdownlint-cli2 2777 | 2778 | # 2779 | # Microsoft Azure 2780 | # 2781 | # Azure CLI 2782 | # 2783 | # https://github.com/Azure/azure-cli 2784 | # 2785 | installkeg azure-cli 2786 | 2787 | # 2788 | # Mocha 2789 | # 2790 | # Node.js testing framework 2791 | # 2792 | # https://github.com/mochajs/mocha 2793 | installNodePackages mocha 2794 | 2795 | # 2796 | # minikube 2797 | # 2798 | # Run Kubernetes locally 2799 | # 2800 | # https://github.com/kubernetes/minikube 2801 | # 2802 | installkeg minikube 2803 | 2804 | # 2805 | # mkcert 2806 | # 2807 | # Tool to make local trusted development certificates 2808 | # 2809 | # https://github.com/FiloSottile/mkcert 2810 | # 2811 | if [[ "$(isCLAppInstalled mkcert)" = "false" ]]; then 2812 | installkeg mkcert 2813 | mkcert -install 2814 | fi 2815 | 2816 | # mongosh 2817 | # 2818 | # MongoDB Shell 2819 | # 2820 | # https://github.com/mongodb-js/mongosh 2821 | # 2822 | installkeg mongosh 2823 | 2824 | # 2825 | # MongoDB Atlas CLI 2826 | # 2827 | # MongoDB Atlas CLI 2828 | # 2829 | # https://github.com/mongodb/mongodb-atlas-cli 2830 | # 2831 | if [[ "$(isCLAppInstalled atlas)" = "false" ]]; then 2832 | installkeg mongodb-atlas-cli 2833 | confirm "Do you want to configure the MongoDB CLI now?" "atlas auth login" 2834 | fi 2835 | 2836 | # 2837 | # MongoDB Compass 2838 | # 2839 | # MongoDB GUI client 2840 | # 2841 | # https://www.mongodb.com/products/compass 2842 | # 2843 | installcask mongodb-compass 2844 | 2845 | # 2846 | # MQTT Explorer 2847 | # 2848 | # MQTT client 2849 | # 2850 | # https://github.com/thomasnordquist/MQTT-Explorer 2851 | # 2852 | installcask mqtt-explorer 2853 | 2854 | # 2855 | # MySQL Workbench 2856 | # 2857 | # MySQL Client GUI 2858 | # 2859 | # https://github.com/mysql/mysql-workbench 2860 | # 2861 | installcask mysqlworkbench 2862 | 2863 | # 2864 | # Newman 2865 | # 2866 | # Postman command-line collection runner 2867 | # 2868 | # https://github.com/postmanlabs/newman 2869 | # 2870 | installkeg newman 2871 | 2872 | # 2873 | # npm Check Updates (ncu) 2874 | # 2875 | # Find newer versions of Node package dependencies 2876 | # 2877 | # https://github.com/raineorshine/npm-check-updates 2878 | # 2879 | installNodePackages npm-check-updates 2880 | 2881 | # 2882 | # OpenAPI Validator 2883 | # 2884 | # OpenAPI linter & validator 2885 | # 2886 | # https://github.com/IBM/openapi-validator 2887 | # 2888 | installNodePackages ibm-openapi-validator 2889 | 2890 | # 2891 | # Perl 2892 | # 2893 | # Perl programming language 2894 | # 2895 | # https://github.com/Perl/perl5 2896 | # 2897 | installAsdfPlugin perl 5.36.1 2898 | 2899 | # 2900 | # pgAdmin 4 2901 | # 2902 | # PostgreSQL client 2903 | # 2904 | # https://github.com/pgadmin-org/pgadmin4 2905 | # 2906 | installcask pgadmin4 2907 | 2908 | # 2909 | # PHP 2910 | # 2911 | # PHP programming language 2912 | # 2913 | # https://github.com/php/php-src 2914 | # 2915 | # 2916 | # PHP Dependencies: 2917 | # 2918 | # Bison 2919 | # Parser generator 2920 | # https://www.gnu.org/software/bison/ 2921 | # 2922 | # GMP 2923 | # GNU multiple precision arithmetic library 2924 | # https://gmplib.org 2925 | # 2926 | # ICU 2927 | # C/C++ and Java libraries for Unicode and globalization 2928 | # https://icu.unicode.org 2929 | # 2930 | # LibGD 2931 | # Graphics library to dynamically manipulate images 2932 | # https://libgd.github.io 2933 | # 2934 | # libiconv 2935 | # Conversion library 2936 | # https://www.gnu.org/software/libiconv/ 2937 | # 2938 | # libzip 2939 | # C library for reading, creating, and modifying zip archives 2940 | # https://libzip.org 2941 | # 2942 | # pkg-config 2943 | # Manage compile and link flags for libraries 2944 | # https://freedesktop.org/wiki/Software/pkg-config/ 2945 | # 2946 | # re2c 2947 | # Generate C-based recognizers from regular expressions 2948 | # https://re2c.org 2949 | # 2950 | # Sodium 2951 | # NaCl networking and cryptography library 2952 | # https://libsodium.org 2953 | # 2954 | if [[ ! $(asdf current php) ]]; then 2955 | installkeg bison 2956 | installkeg gmp 2957 | installkeg icu4c 2958 | installkeg libgd 2959 | installkeg libiconv 2960 | installkeg libzip 2961 | installkeg pkg-config 2962 | installkeg re2c 2963 | installkeg libsodium 2964 | 2965 | installAsdfPlugin php 8.3.0 2966 | fi 2967 | 2968 | # 2969 | # PHP_CodeSniffer 2970 | # 2971 | # PHP linter 2972 | # 2973 | # https://github.com/squizlabs/PHP_CodeSniffer 2974 | # 2975 | installkeg php-code-sniffer 2976 | 2977 | # 2978 | # Postman 2979 | # 2980 | # GUI for managing, calling, and testing APIs 2981 | # 2982 | # https://postman.com 2983 | # 2984 | installcask postman 2985 | 2986 | # 2987 | # PowerShell 2988 | # 2989 | # Cross-platform command-line shell task automation solution, a scripting language, and a configuration management framework 2990 | # 2991 | # https://github.com/PowerShell/PowerShell 2992 | # 2993 | installcask powershell 2994 | 2995 | # 2996 | # Prettier 2997 | # 2998 | # Code formatter 2999 | # 3000 | # https://github.com/prettier/prettier 3001 | # 3002 | installkeg prettier 3003 | 3004 | # 3005 | # Puppeteer 3006 | # 3007 | # Headless Chrome Node.js API for automation 3008 | # 3009 | # https://github.com/puppeteer/puppeteer 3010 | # 3011 | installNodePackages puppeteer 3012 | 3013 | # 3014 | # Ruby 3015 | # 3016 | # Ruby programming language 3017 | # 3018 | # https://github.com/ruby/ruby 3019 | # 3020 | installAsdfPlugin ruby 3.2.2 3021 | 3022 | # 3023 | # React Native CLI 3024 | # 3025 | # CLI for React Native development 3026 | # 3027 | # https://github.com/facebook/react-native 3028 | # 3029 | installkeg react-native-cli 3030 | 3031 | # 3032 | # Rust 3033 | # 3034 | # Rust programming language 3035 | # 3036 | # https://github.com/rust-lang/rust 3037 | # 3038 | installAsdfPlugin rust 1.75.0 3039 | 3040 | # 3041 | # S3cmd 3042 | # 3043 | # CLI for AWS S3 3044 | # 3045 | # https://github.com/s3tools/s3cmd 3046 | # 3047 | if [[ "$(isCLAppInstalled s3cmd)" = "false" ]]; then 3048 | installkeg s3cmd 3049 | 3050 | confirm "Do you want to configure s3cmd right now?" "s3cmd --configure" 3051 | fi 3052 | 3053 | # 3054 | # secretlint 3055 | # 3056 | # Pluggable linting tool to prevent committing credential. 3057 | # 3058 | # https://github.com/secretlint/secretlint 3059 | # 3060 | if [[ "$(isCLAppInstalled secretlint)" = "false" ]]; then 3061 | installNodePackages secretlint 3062 | installNodePackages @secretlint/secretlint-rule-preset-recommend 3063 | fi 3064 | 3065 | # 3066 | # ShellCheck 3067 | # 3068 | # Shell scripts linter 3069 | # 3070 | # https://github.com/koalaman/shellcheck 3071 | # 3072 | installkeg shellcheck 3073 | 3074 | # 3075 | # Steampipe 3076 | # 3077 | # Use SQL to query cloud infrastructure & more 3078 | # 3079 | # https://github.com/turbot/steampipe 3080 | # 3081 | installkeg steampipe 3082 | 3083 | # 3084 | # Stern 3085 | # 3086 | # Multi pod and container log tailing for Kubernetes 3087 | # 3088 | # https://github.com/stern/stern 3089 | # 3090 | installkeg stern 3091 | 3092 | # 3093 | # Stylelint 3094 | # 3095 | # CSS, SCSS, Sass, Less & SugarSS linter 3096 | # 3097 | # https://github.com/stylelint/stylelint 3098 | # 3099 | installkeg stylelint 3100 | installNodePackages stylelint-config-recommended 3101 | 3102 | # 3103 | # Telnet 3104 | # 3105 | # Terminal emulation for logging into a remote hosts 3106 | # 3107 | # https://github.com/apple-oss-distributions/remote_cmds/tree/main/telnet 3108 | # 3109 | installkeg telnet 3110 | 3111 | # 3112 | # Terraform 3113 | # 3114 | # Infrastructure as Code (IaC) 3115 | # 3116 | # https://github.com/hashicorp/terraform 3117 | # 3118 | installkeg hashicorp/tap/terraform 3119 | 3120 | # 3121 | # TFLint 3122 | # 3123 | # Terraform Linter 3124 | # 3125 | # https://github.com/terraform-linters/tflint 3126 | # 3127 | if [[ "$(isCLAppInstalled tflint)" = "false" ]]; then 3128 | installkeg tflint 3129 | tflint --init 3130 | fi 3131 | 3132 | # 3133 | # tfsec 3134 | # 3135 | # Terraform security scanner 3136 | # 3137 | # https://github.com/aquasecurity/tfsec 3138 | # 3139 | installkeg tfsec 3140 | 3141 | # 3142 | # TypeScript 3143 | # 3144 | # JavaScript superset 3145 | # 3146 | # https://github.com/microsoft/TypeScript/ 3147 | # 3148 | installkeg typescript 3149 | 3150 | # 3151 | # UTM 3152 | # 3153 | # Virtual machine host 3154 | # 3155 | # https://github.com/utmapp/UTM 3156 | # 3157 | installcask utm 3158 | 3159 | # 3160 | # vale 3161 | # 3162 | # Text validator 3163 | # 3164 | # https://github.com/errata-ai/vale 3165 | # 3166 | installkeg vale 3167 | 3168 | # 3169 | # Vault 3170 | # 3171 | # HashiCorp Vault CLI 3172 | # 3173 | # https://github.com/hashicorp/vault 3174 | # 3175 | if [[ "$(isCLAppInstalled defbro)" = "false" ]]; then 3176 | brew tap hashicorp/tap 3177 | brew install hashicorp/tap/vault 3178 | confirm "Do you want to connect the Vault CLI now?" "vault login" 3179 | fi 3180 | 3181 | # 3182 | # Vercel CLI 3183 | # 3184 | # CLI for Vercel 3185 | # 3186 | # https://github.com/vercel/vercel 3187 | # 3188 | if [[ "$(isCLAppInstalled vercel)" = "false" ]]; then 3189 | installkeg vercel-cli 3190 | vercel login $email 3191 | fi 3192 | 3193 | # 3194 | # vultr-cli 3195 | # 3196 | # Vultr CLI 3197 | # 3198 | # https://github.com/vultr/vultr-cli 3199 | # 3200 | installkeg vultr/vultr-cli/vultr-cli 3201 | 3202 | # 3203 | # Webhint 3204 | # 3205 | # Accessibility, speed, cross-browser compatibility analysis tool 3206 | # 3207 | # https://github.com/webhintio/hint 3208 | # 3209 | installNodePackages hint 3210 | 3211 | # 3212 | # Webpack 3213 | # 3214 | # JavaScript bundler 3215 | # 3216 | # https://github.com/webpack/webpack 3217 | # 3218 | installkeg webpack 3219 | 3220 | # 3221 | # woff2 3222 | # 3223 | # woff2 fonts tools 3224 | # 3225 | # https://github.com/google/woff2 3226 | # 3227 | # Notes: the binary for decompressing woff2 to otf is called woff2_decompress 3228 | # 3229 | installkeg woff2 3230 | 3231 | # 3232 | # xcodes 3233 | # 3234 | # Xcode versions management 3235 | # 3236 | # https://github.com/XcodesOrg/xcodes 3237 | # 3238 | # Notes: to list runtimes `xcodes runtimes` 3239 | # 3240 | if [[ "$(isCLAppInstalled xcodes)" = "false" ]]; then 3241 | installkeg xcodesorg/made/xcodes 3242 | xcodes runtimes install "iOS 17.4" 3243 | fi 3244 | 3245 | # 3246 | # yamale 3247 | # 3248 | # YAML Schema validator 3249 | # 3250 | # https://github.com/23andMe/Yamale 3251 | # 3252 | installkeg yamale 3253 | 3254 | # 3255 | # yamllint 3256 | # 3257 | # YAML files linter 3258 | # 3259 | # https://github.com/adrienverge/yamllint 3260 | # 3261 | installkeg yamllint 3262 | 3263 | # 3264 | # Yarn 3265 | # 3266 | # npm alternative 3267 | # 3268 | # https://github.com/yarnpkg/yarn 3269 | # 3270 | # Notes: 3271 | # - Installing with npm instead of Homebrew so it's easier when updating Node.js version with asdf 3272 | # 3273 | if [[ "$(isCLAppInstalled yarn)" = "false" ]]; then 3274 | installNodePackages yarn 3275 | yarn config set --home enableTelemetry 0 3276 | fi 3277 | 3278 | # 3279 | # Yeoman 3280 | # 3281 | # Scaffolding tool 3282 | # 3283 | # https://github.com/yeoman/yeoman 3284 | # 3285 | installNodePackages yo 3286 | 3287 | # 3288 | # yq 3289 | # 3290 | # YAML processor 3291 | # 3292 | # https://github.com/mikefarah/yq 3293 | # 3294 | installkeg yq 3295 | 3296 | 3297 | ###################### 3298 | # # 3299 | # Command line tools # 3300 | # # 3301 | ###################### 3302 | 3303 | displaySection "Command line tools" 3304 | 3305 | # 3306 | # alex 3307 | # 3308 | # Text analyzer to catch insensitive, and inconsiderate writing 3309 | # 3310 | # https://github.com/get-alex/alex 3311 | # 3312 | installkeg alexjs 3313 | 3314 | # 3315 | # Asciinema + svg-term-cli + agg 3316 | # 3317 | # Terminal session recorder 3318 | # Convert tool for asciicast to animated SVG 3319 | # asciinema gif generator 3320 | # 3321 | # https://github.com/asciinema/asciinema 3322 | # https://github.com/marionebl/svg-term-cli 3323 | # https://github.com/asciinema/agg 3324 | # 3325 | if [[ "$(isCLAppInstalled asciinema)" = "false" ]]; then 3326 | installkeg asciinema 3327 | asciinema auth 3328 | pausethescript "Authenticate with asciinema before continuing the installation script." 3329 | installNodePackages svg-term-cli 3330 | installkeg agg 3331 | fi 3332 | 3333 | # 3334 | # asimov 3335 | # 3336 | # Excludes developers dependencies automatically from Time Machine backups 3337 | # 3338 | # https://github.com/stevegrunwell/asimov 3339 | # 3340 | if [[ "$(isCLAppInstalled asimov)" = "false" ]]; then 3341 | installkeg asimov 3342 | asimov 3343 | sudo brew services start asimov 3344 | fi 3345 | 3346 | # 3347 | # backgroundremover 3348 | # 3349 | # Image & video background remover 3350 | # 3351 | # https://github.com/nadermx/backgroundremover 3352 | # 3353 | installPythonApp backgroundremover 3354 | 3355 | # 3356 | # Bandwhich 3357 | # 3358 | # Network utilization visualization terminal tool 3359 | # 3360 | # https://github.com/imsnif/bandwhich 3361 | # 3362 | installkeg bandwhich 3363 | 3364 | # 3365 | # Bat 3366 | # 3367 | # A better cat 3368 | # 3369 | # https://github.com/sharkdp/bat 3370 | # 3371 | installkeg bat 3372 | 3373 | # 3374 | # ccase 3375 | # 3376 | # Command line interface to convert strings into any case 3377 | # 3378 | # https://github.com/rutrum/ccase 3379 | # 3380 | cargo install ccase 3381 | 3382 | # 3383 | # Color LS + Nerd Fonts 3384 | # 3385 | # Beautifies the terminal's ls command 3386 | # Fonts collections aggregator 3387 | # 3388 | # https://github.com/athityakumar/colorls 3389 | # https://github.com/ryanoasis/nerd-fonts 3390 | # 3391 | if [[ "$(isCLAppInstalled colorls)" = "false" ]]; then 3392 | gem install colorls 3393 | installcask font-hack-nerd-font 3394 | fi 3395 | 3396 | # 3397 | # Coreutils 3398 | # 3399 | # Basic file, shell and text manipulation utilities 3400 | # 3401 | # https://www.gnu.org/software/coreutils/ 3402 | # 3403 | # Notes 3404 | # - Needed for shuf, which is used in the espanso trigger "":randomtime" 3405 | # 3406 | installkeg coreutils 3407 | 3408 | # 3409 | # Coursera Downloader 3410 | # 3411 | # CLI to download Coursera courses 3412 | # 3413 | # https://github.com/coursera-dl/coursera-dl 3414 | # 3415 | installPythonApp coursera-dl 3416 | 3417 | # 3418 | # diff-pdf 3419 | # 3420 | # Tool for visually comparing two PDF files 3421 | # 3422 | # https://github.com/vslavik/diff-pdf 3423 | # 3424 | installkeg diff-pdf 3425 | 3426 | # 3427 | # empty-trash-cli 3428 | # 3429 | # CLI to empty the trash 3430 | # 3431 | # https://github.com/sindresorhus/empty-trash-cli 3432 | # 3433 | installNodePackages empty-trash-cli 3434 | 3435 | # 3436 | # fd 3437 | # 3438 | # A simple, fast and user-friendly alternative to 'find' 3439 | # 3440 | # https://github.com/sharkdp/fd 3441 | # 3442 | installkeg fd 3443 | 3444 | # 3445 | # FFmpeg 3446 | # ffmpeg-progressbar-cli 3447 | # 3448 | # Libraries and tools to process multimedia content like video, audio & more 3449 | # A colored progress bar for FFmpeg 3450 | # 3451 | # https://github.com/FFmpeg/FFmpeg 3452 | # https://github.com/sidneys/ffmpeg-progressbar-cli 3453 | # 3454 | installkeg ffmpeg 3455 | installNodePackages ffmpeg-progressbar-cli 3456 | 3457 | # 3458 | # FFmpeg Quality Metrics 3459 | # 3460 | # CLI video quality metrics tool using FFmpeg 3461 | # 3462 | # https://github.com/slhck/ffmpeg-quality-metrics 3463 | # 3464 | installPythonApp ffmpeg-quality-metrics 3465 | 3466 | # 3467 | # file-icon-cli 3468 | # 3469 | # Get the file or app icon as a PNG 3470 | # 3471 | # https://github.com/sindresorhus/file-icon-cli 3472 | # 3473 | installNodePackages file-icon-cli 3474 | 3475 | # 3476 | # Ghostscript 3477 | # 3478 | # PostScript & PDF intepreter 3479 | # 3480 | # https://www.ghostscript.com 3481 | # 3482 | installkeg ghostscript 3483 | 3484 | # 3485 | # GHunt 3486 | # 3487 | # Google OSINT tool 3488 | # 3489 | # https://github.com/mxrch/GHunt 3490 | # 3491 | if [[ "$(isCLAppInstalled ghunt)" = "false" ]]; then 3492 | installPythonApp ghunt 3493 | ghunt login 3494 | fi 3495 | 3496 | # 3497 | # gifsicle 3498 | # 3499 | # Create, manipulate, and optimize GIF images and animations 3500 | # 3501 | # https://github.com/kohler/gifsicle 3502 | # 3503 | installkeg gifsicle 3504 | 3505 | # 3506 | # gsed 3507 | # 3508 | # GNU sed which support extended regular expressions 3509 | # 3510 | # https://www.gnu.org/software/sed/ 3511 | # 3512 | installkeg gsed 3513 | 3514 | # 3515 | # Homebrew Command Not Found 3516 | # 3517 | # Suggest a package to install when the command is not found 3518 | # 3519 | # https://github.com/Homebrew/homebrew-command-not-found 3520 | # 3521 | brew tap homebrew/command-not-found 3522 | 3523 | # 3524 | # htop 3525 | # 3526 | # Terminal interactive process viewer 3527 | # 3528 | # https://github.com/htop-dev/htop 3529 | # 3530 | installkeg htop 3531 | 3532 | # 3533 | # HTTPie 3534 | # 3535 | # Terminal HTTP client 3536 | # 3537 | # https://github.com/httpie/httpie 3538 | # 3539 | installkeg httpie 3540 | 3541 | # 3542 | # libsixel 3543 | # 3544 | # SIXEL image format encoder/decoder 3545 | # 3546 | # https://github.com/saitoha/libsixel 3547 | # 3548 | # Notes: img2sixel is the binary 3549 | # 3550 | installkeg libsixel 3551 | 3552 | # 3553 | # LinkChecker 3554 | # 3555 | # cli tool to check all links from a website or specific page 3556 | # 3557 | # https://github.com/wummel/linkchecker 3558 | # 3559 | installPythonApp linkchecker 3560 | 3561 | # 3562 | # lsusb 3563 | # 3564 | # Tool to list USB devices 3565 | # 3566 | # https://github.com/jlhonora/lsusb 3567 | # 3568 | installkeg lsusb 3569 | 3570 | # 3571 | # LZip 3572 | # 3573 | # Lossless data compressor 3574 | # 3575 | # https://www.nongnu.org/lzip 3576 | # 3577 | installkeg lzip 3578 | 3579 | # 3580 | # macos-focus-mode 3581 | # 3582 | # Control macOS Do Not Disturb from the command line 3583 | # 3584 | # https://github.com/arodik/macos-focus-mode 3585 | # 3586 | # Notes: used by MeetingBar AppleScript automation 3587 | # 3588 | if [[ "$(isCLAppInstalled macos-focus-mode)" = "false" ]]; then 3589 | installNodePackages macos-focus-mode 3590 | macos-focus-mode install 3591 | fi 3592 | 3593 | # 3594 | # markmap 3595 | # 3596 | # Markdown as mindmaps visualization tool 3597 | # 3598 | # https://github.com/markmap/markmap 3599 | # 3600 | installNodePackages markmap-cli 3601 | 3602 | # 3603 | # mermaid-cli 3604 | # 3605 | # Mermaid CLI 3606 | # 3607 | # https://github.com/mermaid-js/mermaid-cli 3608 | # 3609 | installNodePackages mermaid-cli 3610 | 3611 | # 3612 | # Miller 3613 | # 3614 | # CSV processor 3615 | # 3616 | # https://github.com/johnkerl/miller 3617 | # 3618 | installkeg miller 3619 | 3620 | # 3621 | # ncdu-zig 3622 | # 3623 | # Command line disk usage analyzer 3624 | # 3625 | # https://code.blicky.net/yorhel/ncdu 3626 | # 3627 | installkeg ncdu 3628 | 3629 | # 3630 | # nmap 3631 | # 3632 | # Network discovery and security auditing tool 3633 | # 3634 | # https://github.com/nmap/nmap 3635 | # 3636 | installkeg nmap 3637 | 3638 | # 3639 | # Noti 3640 | # 3641 | # Monitor a process and trigger a notification when the process is done 3642 | # 3643 | # https://github.com/variadico/noti 3644 | # 3645 | installkeg noti 3646 | 3647 | # 3648 | # Pandoc 3649 | # 3650 | # Markup converter 3651 | # 3652 | # https://github.com/jgm/pandoc 3653 | # 3654 | # Notes: 3655 | # - Using it for my resume https://github.com/fharper/resume 3656 | # 3657 | installkeg pandoc 3658 | 3659 | # 3660 | # pdf2svg 3661 | # 3662 | # PDF to SVG converter 3663 | # 3664 | # https://github.com/dawbarton/pdf2svg/ 3665 | # 3666 | installkeg pdf2svg 3667 | 3668 | # 3669 | # pdfcrack 3670 | # 3671 | # PDF Protection Brute Force Cracker 3672 | # 3673 | # https://sourceforge.net/projects/pdfcrack/ 3674 | # 3675 | installkeg pdfcrack 3676 | 3677 | # 3678 | # peco 3679 | # 3680 | # Simplistic interactive filtering tool 3681 | # 3682 | # https://github.com/peco/peco 3683 | # 3684 | installkeg peco 3685 | 3686 | # 3687 | # Poppler 3688 | # 3689 | # PDF rendering library 3690 | # 3691 | # https://poppler.freedesktop.org/ 3692 | # 3693 | # Notes: 3694 | # - I use Poppler for the executables: 3695 | # - pdfimages to extract images from PDFs 3696 | # - pdffonts to list embedded fonts from PDFs 3697 | # . - pdfinfo to get information from PDFs 3698 | # 3699 | installkeg poppler 3700 | 3701 | # 3702 | # Public-ip-cli 3703 | # 3704 | # Get public IP 3705 | # 3706 | # https://github.com/sindresorhus/public-ip-cli 3707 | # 3708 | installNodePackages public-ip-cli 3709 | 3710 | # 3711 | # QPDF 3712 | # 3713 | # Tools for and transforming and inspecting PDF files 3714 | # 3715 | # https://github.com/qpdf/qpdf 3716 | # 3717 | installkeg qpdf 3718 | 3719 | # 3720 | # Rename 3721 | # 3722 | # CLI for renaming multiple files based on regex 3723 | # 3724 | # https://github.com/ap/rename 3725 | # 3726 | installkeg rename 3727 | 3728 | # 3729 | # Ripgrep 3730 | # 3731 | # Recursively searches directories for a regex pattern 3732 | # 3733 | # https://github.com/BurntSushi/ripgrep 3734 | # 3735 | installkeg ripgrep 3736 | 3737 | # 3738 | # Scout 3739 | # 3740 | # Reading, writing & converting JSON, Plist, YAML and XML files 3741 | # 3742 | # https://github.com/ABridoux/scout 3743 | # 3744 | if [[ "$(isCLAppInstalled scout)" = "false" ]]; then 3745 | brew tap ABridoux/formulae 3746 | installkeg scout 3747 | fi 3748 | 3749 | # 3750 | # speedtest-cli 3751 | # 3752 | # Internet bandwidth speed test 3753 | # 3754 | # https://github.com/sivel/speedtest-cli 3755 | # 3756 | # Notes: used by utils.zsh 3757 | # 3758 | installkeg speedtest-cli 3759 | 3760 | # 3761 | # Stress 3762 | # 3763 | # Stress test your hardware 3764 | # 3765 | # https://github.com/resurrecting-open-source-projects/stress 3766 | # 3767 | installkeg stress 3768 | 3769 | # 3770 | # SVGO 3771 | # 3772 | # SVG Optimizer 3773 | # 3774 | # https://github.com/svg/svgo 3775 | # 3776 | installkeg svgo 3777 | 3778 | # 3779 | # termdown 3780 | # 3781 | # Countdown timer & stopwatch 3782 | # 3783 | # https://github.com/trehn/termdown 3784 | # 3785 | installPythonApp termdown 3786 | 3787 | # 3788 | # The Fuck 3789 | # 3790 | # Corrects your previous console command 3791 | # 3792 | # https://github.com/nvbn/thefuck 3793 | # 3794 | installkeg thefuck 3795 | 3796 | # 3797 | # tldr-pages 3798 | # 3799 | # Consice commmunity-driven man pages 3800 | # 3801 | # https://github.com/tldr-pages/tldr 3802 | # 3803 | installkeg tldr 3804 | 3805 | # 3806 | # topgrade 3807 | # 3808 | # upgrade everything with one tool 3809 | # 3810 | # https://github.com/topgrade-rs/topgrade 3811 | # 3812 | installkeg topgrade 3813 | 3814 | # 3815 | # video-compare 3816 | # 3817 | # Visual split screen video comparaison tool 3818 | # 3819 | # https://github.com/pixop/video-compare 3820 | # 3821 | installkeg video-compare 3822 | 3823 | # 3824 | # Vundle 3825 | # 3826 | # Vim plugin manager 3827 | # 3828 | # https://github.com/VundleVim/Vundle.vim 3829 | # 3830 | if [[ ! -d "$HOME/.vim/bundle/Vundle.vim" ]]; then 3831 | git clone git@github.com:VundleVim/Vundle.vim.git $HOME/.vim/bundle/Vundle.vim 3832 | vim +PluginInstall 3833 | fi 3834 | 3835 | # 3836 | # wget 3837 | # 3838 | # CLI download tool 3839 | # 3840 | # https://github.com/mirror/wget 3841 | # 3842 | installkeg wget 3843 | 3844 | # 3845 | # Wifi Password 3846 | # 3847 | # Obtain connected wifi password 3848 | # 3849 | # https://github.com/rauchg/wifi-password 3850 | # 3851 | installkeg wifi-password 3852 | 3853 | # 3854 | # wkhtmltopdf 3855 | # 3856 | # Convert HTML to PDF 3857 | # 3858 | # https://github.com/wkhtmltopdf/wkhtmltopdf 3859 | # 3860 | # Notes: 3861 | # - listed as a Cask, but it's a Keg 3862 | # 3863 | installkeg wkhtmltopdf 3864 | 3865 | # 3866 | # yt-dlp  3867 | # 3868 | # Video downloader (YouTube & all) 3869 | # 3870 | # https://github.com/yt-dlp/yt-dlp 3871 | # https://github.com/ariya/phantomjs 3872 | # 3873 | installkeg yt-dlp 3874 | 3875 | # 3876 | # zsh-bench 3877 | # 3878 | # Benchmark for interactive Zsh 3879 | # 3880 | # https://github.com/romkatv/zsh-bench 3881 | # 3882 | # Note: 3883 | # - run a benchmark, use: $HOME/zsh-bench/zsh-bench 3884 | # 3885 | if [ ! -d $HOME/zsh-bench ]; then 3886 | git clone https://github.com/romkatv/zsh-bench $HOME/zsh-bench 3887 | fi 3888 | 3889 | 3890 | ################ 3891 | # # 3892 | # Applications # 3893 | # # 3894 | ################ 3895 | 3896 | displaySection "Applications" 3897 | 3898 | # 3899 | # Actions 3900 | # 3901 | # Additional actions for the Shortcuts app 3902 | # 3903 | # https://github.com/sindresorhus/Actions 3904 | # 3905 | installFromAppStore "Actions" 1586435171 3906 | 3907 | # 3908 | # Affinity Designer 3909 | # 3910 | # Vector Graphics Design Tool 3911 | # 3912 | # https://affinity.serif.com/en-us/designer 3913 | # 3914 | # Notes: 3915 | # - Homebrew version is Affinity Designer 2, which needs a subscription 3916 | # 3917 | installFromAppStore "Affinity Designer" 824171161 3918 | 3919 | # 3920 | # AirBuddy 3921 | # 3922 | # Bluetooth devices battery monitoring & alerts 3923 | # 3924 | # https://airbuddy.app 3925 | # 3926 | if [[ "$(isAppInstalled "AirBuddy")" = "false" ]]; then 3927 | curl -L https://su.airbuddy.app/kCRSAmcjBc/AirBuddy_v2.7-624.dmg --output AirBuddy.dmg 3928 | installDMG AirBuddy.dmg true 3929 | getLicense AirBuddy 3930 | fi 3931 | 3932 | # 3933 | # Akai Pro MPC Beats 3934 | # 3935 | # Software for my AKAI Professional MPD218 3936 | # 3937 | # https://www.akaipro.com/mpc-beats 3938 | # 3939 | if [[ "$(isAppInstalled "MPC Beats")" = "false" ]]; then 3940 | echo $fg[blue]"Starting the installation of Akai Pro MPC Beats"$reset_color 3941 | curl -L https://cdn.inmusicbrands.com/akai/M2P11C6VI/Install-MPC-Beats-v2.11-2.11.6.8-release-Mac.zip --output mpc-beats.zip 3942 | unzip -j -o mpc-beats.zip -d . 3943 | rm mpc-beats.zip 3944 | rm -rf __MACOSX #created by the unzip call 3945 | local filename=$(findfilewithregex "Install-MPC-Beats") 3946 | installPKG "$filename" 3947 | fi 3948 | 3949 | # 3950 | # App Tamer 3951 | # 3952 | # CPU Throttling Tool 3953 | # 3954 | # https://www.stclairsoft.com/AppTamer/ 3955 | # 3956 | if [[ "$(isAppInstalled "App Tamer")" = "false" ]]; then 3957 | installcask app-tamer 3958 | open -a "App Tamer" 3959 | getLicense "App Tamer" 3960 | fi 3961 | 3962 | # 3963 | # AppCleaner 3964 | # 3965 | # Applications uninstaller 3966 | # 3967 | # https://freemacsoft.net/appcleaner 3968 | # 3969 | if [[ "$(isAppInstalled AppCleaner)" = "false" ]]; then 3970 | installcask appcleaner 3971 | restoreAppSettings appcleaner 3972 | giveFullDiskAccessPermission "AppCleaner" 3973 | fi 3974 | 3975 | # 3976 | # Around 3977 | # 3978 | # Video call app 3979 | # 3980 | # https://www.around.co 3981 | # 3982 | installcask around 3983 | 3984 | # 3985 | # Audacity 3986 | # 3987 | # Audio editor 3988 | # 3989 | # https://github.com/audacity/audacity 3990 | # 3991 | installcask audacity 3992 | 3993 | # 3994 | # AutoMute 3995 | # 3996 | # Mute your laptop when your headphones disconnect 3997 | # 3998 | # https://github.com/yonilevy/automute 3999 | # 4000 | # Notes: 4001 | # - AutoMute in Homebrew isn't the same application 4002 | # 4003 | installFromAppStore "AutoMute" 1118136179 4004 | 4005 | # 4006 | # Bearded Spice 4007 | # 4008 | # Control web based media players & some apps with media keys on Keyboard 4009 | # 4010 | # https://github.com/beardedspice/beardedspice 4011 | # 4012 | installcask beardedspice 4013 | 4014 | # 4015 | # BlockBlock 4016 | # 4017 | # Monitor persistence locations 4018 | # 4019 | # https://github.com/objective-see/BlockBlock 4020 | # 4021 | if [[ "$(isAppInstalled "BlockBlock Helper")" = "false" ]]; then 4022 | installcask blockblock 4023 | loginitems -a "BlockBlock Helper" 4024 | fi 4025 | 4026 | # 4027 | # Brave Browser 4028 | # 4029 | # Chromium based browser 4030 | # 4031 | # https://github.com/brave 4032 | # 4033 | if [[ "$(isAppInstalled "Brave Browser")" = "false" ]]; then 4034 | installcask brave-browser 4035 | 4036 | # Install the 1Password extension 4037 | open -a "Brave Browser" 4038 | /Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser https://chrome.google.com/webstore/detail/1password-%E2%80%93-password-mana/aeblfdkhhhdcdjpifhhbdiojplfjncoa 4039 | fi 4040 | 4041 | # 4042 | # Calibre + DeDRM Tools 4043 | # 4044 | # Ebook Manager 4045 | # Ebook DRM Remover Calibre Plugin 4046 | # 4047 | # https://github.com/kovidgoyal/calibre 4048 | # https://github.com/noDRM/DeDRM_tools 4049 | # 4050 | if [[ "$(isAppInstalled calibre)" = "false" ]]; then 4051 | installcask calibre 4052 | 4053 | curl -L "$(lastversion noDRM/DeDRM_tools --assets)" --output Calibre-DeDRM.zip 4054 | unzip Calibre-DeDRM.zip "DeDRM_plugin.zip" 4055 | rm Calibre-DeDRM.zip 4056 | rm -rf __MACOSX #created by the unzip call 4057 | 4058 | open -a Calibre 4059 | open . 4060 | pausethescript "Install the DeDRM plugin into Calibre before continuing. In Calibre, go to 'Preferences', and under the 'Advanced' section, click on 'Plugins'. On the Plugins window, press the 'Load plugin from file' and drop the 'DeDRM_plugin.zip' file into the File window. Click 'Open', 'Yes', 'OK', 'Apply' & 'Close'. You can now quit Calibre." 4061 | rm DeDRM_plugin.zip 4062 | 4063 | duti -s net.kovidgoyal.calibre org.idpf.epub-container all # ePub 4064 | duti -s net.kovidgoyal.calibre dyn.ah62d4rv4ge80c8x1gq all #Kindle ebooks 4065 | fi 4066 | 4067 | # 4068 | # Captin 4069 | # 4070 | # App that show the caps lock status 4071 | # 4072 | # https://captin.mystrikingly.com/ 4073 | # 4074 | installcask captin 4075 | 4076 | # 4077 | # Chromium Ungoogled 4078 | # 4079 | # Chromium without Google stuff 4080 | # 4081 | # https://github.com/Eloston/ungoogled-chromium#downloads 4082 | # 4083 | # Notes: 4084 | # - need to detect if installed already manually since the application name is different from the Homebrew Cask one 4085 | # 4086 | if [[ "$(isAppInstalled Chromium)" = "false" ]]; then 4087 | installcask eloston-chromium 4088 | fi 4089 | 4090 | # 4091 | # Command X 4092 | # 4093 | # Finder's cut & paste 4094 | # 4095 | # https://sindresorhus.com/command-x 4096 | # 4097 | mas install 6448461551 4098 | 4099 | # 4100 | # Cryptomator & macFUSE 4101 | # 4102 | # Data encryption tool 4103 | # 4104 | # https://github.com/cryptomator/cryptomator 4105 | # 4106 | if [[ "$(isAppInstalled Cryptomator)" = "false" ]]; then 4107 | installcask cryptomator 4108 | open -a Cryptomator 4109 | getLicense Cryptomator 4110 | pausethescript "Add your vault to Cryptomator" 4111 | fi 4112 | 4113 | # 4114 | # CyberDuck 4115 | # 4116 | # FTP Client 4117 | # 4118 | # https://github.com/iterate-ch/cyberduck 4119 | # 4120 | if [[ "$(isAppInstalled Cyberduck)" = "false" ]]; then 4121 | installcask cyberduck 4122 | restoreAppSettings cyberduck 4123 | getLicenseFile "Cyberduck" "license.cyberducklicense" 4124 | fi 4125 | 4126 | # 4127 | # DaisyDisk 4128 | # 4129 | # Disk data & space analyzer 4130 | # 4131 | # https://daisydiskapp.com 4132 | # 4133 | if [[ "$(isAppInstalled DaisyDisk)" = "false" ]]; then 4134 | installcask daisydisk 4135 | getLicense "DaisyDisk" 4136 | fi 4137 | 4138 | # 4139 | # Deckset 4140 | # 4141 | # Presentation slides designing tool using Markdown 4142 | # 4143 | # https://www.deckset.com 4144 | # 4145 | installcask deckset 4146 | 4147 | # 4148 | # Descript 4149 | # 4150 | # Video transcription & edition 4151 | # 4152 | # https://www.descript.com 4153 | # 4154 | installcask descript 4155 | 4156 | # 4157 | # Discord 4158 | # 4159 | # Chat application 4160 | # 4161 | # https://discord.com/ 4162 | # 4163 | installcask discord 4164 | 4165 | # 4166 | # Disk Drill 4167 | # 4168 | # Data Recovery Tool 4169 | # 4170 | # https://www.cleverfiles.com/ 4171 | # 4172 | # Notes: 4173 | # - need to detect if installed already manually since the application name is different from the Homebrew Cask one 4174 | # 4175 | if [[ "$(isAppInstalled "Disk Drill")" = "false" ]]; then 4176 | installcask disk-drill 4177 | fi 4178 | 4179 | # 4180 | # DHS 4181 | # 4182 | # dylib hijack scanner 4183 | # 4184 | # https://objective-see.org/products/dhs.html 4185 | # 4186 | installcask dhs 4187 | 4188 | # 4189 | # DuckDuckGo 4190 | # 4191 | # Browser 4192 | # 4193 | # https://duckduckgo.com 4194 | # 4195 | installcask duckduckgo 4196 | 4197 | # 4198 | # Elgato Lights Control Center 4199 | # 4200 | # Elgato Lights Control App 4201 | # 4202 | # https://www.elgato.com/en/gaming/key-light 4203 | # 4204 | # Notes: 4205 | # - need to detect if installed already manually since the application name is different from the Homebrew Cask one 4206 | # 4207 | if [[ "$(isAppInstalled "Elgato Control Center")" = "false" ]]; then 4208 | installcask elgato-control-center 4209 | fi 4210 | 4211 | # 4212 | # Elgato Stream Deck 4213 | # 4214 | # Elagto Stream Deck Configuration App 4215 | # 4216 | # https://www.elgato.com/en/gaming/stream-deck 4217 | # 4218 | # Notes: 4219 | # - need to detect if installed already manually since the application name is different from the Homebrew Cask one 4220 | # 4221 | if [[ "$(isAppInstalled "Elgato Stream Deck")" = "false" ]]; then 4222 | installcask elgato-stream-deck 4223 | restoreAppSettings streamdeck 4224 | fi 4225 | 4226 | # 4227 | # ExcalidrawZ 4228 | # 4229 | # Excalidraw app 4230 | # 4231 | # https://github.com/chocoford/ExcalidrawZ 4232 | # 4233 | if [[ "$(isCLAppInstalled ExcalidrawZ)" = "false" ]]; then 4234 | curl -L "$(lastversion chocoford/ExcalidrawZ --assets)" --output excalidrawz.dmg 4235 | 4236 | installDMG excalidrawz.dmg true 4237 | fi 4238 | 4239 | # 4240 | # Figma 4241 | # 4242 | # Vector Design Tool 4243 | # 4244 | # https://www.figma.com 4245 | # 4246 | if [[ "$(isAppInstalled Figma)" = "false" ]]; then 4247 | installcask figma 4248 | duti -s com.figma.Desktop com.figma.document all #Figma 4249 | fi 4250 | 4251 | # 4252 | # Firefox 4253 | # 4254 | # Browser 4255 | # 4256 | # https://www.mozilla.org/en-CA/firefox 4257 | # 4258 | if [[ "$(isAppInstalled Firefox)" = "false" ]]; then 4259 | installcask firefox 4260 | 4261 | # Install the 1Password extension 4262 | open -a Firefox 4263 | /Applications/Firefox.app/Contents/MacOS/Firefox https://addons.mozilla.org/en-CA/firefox/addon/1password-x-password-manager/ 4264 | fi 4265 | 4266 | # 4267 | # Gimp 4268 | # 4269 | # Image Editor 4270 | # 4271 | # https://www.gimp.org/ 4272 | # 4273 | if [[ "$(isAppInstalled Gimp)" = "false" ]]; then 4274 | installcask gimp 4275 | restoreAppSettings gimp 4276 | fi 4277 | 4278 | # 4279 | # Gray 4280 | # 4281 | # Manage dark or light apparence individually by applications 4282 | # 4283 | # https://github.com/zenangst/Gray 4284 | # 4285 | installcask gray 4286 | 4287 | # 4288 | # HA Menu 4289 | # 4290 | # Home Assistant menubar app 4291 | # 4292 | # https://github.com/codechimp-org/ha-menu/ 4293 | # 4294 | # Notes: 4295 | # - need to detect if installed already manually since the application name is different from the Homebrew Cask one 4296 | # 4297 | if [[ "$(isAppInstalled "HA Menu")" = "false" ]]; then 4298 | installcask ha-menu 4299 | fi 4300 | 4301 | # 4302 | # Hemingway 4303 | # 4304 | # Writing Readability Tool 4305 | # 4306 | # http://www.hemingwayapp.com 4307 | # 4308 | if [[ "$(isAppInstalled "Hemingway Editor")" = "false" ]]; then 4309 | installDMG "$HOME/Documents/mac/Hemingway Editor 3.0.3/Hemingway Editor-3.0.3.dmg" false 4310 | fi 4311 | 4312 | # 4313 | # HistoryHound 4314 | # 4315 | # Search browsers history with content (not just URLs or pages titles) 4316 | # 4317 | # https://www.stclairsoft.com/HistoryHound/ 4318 | # 4319 | if [[ "$(isAppInstalled "HistoryHound")" = "false" ]]; then 4320 | installcask historyhound 4321 | open -a HistoryHound 4322 | getLicense HistoryHound 4323 | fi 4324 | 4325 | # 4326 | # Hyperduck 4327 | # 4328 | # Receive links from iOS even when offline 4329 | # 4330 | # https://sindresorhus.com/hyperduck 4331 | # 4332 | installFromAppStore "Hyperduck" 6444667067 4333 | 4334 | # 4335 | # Insta360 Link Controller 4336 | # 4337 | # Insta360 Link webcam settings & controller 4338 | # 4339 | # https://www.insta360.com/download/insta360-link 4340 | # 4341 | if [[ "$(isAppInstalled "Insta360 Link Controller")" = "false" ]]; then 4342 | curl -L https://file.insta360.com/static/ff3fc5347835495dd970735b96db1097/Insta360LinkController_20230303_144839_signed_1677827088327.pkg --output Insta360LinkController.pkg 4343 | installPKGfromDMG Insta360LinkController.pkg 4344 | installPKG Insta360LinkController.pkg 4345 | fi 4346 | # 4347 | # Jiffy 4348 | # 4349 | # Gif in your menubar 4350 | # 4351 | # https://sindresorhus.com/jiffy 4352 | # 4353 | installFromAppStore Jiffy 1502527999 4354 | 4355 | # 4356 | # Keybase 4357 | # 4358 | # Secure messaging and file-sharing app 4359 | # 4360 | # https://github.com/keybase/client 4361 | # 4362 | # Notes: Homebrew version wasn't updated in a while 4363 | # 4364 | if [[ "$(isAppInstalled "Keybase")" = "false" ]]; then 4365 | curl -L https://prerelease.keybase.io/Keybase-arm64.dmg --output keybase.dmg 4366 | installDMG keybase.dmg true 4367 | 4368 | # Disable Keybase adding itself as a favorite in Finder 4369 | touch "/Users/fharper/Library/Application Support/Keybase/finder_disabled.config2" 4370 | fi 4371 | 4372 | # 4373 | # Keycastr 4374 | # 4375 | # Keystroke visualizer 4376 | # 4377 | # https://github.com/keycastr/keycastr 4378 | # 4379 | installcask keycastr 4380 | 4381 | # 4382 | # Kindle 4383 | # 4384 | # Kindle app 4385 | # 4386 | # https://www.amazon.ca/b?ie=UTF8&node=2972705011 4387 | # 4388 | installFromAppStore "Kindle" 302584613 4389 | 4390 | # 4391 | # KnockKnock 4392 | # 4393 | # Enumerate persistently installed softwares 4394 | # 4395 | # https://github.com/objective-see/knockknock 4396 | # 4397 | installcask knockknock 4398 | 4399 | # 4400 | # Logi Options+ 4401 | # 4402 | # Logitech Mouse Configurations App 4403 | # 4404 | # https://www.logitech.com/en-ca/software/logi-options-plus.html 4405 | # 4406 | # Notes 4407 | # - Not using Homebrew as you need to run the installer, and do not know the full path because of the version number 4408 | # - File name for the app is logioptionsplus, not "Logi Options+" in the "Applications" folder 4409 | # 4410 | if [[ "$(isAppInstalled logioptionsplus)" = "false" ]]; then 4411 | echo $fg[blue]"Starting the installation of Logi Options+"$reset_color 4412 | curl -L https://download01.logi.com/web/ftp/pub/techsupport/optionsplus/logioptionsplus_installer.zip --output logitech.zip 4413 | 4414 | unzip logitech.zip 4415 | rm logitech.zip 4416 | rm -rf __MACOSX #created by the unzip call 4417 | 4418 | open logioptionsplus_installer.app 4419 | pausethescript "Wait for Logi Options+ installation to finish before continuing" 4420 | rm -rf logioptionsplus_installer.app 4421 | fi 4422 | 4423 | # 4424 | # Logitech Presentation 4425 | # 4426 | # Application to be able to use the Logitech Spotlight Remote Clicker 4427 | # 4428 | # https://www.logitech.com/en-ca/product/spotlight-presentation-remote 4429 | # 4430 | if [ ! -d "/Library/Application Support/Logitech.localized/Logitech Presentation.localized/Logitech Presentation.app" ]; then 4431 | installcask logitech-presentation 4432 | cd /opt/homebrew/Caskroom/logitech-presentation/*/ 4433 | 4434 | open "LogiPresentation Installer.app" 4435 | pausethescript "Wait for the Logitech Presentation application to finish before continuing." 4436 | 4437 | rm "LogiPresentation Installer.app" 4438 | cd - 4439 | 4440 | #TODO: add Input Monitoring Permissions 4441 | #TODO: add Accessibility Permissions 4442 | fi 4443 | 4444 | # 4445 | # LyricsX 4446 | # 4447 | # Lyrics & Karaoke Application 4448 | # 4449 | # https://github.com/ddddxxx/LyricsX 4450 | # 4451 | installcask LyricsX 4452 | 4453 | # 4454 | # MailReceipt 4455 | # 4456 | # Delivery notification & read receipt requests for Apple Mail 4457 | # 4458 | # https://github.com/scr34m/MailReceipt 4459 | # 4460 | if [ ! -d "/Library/Mail/Bundles/MailReceipt.mailbundle/" ]; then 4461 | curl -L "$(lastversion scr34m/MailReceipt --assets)" --output MailReceipt.pkg 4462 | installPKG MailReceipt.pkg 4463 | fi 4464 | 4465 | # 4466 | # MailTrackerBlocker 4467 | # 4468 | # Email tracker, read receipt and spy pixel blocker plugin for Apple Mail 4469 | # 4470 | # https://github.com/apparition47/MailTrackerBlocker 4471 | # 4472 | installkeg mailtrackerblocker 4473 | 4474 | # 4475 | # Messenger 4476 | # 4477 | # Facebook Messenger Client 4478 | # 4479 | # https://www.messenger.com/desktop 4480 | # 4481 | installcask messenger 4482 | 4483 | # 4484 | # Microsoft Edge 4485 | # 4486 | # Browser 4487 | # 4488 | # https://www.microsoft.com/en-us/edge 4489 | # 4490 | # Notes: 4491 | # - need to detect if installed already manually since the application name is different from the Homebrew Cask one 4492 | # 4493 | if [[ "$(isAppInstalled "Microsoft Edge")" = "false" ]]; then 4494 | installcask microsoft-edge 4495 | 4496 | # Install the 1Password extension 4497 | open -a "Microsoft Edge" 4498 | /Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge https://microsoftedge.microsoft.com/addons/detail/1password-%E2%80%93-password-mana/dppgmdbiimibapkepcbdbmkaabgiofem 4499 | fi 4500 | 4501 | # 4502 | # Microsoft Teams 4503 | # 4504 | # Video call 4505 | # 4506 | # https://www.microsoft.com/en-us/microsoft-teams/group-chat-software 4507 | # 4508 | installcask microsoft-teams 4509 | 4510 | # 4511 | # MindNode 4512 | # 4513 | # Mindmap app 4514 | # 4515 | # Installing the version I paid for before they moved to subscriptions 4516 | # 4517 | # https://mindnode.com 4518 | # 4519 | if [[ "$(isAppInstalled MindNode)" = "false" ]]; then 4520 | unzip $HOME/Documents/mac/MindNode/MindNode.zip 4521 | mv MindNode.app /Applications/ 4522 | fi 4523 | 4524 | # 4525 | # Muzzle 4526 | # 4527 | # Set Do Not Disturb mode when screen sharing in video calls 4528 | # 4529 | # https://muzzleapp.com 4530 | # 4531 | if [[ "$(isAppInstalled Muzzle)" = "false" ]]; then 4532 | installcask muzzle 4533 | giveAccessibilityPermission Muzzle 4534 | fi 4535 | 4536 | # 4537 | # NordVPN 4538 | # 4539 | # VPN 4540 | # 4541 | # https://nordvpn.com 4542 | # 4543 | installcask nordvpn 4544 | 4545 | # 4546 | # OBS Studio 4547 | # 4548 | # Live streaming & vide/screen recording 4549 | # 4550 | # https://github.com/obsproject/obs-studio 4551 | # 4552 | if [[ "$(isAppInstalled "OBS")" = "false" ]]; then 4553 | installcask obs 4554 | giveScreenRecordingPermission OBS 4555 | giveAccessibilityPermission OBS 4556 | #TODO: give Camera Permission 4557 | #TODO: give Microphone Permission 4558 | fi 4559 | 4560 | # 4561 | # One Thing 4562 | # 4563 | # Add text to menubar 4564 | # 4565 | # https://sindresorhus.com/one-thing 4566 | # 4567 | mas install "One Thing" 1604176982 4568 | 4569 | # 4570 | # Opera 4571 | # 4572 | # Browser 4573 | # 4574 | # https://www.opera.com 4575 | # 4576 | if [[ "$(isAppInstalled "Opera")" = "false" ]]; then 4577 | installcask opera 4578 | 4579 | # Install the 1Password extension 4580 | open -a Opera 4581 | /Applications/Opera.app/Contents/MacOS/Opera https://chrome.google.com/webstore/detail/1password-%E2%80%93-password-mana/aeblfdkhhhdcdjpifhhbdiojplfjncoa 4582 | fi 4583 | 4584 | # 4585 | # Opera GX 4586 | # 4587 | # Browser 4588 | # 4589 | # https://www.opera.com/gx 4590 | # 4591 | if [[ "$(isAppInstalled "Opera GX")" = "false" ]]; then 4592 | installcask opera-gx 4593 | 4594 | # Install the 1Password extension 4595 | open -a "Opera GX" 4596 | /Applications/Opera\ GX.app/Contents/MacOS/Opera https://chrome.google.com/webstore/detail/1password-%E2%80%93-password-mana/aeblfdkhhhdcdjpifhhbdiojplfjncoa 4597 | fi 4598 | 4599 | # 4600 | # OverSight 4601 | # 4602 | # Monitor the microphone & webcam 4603 | # 4604 | # https://github.com/objective-see/OverSight 4605 | # 4606 | installcask oversight 4607 | 4608 | # 4609 | # Paprika Recipe Manager 4610 | # 4611 | # Recipes manager 4612 | # 4613 | # https://www.paprikaapp.com 4614 | # 4615 | installFromAppStore "Paprika Recipe Manager 3" 1303222628 4616 | 4617 | # 4618 | # Parcel 4619 | # 4620 | # Deliveries tracking 4621 | # 4622 | # https://parcelapp.net 4623 | # 4624 | installFromAppStore "Parcel" 639968404 4625 | 4626 | # 4627 | # Pika 4628 | # 4629 | # Color Picker 4630 | # 4631 | # https://github.com/superhighfives/pika 4632 | # 4633 | installcask pika 4634 | 4635 | # 4636 | # Pocket 4637 | # 4638 | # Save & read articles later 4639 | # 4640 | # https://getpocket.com 4641 | # 4642 | if [[ "$(isAppInstalled Pocket)" = "false" ]]; then 4643 | installFromAppStore Pocket 568494494 4644 | dockutil --add /Applications/Pocket.app/ --allhomes 4645 | fi 4646 | 4647 | # 4648 | # Pure Paste 4649 | # 4650 | # Paste as plain text by default 4651 | # 4652 | # https://sindresorhus.com/pure-paste 4653 | # 4654 | installFromAppStore "Pure Paste" 1611378436 4655 | 4656 | # 4657 | # QR Capture 4658 | # 4659 | # Screen & webcam QR code reader 4660 | # 4661 | # https://iqr.hrubasko.com 4662 | # 4663 | installFromAppStore "QR Capture" 1369524274 4664 | 4665 | # 4666 | # Quitter 4667 | # 4668 | # Automatically hides or quits apps after periods of inactivity 4669 | # 4670 | # https://marco.org/apps#quitter 4671 | # 4672 | installcask quitter 4673 | 4674 | # 4675 | # RansomWhere? 4676 | # 4677 | # Monitoring the creation of encrypted files 4678 | # 4679 | # https://objective-see.org/products/ransomwhere.html 4680 | # 4681 | # Notes: 4682 | # - Need to check the installation manually as it does not install in default folders 4683 | if [ ! -d "/Library/Objective-See/RansomWhere/" ]; then 4684 | installcask ransomwhere 4685 | fi 4686 | 4687 | # 4688 | # Raspberry Pi Imager 4689 | # 4690 | # Raspberry Pi imaging utility 4691 | # 4692 | # https://github.com/raspberrypi/rpi-imager 4693 | # 4694 | # Notes: 4695 | # - need to detect if installed already manually since the application name is different from the Homebrew Cask one 4696 | # 4697 | if [[ "$(isAppInstalled "Raspberry Pi Imager")" = "false" ]]; then 4698 | installcask raspberry-pi-imager 4699 | fi 4700 | 4701 | # 4702 | # ReiKey 4703 | # 4704 | # Persistent keyboard keystrokes listeners/intercepters scanner 4705 | # 4706 | # https://github.com/objective-see/ReiKey 4707 | # 4708 | installcask reikey 4709 | 4710 | # 4711 | # Remote Desktop 4712 | # 4713 | # Access Windows computers remotely 4714 | # 4715 | # https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-mac 4716 | # 4717 | installcask microsoft-remote-desktop 4718 | 4719 | # 4720 | # Shareful 4721 | # 4722 | # Add additional options to the macOS share menu 4723 | # 4724 | # https://sindresorhus.com/shareful 4725 | # 4726 | mas install 1522267256 4727 | 4728 | # 4729 | # Signal 4730 | # 4731 | # Encrypted messaging app 4732 | # 4733 | # https://github.com/signalapp/Signal-Desktop 4734 | # 4735 | installcask signal 4736 | 4737 | # 4738 | # Silicon 4739 | # 4740 | # Identify Applications Architecture 4741 | # 4742 | # https://github.com/DigiDNA/Silicon 4743 | # 4744 | installcask silicon 4745 | 4746 | # 4747 | # Sim Daltonism 4748 | # 4749 | # Color blindness simulation 4750 | # 4751 | # https://github.com/michelf/sim-daltonism/ 4752 | # 4753 | installcask sim-daltonism 4754 | 4755 | # 4756 | # Sloth 4757 | # 4758 | # Displays all open files and sockets in use by all running processes on your system 4759 | # 4760 | # https://sveinbjorn.org/sloth 4761 | # 4762 | installcask sloth 4763 | 4764 | # 4765 | # Sound Siphon 4766 | # 4767 | # Audio virtual inputs 4768 | # 4769 | # https://staticz.com/soundsiphon/ 4770 | # 4771 | if [[ "$(isAppInstalled "Sound Siphon")" = "false" ]]; then 4772 | installcask sound-siphon 4773 | getLicense "Sound Siphon" 4774 | fi 4775 | 4776 | # 4777 | # Speedtest 4778 | # 4779 | # Speed test application 4780 | # 4781 | # https://www.speedtest.net 4782 | # 4783 | # Notes: 4784 | # - It's more accurate than the CLI 4785 | # 4786 | installFromAppStore Speedtest 1153157709 4787 | 4788 | # 4789 | # stats 4790 | # 4791 | # menubar system monitor stats 4792 | # 4793 | # https://github.com/exelban/stats 4794 | # 4795 | if [[ "$(isAppInstalled stats)" = "false" ]]; then 4796 | installcask stats 4797 | restoreAppSettings stats 4798 | fi 4799 | 4800 | # 4801 | # SwiftDefaultApps 4802 | # 4803 | # Change default application with URI Scheme and/or filetype in macOS 4804 | # 4805 | # https://github.com/Lord-Kamina/SwiftDefaultApps 4806 | # 4807 | # Notes: 4808 | # - Using it for default things like default application for emails. File type are handled with duti for automation 4809 | # 4810 | if [[ -d "$HOME/Library/PreferencePanes/SwiftDefaultApps.prefpane/" ]]; then 4811 | installcask swiftdefaultappsprefpane 4812 | fi 4813 | 4814 | # 4815 | # TeamViewer 4816 | # 4817 | # Remote viewer & control 4818 | # 4819 | # https://www.teamviewer.com 4820 | # 4821 | installcask teamviewer 4822 | 4823 | # 4824 | # The Unarchiver 4825 | # 4826 | # Compress & extract GUI app supporting RAR, ZIP & more 4827 | # 4828 | # https://theunarchiver.com 4829 | # 4830 | # Notes: 4831 | # - need to detect if installed already manually since the application name is different from the Homebrew Cask one 4832 | # 4833 | if [[ "$(isAppInstalled "The Unarchiver")" = "false" ]]; then 4834 | installcask the-unarchiver 4835 | duti -s com.macpaw.site.theunarchiver com.rarlab.rar-archive all # RAR 4836 | fi 4837 | 4838 | # 4839 | # TigerVNC 4840 | # 4841 | # VNC client 4842 | # 4843 | # https://github.com/TigerVNC/tigervnc 4844 | # 4845 | installcask tigervnc-viewer 4846 | 4847 | # 4848 | # TV 4849 | # 4850 | # The Office for offline viewing 4851 | # 4852 | # https://www.apple.com/ca/apple-tv-app/ 4853 | # 4854 | if [ ! -d $HOME/Movies/TV/Media.localized/TV\ Shows/The\ Office ]; then 4855 | 4856 | # Download The Office only if HDD has at least 500GB available 4857 | local hddleft=$(diskutil info /dev/disk3s1 | grep "Container Free Space" | grep -o '[0-9]*\.[0-9]*') 4858 | 4859 | if (( $(echo "$hddleft > 500" | bc -l) )); then 4860 | open -a TV 4861 | pausethescript "Sign into the TV app & start the download the whole series The Office US before continuing." 4862 | fi 4863 | fi 4864 | 4865 | # 4866 | # Typesense Dashboard 4867 | # 4868 | # A Typesense Dashboard to manage and browse collections 4869 | # 4870 | # https://github.com/bfritscher/typesense-dashboard 4871 | # 4872 | if [[ "$(isAppInstalled "Typesense-Dashboard")" = "false" ]]; then 4873 | curl -L "$(lastversion bfritscher/typesense-dashboard --assets)" --output typesense-dashboard.zip 4874 | unzip typesense-dashboard.zip 4875 | mv dist/electron/Typesense-Dashboard-darwin-x64/Typesense-Dashboard.app /Applications 4876 | rm dist 4877 | rm typesense-dashboard.zip 4878 | fi 4879 | 4880 | # 4881 | # Typora 4882 | # 4883 | # Markdown distraction-free writing tool 4884 | # 4885 | # https://typora.io 4886 | # 4887 | if [[ "$(isAppInstalled "Typora")" = "false" ]]; then 4888 | installcask typora 4889 | getLicense Typora 4890 | fi 4891 | 4892 | # 4893 | # UPS Power Monitor 4894 | # 4895 | # Menubar UPS monitoring 4896 | # 4897 | # https://apps.dniklewicz.com/ups-mac/ 4898 | # 4899 | installFromAppStore "UPS Power Monitor" 1500180529 4900 | 4901 | # 4902 | # VLC 4903 | # 4904 | # Video Player 4905 | # 4906 | # https://github.com/videolan/vlc 4907 | # 4908 | if [[ "$(isAppInstalled VLC)" = "false" ]]; then 4909 | installcask vlc 4910 | restoreAppSettings vlc 4911 | 4912 | duti -s org.videolan.vlc public.3gpp all #3gp 4913 | duti -s org.videolan.vlc audio/x-hx-aac-adts all #aac 4914 | duti -s org.videolan.vlc public.avi all #avi 4915 | duti -s org.videolan.vlc com.apple.m4a-audio all #M4A 4916 | duti -s org.videolan.vlc com.apple.m4v-video all #m4v 4917 | duti -s org.videolan.vlc com.apple.quicktime-movie all #mov 4918 | duti -s org.videolan.vlc public.mp3 all #mp3 4919 | duti -s org.videolan.vlc public.mpeg-4 all #mp4 4920 | duti -s org.videolan.vlc com.microsoft.waveform-audio all #wav 4921 | duti -s org.videolan.vlc org.webmproject.webm all #webm 4922 | fi 4923 | 4924 | # 4925 | # Vivid 4926 | # 4927 | # Boost Apple screens & monitors brithness 4928 | # 4929 | # https://www.getvivid.app 4930 | # 4931 | if [[ "$(isAppInstalled Vivid)" = "false" ]]; then 4932 | installcask vivid 4933 | getLicense Vivid 4934 | fi 4935 | 4936 | # 4937 | # WebP Viewer: QuickLook & View 4938 | # 4939 | # WebP image viewer 4940 | # 4941 | # https://langui.net/webp-viewer 4942 | # 4943 | if [[ "$(isAppInstalled WebPViewer)" = "false" ]]; then 4944 | installFromAppStore "WebPViewer" 1323414118 4945 | duti -s net.langui.WebPViewer org.webmproject.webp all #WebP 4946 | fi 4947 | 4948 | # 4949 | # WhatsApp 4950 | # 4951 | # Messaging app 4952 | # 4953 | # https://www.whatsapp.com 4954 | # 4955 | installcask whatsapp 4956 | 4957 | # 4958 | # WhatsYourSign 4959 | # 4960 | # Finder menu to show files cryptographic signing information 4961 | # 4962 | # https://github.com/objective-see/WhatsYourSign 4963 | # 4964 | if [[ "$(isAppInstalled WhatsYourSign)" = "false" ]]; then 4965 | installcask whatsyoursign 4966 | open -a "/opt/homebrew/Caskroom/whatsyoursign/2.0.1/WhatsYourSign Installer.app" 4967 | fi 4968 | 4969 | # 4970 | # WiFi Explorer Lite 4971 | # 4972 | # Wifi discovery and analysis tool 4973 | # 4974 | # https://www.intuitibits.com/products/wifiexplorer/ 4975 | # 4976 | installFromAppStore "WiFi Explorer Lite" 1408727408 4977 | 4978 | # 4979 | # Zen Browser 4980 | # 4981 | # Browser 4982 | # 4983 | # https://github.com/zen-browser/desktop 4984 | # 4985 | installcask zen-browser 4986 | 4987 | 4988 | ######### 4989 | # # 4990 | # Fonts # 4991 | # # 4992 | ######### 4993 | 4994 | displaySection "Fonts" 4995 | 4996 | installfont font-alex-brush 4997 | installfont font-archivo-narrow 4998 | installfont font-arial 4999 | installfont font-blackout 5000 | installfont font-caveat-brush 5001 | installfont font-dancing-script 5002 | installfont font-dejavu 5003 | installfont font-fira-code 5004 | installfont font-fira-mono 5005 | installfont font-fira-sans 5006 | installfont font-fontawesome 5007 | installfont font-gidole 5008 | installfont font-hack 5009 | installfont font-leckerli-one 5010 | installfont font-montserrat 5011 | installfont font-nunito 5012 | installfont font-nunito-sans 5013 | installfont font-open-sans 5014 | installfont font-pacifico 5015 | installfont font-rancho 5016 | installfont font-roboto 5017 | 5018 | 5019 | #################################################################### 5020 | # # 5021 | # macOS Applications File Types Default # 5022 | # # 5023 | # Find the app bundle identifier # 5024 | # mdls -name kMDItemCFBundleIdentifier -r /Applications/Photos.app # 5025 | # # 5026 | # Find the file UTI (Uniform Type Identifiers) # 5027 | # mdls -name kMDItemContentTypeTree $HOME/init.lua # 5028 | # # 5029 | # Notes: # 5030 | # - Non MacOS application have their file type associated with # 5031 | # them where they are installed # 5032 | # # 5033 | #################################################################### 5034 | 5035 | displaySection "macOS Applications File Types Default" 5036 | 5037 | # Preview 5038 | duti -s com.apple.Preview public.standard-tesselated-geometry-format all #3D CAD 5039 | duti -s com.apple.Preview public.heic all #HEIC 5040 | duti -s com.apple.Preview com.nikon.raw-image all #NEF 5041 | duti -s com.apple.Preview com.adobe.pdf all #PDF 5042 | duti -s com.apple.Preview public.png all # PNG 5043 | duti -s com.apple.Preview org.openxmlformats.presentationml.presentation all #PPTX 5044 | duti -s com.apple.Preview com.adobe.photoshop-image all # PSD (Photoshop) 5045 | 5046 | 5047 | ######### 5048 | # # 5049 | # Games # 5050 | # # 5051 | ######### 5052 | 5053 | displaySection "Games" 5054 | 5055 | # 5056 | # Among Us 5057 | # 5058 | # http://www.innersloth.com/gameAmongUs.php 5059 | # 5060 | installFromAppStore "Among Us" 1351168404 5061 | 5062 | # 5063 | # Chess 5064 | # 5065 | # https://chess.com 5066 | # 5067 | installFromAppStore "Chess" 329218549 5068 | 5069 | # 5070 | # Epic Games 5071 | # 5072 | # Epic Games library management 5073 | # 5074 | # https://www.epicgames.com 5075 | # 5076 | # Notes: 5077 | # - need to detect if installed already manually since the application name is different from the Homebrew Cask one 5078 | # 5079 | if [[ "$(isAppInstalled "Epic Games Launcher")" = "false" ]]; then 5080 | installcask epic-games 5081 | # TODO: add keystroke permission 5082 | fi 5083 | 5084 | # 5085 | # OpenEmu 5086 | # 5087 | # Retro video games emulation 5088 | # 5089 | # https://github.com/OpenEmu/OpenEmu 5090 | # 5091 | installcask openemu 5092 | 5093 | 5094 | ########################### 5095 | # # 5096 | # Dock Applications Order # 5097 | # # 5098 | ########################### 5099 | 5100 | displaySection "Dock Applications Order" 5101 | 5102 | echo $fg[blue]"The Dock will restart a couple of time, giving a flashing impression: it's normal\n"$reset_color 5103 | dockutil --move 'Google Chrome' --position end --allhomes 5104 | dockutil --move 'Notion' --position end --allhomes 5105 | dockutil --move 'Todoist' --position end --allhomes 5106 | dockutil --move 'Slack' --position end --allhomes 5107 | dockutil --move 'Visual Studio Code' --position end --allhomes 5108 | dockutil --move 'iTerm' --position end --allhomes 5109 | dockutil --move 'Spotify' --position end --allhomes 5110 | dockutil --move '1Password' --position end --allhomes 5111 | dockutil --move 'Photos' --position end --allhomes 5112 | dockutil --move 'Pocket' --position end --allhomes 5113 | dockutil --move 'Messenger' --position end --allhomes 5114 | dockutil --move 'Antidote 11' --position end --allhomes 5115 | 5116 | 5117 | ############### 5118 | # # 5119 | # Final Steps # 5120 | # # 5121 | ############### 5122 | 5123 | displaySection "Final Steps" 5124 | 5125 | # 5126 | # Monolingual 5127 | # 5128 | # Remove unnecessary language resources from macOS 5129 | # 5130 | # https://github.com/IngmarStein/Monolingual 5131 | # 5132 | if [[ "$(isAppInstalled Monolingual)" = "false" ]]; then 5133 | installcask monolingual 5134 | open -a Monolingual 5135 | pausethescript "Use Monolingual to remove unused languages files before continuing" 5136 | fi 5137 | 5138 | echo $fg[blue]"Everything has been installed & configured on you new laptop, congratulations!"$reset_color 5139 | --------------------------------------------------------------------------------