From 73e9243bec2f3dc074b52dd5d057443e2b59721f Mon Sep 17 00:00:00 2001 From: Adam Veldhousen Date: Mon, 25 Oct 2021 15:09:26 -0500 Subject: [PATCH] chore: mac specific fixes --- plugins/brew/brew.sh | 7 +++++-- plugins/extras/defaults.d/899-helpers.sh | 4 ++-- plugins/vim/config.d/.vimrc | 4 ++-- plugins/vim/vim.sh | 6 +++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/plugins/brew/brew.sh b/plugins/brew/brew.sh index ba570d3..3bb1f83 100644 --- a/plugins/brew/brew.sh +++ b/plugins/brew/brew.sh @@ -1,15 +1,18 @@ #!/bin/env bash export LINUX_BREW_PATH="/home/linuxbrew/.linuxbrew"; +export MAC_BREW_PATH="/usr/local/Homebrew"; -if ! [[ -d "${LINUX_BREW_PATH}" ]]; then +if [[ ! -d "${LINUX_BREW_PATH}" && ! -d "${MAC_BREW_PATH}" ]]; then + echo "Installing brew"; curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o /tmp/brew_install.sh; chmod +x /tmp/brew_install.sh; /tmp/brew_install.sh; rm -rf /tmp/brew_install.sh; fi -[[ -f "${LINUX_BREW_PATH}/bin/brew" ]] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"; +[[ -f "${LINUX_BREW_PATH}/bin/brew" ]] && eval "$(${LINUX_BREW_PATH}/bin/brew shellenv)"; +[[ -f "${MAC_BREW_PATH}/bin/brew" ]] && eval "$(${MAC_BREW_PATH}/bin/brew shellenv)"; [[ -f "$(brew --prefix bash-completion)/etc/bash_completion" ]] || brew install bash-completion diff --git a/plugins/extras/defaults.d/899-helpers.sh b/plugins/extras/defaults.d/899-helpers.sh index a6fd145..10b38bf 100644 --- a/plugins/extras/defaults.d/899-helpers.sh +++ b/plugins/extras/defaults.d/899-helpers.sh @@ -96,7 +96,7 @@ function targz() { # Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json` function json() { if [ -t 0 ]; then # argument - python -mjson.tool <<< "$*" | pygmentize -l javascript; + python -mjson.tool < "$*" | pygmentize -l javascript; else # pipe python -mjson.tool | pygmentize -l javascript; fi; @@ -120,7 +120,7 @@ function gitio() { } # list files -alias ll='ls -hGla --color' +alias ll='ls -hGla' #git alias gs='git status' diff --git a/plugins/vim/config.d/.vimrc b/plugins/vim/config.d/.vimrc index 50b3603..e0bbfc3 100644 --- a/plugins/vim/config.d/.vimrc +++ b/plugins/vim/config.d/.vimrc @@ -9,7 +9,7 @@ set nocompatible "color schemes "colorscheme torte -"colorscheme jellybeans +colorscheme jellybeans "colorscheme molokai "colorscheme wombat256i "colorscheme dragon-energy @@ -373,4 +373,4 @@ au GUIEnter * set vb t_vb= if has('gui_running') set go =mt set guifont=Literation\ Mono\ for\ Powerline:h12,Literation_Mono_for_Powerline:h12,Inconsolata\ for\ Powerline:h10,Ubuntu\ Mono:h26,Consolas:h12,Courier:h12 -endif +endif \ No newline at end of file diff --git a/plugins/vim/vim.sh b/plugins/vim/vim.sh index 5341a27..0bca3c5 100644 --- a/plugins/vim/vim.sh +++ b/plugins/vim/vim.sh @@ -55,9 +55,9 @@ if [[ -d "${FILES_USER_CONFIG}/vim" ]]; then vim_setup() { ! [[ -f ${HOME}/.vimrc ]] && ln -sf ${VIM}/.vimrc ${HOME}/.vimrc; - mkdir -p ${VIM}/backups; - mkdir -p ${VIM}/swaps; - mkdir -p ${VIM}/undo; + mkdir -p ${VIM}/backups; + mkdir -p ${VIM}/swaps; + mkdir -p ${VIM}/undo; vim_setup_config; vim_setup_runtime;