clean up scripts

This commit is contained in:
Noah Masur 2020-08-02 10:20:25 -04:00
parent 25f4259a38
commit 7b9540cd48
11 changed files with 38 additions and 38 deletions

View File

@ -4,8 +4,10 @@ SETUVAR OP_SESSION_enterprise_console:CoIqb03EMshttN\x2dvIfdyWOhc6IIckFS6mBfvRQ9
SETUVAR __fish_initialized:3100 SETUVAR __fish_initialized:3100
SETUVAR _fish_abbr__01_t:cat SETUVAR _fish_abbr__01_t:cat
SETUVAR _fish_abbr_boot:\x24DOTS/scripts/bootstrap SETUVAR _fish_abbr_boot:\x24DOTS/scripts/bootstrap
SETUVAR _fish_abbr_brews:vim\x20\x24DOTS/homebrew/Brewfile
SETUVAR _fish_abbr_c:cd SETUVAR _fish_abbr_c:cd
SETUVAR _fish_abbr_ca:cargo SETUVAR _fish_abbr_ca:cargo
SETUVAR _fish_abbr_casks:vim\x20\x24DOTS/homebrew/Caskfile
SETUVAR _fish_abbr_cat:bat SETUVAR _fish_abbr_cat:bat
SETUVAR _fish_abbr_d:deactivate SETUVAR _fish_abbr_d:deactivate
SETUVAR _fish_abbr_db:docker\x20build\x20\x2e\x20\x2dt SETUVAR _fish_abbr_db:docker\x20build\x20\x2e\x20\x2dt

View File

@ -6,6 +6,9 @@ function mactools
cat $argv | pbcopy cat $argv | pbcopy
end end
abbr -a brews 'vim $DOTS/homebrew/Brewfile'
abbr -a casks 'vim $DOTS/homebrew/Caskfile'
function brewsearch --description "Install brew plugins" function brewsearch --description "Install brew plugins"
set -l inst (brew search | eval "fzf $FZF_DEFAULT_OPTS -m --header='[brew:install]'") set -l inst (brew search | eval "fzf $FZF_DEFAULT_OPTS -m --header='[brew:install]'")

View File

@ -10,7 +10,7 @@ function notes --description "Notes functions"
else else
set yesterday (date -jv "-1d" +"%Y-%m-%d_%a") set yesterday (date -jv "-1d" +"%Y-%m-%d_%a")
set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a") set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a")
set weather (curl "https://wttr.in/?format=1") set weather (curl -s "https://wttr.in/?format=1")
printf "[[$yesterday|Previous]] - [[calendar|Index]] - [[$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal printf "[[$yesterday|Previous]] - [[calendar|Index]] - [[$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
echo "New journal added." echo "New journal added."
end end
@ -25,7 +25,7 @@ function notes --description "Notes functions"
else else
set yesterday (date -jv "-1d" +"%Y-%m-%d_%a") set yesterday (date -jv "-1d" +"%Y-%m-%d_%a")
set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a") set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a")
set weather (curl "https://wttr.in/?format=1") set weather (curl -s "https://wttr.in/?format=1")
printf "[[$yesterday|Previous]] - [[calendar|Index]] - [[$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal printf "[[$yesterday|Previous]] - [[calendar|Index]] - [[$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
echo "New journal added." echo "New journal added."
vim $today_journal vim $today_journal

View File

@ -20,6 +20,7 @@ brew "wget" # Not quite curl
brew "telnet" # Check networking brew "telnet" # Check networking
brew "prettyping" # Better ping brew "prettyping" # Better ping
brew "httpie" # Better curl brew "httpie" # Better curl
brew "nushell" # Data manipulation shell
brew "shellcheck" # Lint for bash brew "shellcheck" # Lint for bash
brew "pyenv" # Python installations brew "pyenv" # Python installations
brew "pyenv-virtualenv" # Python virtualenvs brew "pyenv-virtualenv" # Python virtualenvs

View File

@ -7,6 +7,7 @@ cask "slack"
cask "zoomus" cask "zoomus"
cask "1password" cask "1password"
cask "1password-cli" cask "1password-cli"
cask "lastpass"
cask "dropbox" cask "dropbox"
# Fonts # Fonts
@ -21,6 +22,7 @@ cask "scroll-reverser"
cask "authy" cask "authy"
cask "postman" cask "postman"
cask "drawio" cask "drawio"
cask "meetingbar"
# Personal # Personal
cask "discord" cask "discord"

View File

@ -126,14 +126,11 @@ install_spacemacs() {
} }
printf "\nbootstrapping...\n\n" printf "\nbootstrapping...\n\n"
#check_for_zsh
#check_for_ohmyzsh
install_xcode install_xcode
install_homebrew install_homebrew
install_brews install_brews
setup_tmux setup_tmux
install_gitmux install_gitmux
install_spacemacs
use_fish_shell use_fish_shell
("$DOTS/scripts/setup_symlinks") ("$DOTS/scripts/setup_symlinks")
@ -144,4 +141,5 @@ echo " - configure_macos"
echo " - setup_keybase" echo " - setup_keybase"
echo " - install_python" echo " - install_python"
echo " - install_rust" echo " - install_rust"
echo " - install_cargos"
echo "" echo ""

View File

@ -3,18 +3,12 @@
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)" echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
echo "Enable subpixel font rendering on non-Apple LCDs" echo "Automatically show and hide the dock"
defaults write NSGlobalDomain AppleFontSmoothing -int 2 defaults write com.apple.dock autohide -bool true
echo "Do NOT automatically show and hide the dock"
defaults write com.apple.dock autohide -bool false
echo "Make Dock icons of hidden applications translucent" echo "Make Dock icons of hidden applications translucent"
defaults write com.apple.dock showhidden -bool true defaults write com.apple.dock showhidden -bool true
echo "Do NOT show all filename extensions in Finder"
defaults write NSGlobalDomain AppleShowAllExtensions -bool false
echo "Use current directory as default search scope in Finder" echo "Use current directory as default search scope in Finder"
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
@ -75,9 +69,6 @@ defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# echo "Only use UTF-8 in Terminal.app" # echo "Only use UTF-8 in Terminal.app"
# defaults write com.apple.terminal StringEncodings -array 4 # defaults write com.apple.terminal StringEncodings -array 4
# echo "Make ⌘ + F focus the search input in iTunes"
# defaults write com.apple.iTunes NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
# Noah Prefs # Noah Prefs
echo "Enable dock magnification" echo "Enable dock magnification"
defaults write com.apple.dock magnification -bool true defaults write com.apple.dock magnification -bool true
@ -90,8 +81,15 @@ echo "Turn on Scroll Reverser"
open /Applications/Scroll\ Reverser.app open /Applications/Scroll\ Reverser.app
osascript -e 'tell application "System Events" to make login item at end with properties {path:"/Applications/Scroll Reverser.app", hidden:false}' osascript -e 'tell application "System Events" to make login item at end with properties {path:"/Applications/Scroll Reverser.app", hidden:false}'
# echo "Allow apps from anywhere" echo "Allow apps from anywhere"
# sudo spctl --master-disable SPCTL=$(spctl --status)
if ! [ "$SPCTL" = "assessments disabled" ]
then
sudo spctl --master-disable
fi
# App Store Installs
mas install 1017470484 # NextMeeting - show upcoming meeting in menu bar
# --- # ---

View File

@ -1,15 +0,0 @@
#!/bin/sh
install_cargos() {
programs=(
cargo-edit
cargo-whatfeatures
jql
racer
rustlings
toml-cli
)
for i in "${programs[@]}"; do
cargo install "$i"
done
}

View File

@ -22,18 +22,26 @@ download_rust_analyzer() {
then then
echo "downloading rust analyzer" echo "downloading rust analyzer"
rust_analyzer_bin=/usr/local/bin/rust-analyzer rust_analyzer_bin=/usr/local/bin/rust-analyzer
curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-mac -o $rust_analyzer_bin curl -s -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-mac -o $rust_analyzer_bin
chmod +x $rust_analyzer_bin chmod +x $rust_analyzer_bin
fi fi
echo "rust-analyzer ✓" echo "rust-analyzer ✓"
} }
cargo_tools() { install_cargos() {
cargo install toml-cli programs=(
cargo install jql cargo-edit
cargo-whatfeatures
jql
toml-cli
)
for i in "${programs[@]}"; do
cargo install "$i"
done
} }
install_rust install_rust
update_rust update_rust
download_rust_analyzer download_rust_analyzer
install_cargos

View File

@ -1,3 +1,6 @@
# Colors for CoC
set-option -g default-terminal "screen-256color"
# Keep plenty of history for scrollback # Keep plenty of history for scrollback
set -g history-limit 100000 set -g history-limit 100000

View File

@ -9,4 +9,4 @@ source $DOTS/zsh/vim
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
source ~/.iterm2_shell_integration.zsh #source ~/.iterm2_shell_integration.zsh