Closed AlanGreene closed 3 years ago
https://github.com/paulmillr/dotfiles/blob/master/etc/bootstrap-macos.sh
Set hostname
echo 'Enter new hostname of the machine (e.g. macbook-paulmillr)'
read hostname
echo "Setting new hostname to $hostname..."
scutil --set HostName "$hostname"
compname=$(sudo scutil --get HostName | tr '-' '.')
echo "Setting computer name to $compname"
scutil --set ComputerName "$compname"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$compname"
Generate SSH key and upload to GitHub
pub=$HOME/.ssh/id_ed25519.pub
echo 'Checking for SSH key, generating one if it does not exist...'
[[ -f $pub ]] || ssh-keygen -t ed25519
echo 'Copying public key to clipboard. Paste it into your Github account...'
[[ -f $pub ]] && cat $pub | pbcopy
open 'https://github.com/account/ssh'
Prompt feedback on error done using starship
Moved comment above to new issue
$?
) https://twitter.com/thingskatedid/status/1316081732467081217 zsh:PS1='%(?.%(!.#.;).%F{6}%B;%b%f)'