From 572f17e7fa7e6de75ca6547eda4a6fa6bd70d1d8 Mon Sep 17 00:00:00 2001 From: Cheong Yip Date: Fri, 1 Dec 2023 13:23:00 +1100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Make=20minor=20improvement?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/os/create_directories.sh | 2 +- src/os/create_local_config_files.sh | 2 +- src/os/initialize_git_repository.sh | 2 +- src/os/installs/bash-it.sh | 6 ++---- src/os/installs/npm.sh | 2 +- src/os/installs/setup.sh | 2 +- src/os/preferences/macos/app_store.sh | 2 +- src/os/preferences/macos/chrome.sh | 2 +- src/os/preferences/macos/computer_name.sh | 2 +- src/os/preferences/macos/dock.sh | 2 +- src/os/preferences/macos/keyboard.sh | 2 +- src/os/preferences/macos/maps.sh | 2 +- src/os/preferences/macos/photos.sh | 2 +- src/os/preferences/macos/safari.sh | 2 +- src/os/preferences/macos/terminal.sh | 2 +- src/os/preferences/macos/textedit.sh | 2 +- src/os/preferences/macos/trackpad.sh | 2 +- src/os/preferences/macos/transmission.sh | 2 +- src/os/preferences/macos/ui_and_ux.sh | 2 +- src/os/preferences/macos/xtrafinder.sh | 2 +- src/os/preferences/setup.sh | 2 +- src/os/setup.sh | 7 ++++--- 22 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/os/create_directories.sh b/src/os/create_directories.sh index efc47837f..701cb1df6 100755 --- a/src/os/create_directories.sh +++ b/src/os/create_directories.sh @@ -33,7 +33,7 @@ create_directories() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - main() { - print_in_purple "\n\n * Create directories\n\n" + print_in_purple "\n * Create directories\n\n" create_directories } diff --git a/src/os/create_local_config_files.sh b/src/os/create_local_config_files.sh index 35655bd66..6b3e68f2c 100755 --- a/src/os/create_local_config_files.sh +++ b/src/os/create_local_config_files.sh @@ -74,7 +74,7 @@ create_vimrc_local() { main() { - print_in_purple "\n\n * Create local config files\n\n" + print_in_purple "\n * Create local config files\n\n" create_bash_local create_gitconfig_local diff --git a/src/os/initialize_git_repository.sh b/src/os/initialize_git_repository.sh index a21757c95..6f7de1c51 100755 --- a/src/os/initialize_git_repository.sh +++ b/src/os/initialize_git_repository.sh @@ -37,7 +37,7 @@ initialize_git_repository() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - main() { - print_in_purple "\n Initialize Git repository\n\n" + print_in_purple "\n Initialize Git repository\n\n" initialize_git_repository "$1" } diff --git a/src/os/installs/bash-it.sh b/src/os/installs/bash-it.sh index 12a5b64cb..7d40a5b96 100755 --- a/src/os/installs/bash-it.sh +++ b/src/os/installs/bash-it.sh @@ -7,6 +7,8 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ main() { + print_in_purple "\n Bash-it\n\n" + declare -r BASHIT_DIR="$HOME/.bash_it" declare -r BASHIT_GIT_REPO_URL="https://github.com/Bash-it/bash-it.git" @@ -77,10 +79,6 @@ main() { && bash-it enable plugin proxy" \ "Bash-it (enable plugins)" - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - print_in_green "\n ---\n\n" - } main diff --git a/src/os/installs/npm.sh b/src/os/installs/npm.sh index f35248caf..6def06703 100755 --- a/src/os/installs/npm.sh +++ b/src/os/installs/npm.sh @@ -21,7 +21,7 @@ main() { print_in_purple "\n npm\n\n" install_npm_package "Update npm" "npm" - printf "\n" + #printf "\n" # Install the specified `npm` packages # [!]: IMPORTANT - These only get installed on the default version of node set by nvm # and have to get re-installed when switching node versions via nvm diff --git a/src/os/installs/setup.sh b/src/os/installs/setup.sh index ccdb26640..aa94d80b4 100755 --- a/src/os/installs/setup.sh +++ b/src/os/installs/setup.sh @@ -16,7 +16,7 @@ main() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - print_in_purple "\n\n * Installs\n" + print_in_purple "\n * Installs\n" print_warning "This may take awhile, so please be patient!\n" if $skipQuestions; then diff --git a/src/os/preferences/macos/app_store.sh b/src/os/preferences/macos/app_store.sh index 79f9581d8..cb2a084b4 100755 --- a/src/os/preferences/macos/app_store.sh +++ b/src/os/preferences/macos/app_store.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n App Store\n\n" +print_in_purple "\n App Store\n\n" execute "defaults write com.apple.appstore ShowDebugMenu -bool true" \ "Enable debug menu" diff --git a/src/os/preferences/macos/chrome.sh b/src/os/preferences/macos/chrome.sh index a5135cfca..a2b36ff31 100755 --- a/src/os/preferences/macos/chrome.sh +++ b/src/os/preferences/macos/chrome.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n Chrome\n\n" +print_in_purple "\n Chrome\n\n" execute "defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false" \ "Disable backswipe" diff --git a/src/os/preferences/macos/computer_name.sh b/src/os/preferences/macos/computer_name.sh index 6a5e69ee4..c456c048e 100755 --- a/src/os/preferences/macos/computer_name.sh +++ b/src/os/preferences/macos/computer_name.sh @@ -20,7 +20,7 @@ main() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - print_in_purple "\n UI & UX\n\n" + print_in_purple "\n UI & UX\n\n" declare -r netBiosName=$(defaults read /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName 2> /dev/null) declare -r computerName=$(scutil --get ComputerName 2> /dev/null) diff --git a/src/os/preferences/macos/dock.sh b/src/os/preferences/macos/dock.sh index 1ec128f07..acd42f89b 100755 --- a/src/os/preferences/macos/dock.sh +++ b/src/os/preferences/macos/dock.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n Dock\n\n" +print_in_purple "\n Dock\n\n" execute "defaults write com.apple.dock autohide -bool true" \ "Automatically hide/show the Dock" diff --git a/src/os/preferences/macos/keyboard.sh b/src/os/preferences/macos/keyboard.sh index a7330f0d3..399676a11 100755 --- a/src/os/preferences/macos/keyboard.sh +++ b/src/os/preferences/macos/keyboard.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n Keyboard\n\n" +print_in_purple "\n Keyboard\n\n" # System Preferences -> Keyboard -> Shortcuts -> 1=Text boxes and lists only, 3=All controls # https://github.com/CamHenlin/imessageclient/issues/6 diff --git a/src/os/preferences/macos/maps.sh b/src/os/preferences/macos/maps.sh index 5b85e6d44..474b3939f 100755 --- a/src/os/preferences/macos/maps.sh +++ b/src/os/preferences/macos/maps.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n Maps\n\n" +print_in_purple "\n Maps\n\n" execute "defaults write com.apple.Maps LastClosedWindowViewOptions '{ localizeLabels = 1; // show labels in English diff --git a/src/os/preferences/macos/photos.sh b/src/os/preferences/macos/photos.sh index d157a4dc0..98b28a7b9 100755 --- a/src/os/preferences/macos/photos.sh +++ b/src/os/preferences/macos/photos.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n Photos\n\n" +print_in_purple "\n Photos\n\n" execute "defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true" \ "Prevent Photos from opening automatically when devices are plugged in" diff --git a/src/os/preferences/macos/safari.sh b/src/os/preferences/macos/safari.sh index 44c125792..8fa657bd0 100755 --- a/src/os/preferences/macos/safari.sh +++ b/src/os/preferences/macos/safari.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n Safari\n\n" +print_in_purple "\n Safari\n\n" execute "defaults write com.apple.Safari AutoOpenSafeDownloads -bool false" \ "Disable opening 'safe' files automatically" diff --git a/src/os/preferences/macos/terminal.sh b/src/os/preferences/macos/terminal.sh index ac2739d1c..76a93a227 100755 --- a/src/os/preferences/macos/terminal.sh +++ b/src/os/preferences/macos/terminal.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n Terminal\n\n" +print_in_purple "\n Terminal\n\n" execute "defaults write com.apple.terminal FocusFollowsMouse -string true" \ "Make the focus automatically follow the mouse" diff --git a/src/os/preferences/macos/textedit.sh b/src/os/preferences/macos/textedit.sh index a1b27d3e5..e1d4f91e2 100755 --- a/src/os/preferences/macos/textedit.sh +++ b/src/os/preferences/macos/textedit.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n TextEdit\n\n" +print_in_purple "\n TextEdit\n\n" # TextEdit -> Preferences -> Open and Save -> Plain Text File Encoding execute "defaults write com.apple.TextEdit PlainTextEncoding -int 4 && \ diff --git a/src/os/preferences/macos/trackpad.sh b/src/os/preferences/macos/trackpad.sh index efa17a14f..f0225591b 100755 --- a/src/os/preferences/macos/trackpad.sh +++ b/src/os/preferences/macos/trackpad.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n Trackpad\n\n" +print_in_purple "\n Trackpad\n\n" execute "defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool false && \ defaults write com.apple.AppleMultitouchTrackpad Clicking -int 0 && \ diff --git a/src/os/preferences/macos/transmission.sh b/src/os/preferences/macos/transmission.sh index 252746687..345f4ec82 100755 --- a/src/os/preferences/macos/transmission.sh +++ b/src/os/preferences/macos/transmission.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n Transmission\n\n" +print_in_purple "\n Transmission\n\n" execute "defaults write org.m0k.transmission DeleteOriginalTorrent -bool true" \ "Delete the original torrent files" diff --git a/src/os/preferences/macos/ui_and_ux.sh b/src/os/preferences/macos/ui_and_ux.sh index 6e2c59203..837559968 100755 --- a/src/os/preferences/macos/ui_and_ux.sh +++ b/src/os/preferences/macos/ui_and_ux.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n UI & UX\n\n" +print_in_purple "\n UI & UX\n\n" execute "defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true && \ defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true" \ diff --git a/src/os/preferences/macos/xtrafinder.sh b/src/os/preferences/macos/xtrafinder.sh index 328b90a48..bff6acb36 100755 --- a/src/os/preferences/macos/xtrafinder.sh +++ b/src/os/preferences/macos/xtrafinder.sh @@ -5,7 +5,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")" \ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -print_in_purple "\n XtraFinder\n\n" +print_in_purple "\n XtraFinder\n\n" execute "defaults write com.apple.finder XtraFinder_ShowStatusBarIcon -bool false" \ "Tools -> Hide Menu Bar Icon (enable)" diff --git a/src/os/preferences/setup.sh b/src/os/preferences/setup.sh index 9e53b570b..71ade2df5 100755 --- a/src/os/preferences/setup.sh +++ b/src/os/preferences/setup.sh @@ -16,7 +16,7 @@ main() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - print_in_purple "\n\n * Preferences\n" + print_in_purple "\n * Preferences\n" if $skipQuestions; then "./$(get_os)/main.sh" -y diff --git a/src/os/setup.sh b/src/os/setup.sh index b756803a6..79e0968f1 100755 --- a/src/os/setup.sh +++ b/src/os/setup.sh @@ -264,6 +264,7 @@ main() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if ! $skipQuestions; then + printf "\n\n\n" ask_for_confirmation "Do you want local config files for bash, git and vim to be created?" printf "\n" fi @@ -275,6 +276,7 @@ main() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if ! $skipQuestions; then + printf "\n\n\n" ask_for_confirmation "Do you want to install the applications/command line tools?" printf "\n" fi @@ -288,6 +290,7 @@ main() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if ! $skipQuestions; then + printf "\n\n\n" ask_for_confirmation "Do you want to set the custom preferences?" printf "\n" fi @@ -316,7 +319,7 @@ main() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - print_in_purple "\n Optional items & reminders\n\n" + print_in_purple "\n * Optional items & reminders\n\n" print_optional_info "Add favourite locations (home & Development) to Finder sidebar" print_optional_info "Activate gifox license" @@ -356,8 +359,6 @@ main() { print_optional_info "Set Jetbrains IDE settings via IDE Settings Sync and Jetbrains account (https://plugins.jetbrains.com/plugin/9922-ide-settings-sync and https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html#IDE_settings_sync)" print_optional_info "Set VS Code settings via Settings Sync (https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync and https://gist.github.com/wingy3181/e7b8fde022a14cff76a96b4a1a98ad7f)" - printf "\n" - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -