Last active
September 18, 2024 17:29
-
-
Save dimitre/e36afd57bce9bf2f8dce55d729628d08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ref : https://gist.github.com/vsivsi/589397df1b25c450127313201d8d3c40 | |
# | |
NAME=Pulsar | |
sudo scutil --set HostName ${NAME} | |
sudo scutil --set ComputerName ${NAME} | |
sudo scutil --set LocalHostName ${NAME} | |
echo "$(id -un)" | |
# Dark mode | |
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true' | |
# Language English | |
defaults write -g AppleLanguages -array en | |
sudo languagesetup -langspec English | |
sudo scutil --set HostName Coca2024 | |
sudo scutil --set ComputerName Coca2024 | |
sudo scutil --set LocalHostName Coca2024 | |
sudo systemsetup -setcomputersleep Never | |
sudo systemsetup -setharddisksleep Never | |
sudo systemsetup -setdisplaysleep 15 | |
sudo systemsetup -setrestartpowerfailure on | |
#Screen sharing on | |
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off -restart -agent -privs -all -allowAccessFor -allUsers | |
sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist | |
#Automatic Login as user | |
#defaults read /library/preferences/com.apple.loginwindow | |
# sudo defaults write /Library/Preferences/com.apple.loginwindow "autoLoginUser" 'z' | |
sudo defaults write /Library/Preferences/com.apple.loginwindow "autoLoginUser" "$(id -un)" | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.loginwindow.plist | |
# software update | |
sudo softwareupdate -i -a | |
# install brew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# add brew to path | |
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/z/.zprofile | |
#"$(id -un)" | |
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/locacao/.zprofile | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
# install rosetta 2, important for platformio | |
softwareupdate –-install-rosetta | |
brew install --cask anydesk syncthing | |
osascript -e 'tell application "System Events" to make login item at end with properties {name: "Anydesk",path:"/Applications/Anydesk.app", hidden:false}' | |
osascript -e 'tell application "System Events" to make login item at end with properties {name: "Syncthing",path:"/Applications/Syncthing.app", hidden:false}' | |
# TODO: add permissions to anydesk (screen recording, files) | |
# set full access password on anydesk | |
# put syncthing and anydesk in startup login items |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment