↔️ move old dotfiles to config

This commit is contained in:
2021-03-06 20:45:38 -05:00
parent a4a6a93f52
commit 7a600de8f8
29 changed files with 0 additions and 0 deletions

47
config/bin/goodmorning.sh Executable file
View File

@ -0,0 +1,47 @@
#!/bin/bash
function install_latest() {
version=$(asdf list-all $1 | grep -v '[a-z]' | tail -1)
asdf install $1 $version
asdf global $1 $version
}
echo "* Updating homesick..."
homesick pull
homesick symlink
case "$OSTYPE" in
darwin*)
echo "* Restoring mackup..."
mackup restore
echo "* Homebrew updates..."
brew bundle --global --no-lock
brew upgrade
echo "* Upgrading mac app store apps..."
mas upgrade
;;
linux*)
sudo apt update && sudo apt upgrade
sudo snap refresh
;;
esac
echo "* asdf update..."
export R_CONFIGURE_OPTIONS="--with-x=no"
for plugin in $(cat ~/.tool-versions | awk '{print $1}'); do asdf plugin-add $plugin; done
asdf update
asdf plugin-update --all
asdf install
for plugin in $(cat ~/.tool-versions | awk '{print $1}'); do install_latest $plugin; done
echo "* Syncing repositories..."
mr -j 5 update
echo "* Upgrading oh-my-zsh..."
cd ~/.oh-my-zsh
git pull --rebase --stat origin master

21
config/bin/goodnight.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
echo "* Shutdown vagrant..."
for box in $(vagrant global-status|grep running|awk '{ print $1 }'); do vagrant halt $box; done
echo "* Shutdown docker..."
# for machine in $(docker-machine ls -q); do docker-machine stop $machine; done
for container in $(docker ps -a -q); do docker stop $container; done
docker system prune -f
echo "* Stop running services..."
brew services stop --all
echo "* Kill tmux sessions..."
tmux kill-server
echo "* Uncommitted projects..."
mr -m status
echo "* Homesick status..."
homesick status

42
config/bin/macos.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/sh
# Inspired by https://github.com/mathiasbynens/dotfiles/blob/master/.macos
# Dock settings
defaults write com.apple.dock 'orientation' -string 'left'
defaults write com.apple.dock autohide -bool true
killall Dock
# Finder settings
# TODO: turn on stacks?
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
killall Finder
# Safari
# Enable the Develop menu
defaults write -app Safari IncludeDevelopMenu -bool true
defaults write -app Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write -app Safari WebKitPreferences.developerExtrasEnabled -bool true
# Disable AutoFill
defaults write -app Safari AutoFillFromAddressBook -bool false
defaults write -app Safari AutoFillPasswords -bool false
defaults write -app Safari AutoFillCreditCardData -bool false
defaults write -app Safari AutoFillMiscellaneousForms -bool false
# Mail
# TODO: notifications for contacts only
# TODO: disable sounds
# Sharing
# Turn on SSH
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
# TODO: turn on VNC?
# iTerm 2
# Specify the preferences directory
defaults write com.googlecode.iterm2.plist PrefsCustomFolder -string "~/SynologyDrive/Config/iTerm/"
# Tell iTerm2 to use the custom preferences in the directory
defaults write com.googlecode.iterm2.plist LoadPrefsFromCustomFolder -bool true