diff --git a/.dotfiles/base/base.sh b/.dotfiles/base/base.sh index c6dc3695b..924f3883f 100755 --- a/.dotfiles/base/base.sh +++ b/.dotfiles/base/base.sh @@ -30,7 +30,7 @@ echo "------------------------------" # get the absolute path of the .dotfiles directory # this is only for aesthetic reasons to have an absolute symlink path instead of a relative one # /.dotfiles/somedotfile vs /.dotfiles/base/../somedotfile -readonly dotfiles="$(dirname -- "$(dirname -- "$(readlink -f -- "$0")")")" +readonly dotfiles="$(dirname -- "$(dirname -- "$(greadlink -f -- "$0")")")" export RCRC="../rcrc" rcup -v -d "${dotfiles}" diff --git a/.dotfiles/base/brewfile b/.dotfiles/base/brewfile index 01958ca45..5e3c49671 100644 --- a/.dotfiles/base/brewfile +++ b/.dotfiles/base/brewfile @@ -1,3 +1,4 @@ tap "thoughtbot/formulae" +brew "coreutils" brew "rcm" diff --git a/.dotfiles/tag-smu/SpaceVim.d/init.toml b/.dotfiles/tag-smu/SpaceVim.d/init.toml index 1ca9a6689..daa9e95c5 100644 --- a/.dotfiles/tag-smu/SpaceVim.d/init.toml +++ b/.dotfiles/tag-smu/SpaceVim.d/init.toml @@ -1,60 +1,69 @@ -[options] - colorscheme = "one" - colorscheme_bg = "dark" - statusline_separator = "arrow" - statusline_inactive_separator = "arrow" - buffer_index_type = 4 - filetype_icon = true - default_indent = 4 - relativenumber = false - enable_statusline_display_mode = true - -# Enable autocomplete layer -[[layers]] -name = 'autocomplete' +[[layers]] auto-completion-return-key-behavior = "complete" auto-completion-tab-key-behavior = "smart" +name = "autocomplete" [[layers]] -name = 'shell' -default_position = 'top' default_height = 30 +default_position = "top" +name = "shell" + +[[layers]] +enable = false +name = "core#statusline" [[layers]] -name = 'checkers' +enable = false +name = "core#tabline" [[layers]] -name = 'colorscheme' +name = "VersionControl" [[layers]] -name = 'VersionControl' +name = "checkers" [[layers]] -name = 'fzf' +name = "colorscheme" [[layers]] -name = 'lang#html' +name = "fzf" [[layers]] -name = 'lang#javascript' +name = "lang#html" [[layers]] -name = 'lang#json' +name = "lang#javascript" [[layers]] -name = 'lang#markdown' +name = "lang#json" [[layers]] -name = 'lang#php' +name = "lang#markdown" [[layers]] -name = 'lang#sh' +name = "lang#php" [[layers]] -name = 'lang#toml' +name = "lang#sh" [[layers]] -name = 'lang#typescript' +name = "lang#toml" [[layers]] -name = 'lang#xml' +name = "lang#typescript" + +[[layers]] +name = "lang#xml" + +[options] +buffer_index_type = 4 +colorscheme = "$BASE16_THEME" +colorscheme_bg = "dark" +custom_plugins = [["chriskempson/base16-vim"]] +default_indent = 4 +enable_statusline_display_mode = true +filetype_icon = true +guifont = "FuraCodeNerdFontComplete-Light 12" +relativenumber = false +statusline_inactive_separator = "arrow" +statusline_separator = "arrow" diff --git a/.dotfiles/tag-smu/gitconfig b/.dotfiles/tag-smu/gitconfig index fa7fda6a5..15f7f0ed4 100644 --- a/.dotfiles/tag-smu/gitconfig +++ b/.dotfiles/tag-smu/gitconfig @@ -100,6 +100,8 @@ # Prevent showing files whose names contain non-ASCII symbols as unversioned. # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html precomposeunicode = false + pager = diff-so-fancy | less --tabs=4 -RFX + editor = vim [color] # Use colors in Git commands that are capable of colored output when diff --git a/.dotfiles/tag-smu/modules/editor/brewfile b/.dotfiles/tag-smu/modules/editor/brewfile index e51ed298a..fd0a75f5a 100644 --- a/.dotfiles/tag-smu/modules/editor/brewfile +++ b/.dotfiles/tag-smu/modules/editor/brewfile @@ -12,5 +12,5 @@ cask "macdown" cask "oni" # diff -cask "p4merge" +cask "p4v" brew "diff-so-fancy" diff --git a/.dotfiles/tag-smu/modules/editor/editor.sh b/.dotfiles/tag-smu/modules/editor/editor.sh index 10e3a758e..40bbea898 100755 --- a/.dotfiles/tag-smu/modules/editor/editor.sh +++ b/.dotfiles/tag-smu/modules/editor/editor.sh @@ -55,6 +55,7 @@ if [[ ! -e "${sublime_package_control}" ]]; then echo "------------------------------" echo "Installing Sublime3 package control" + mkdir -p $(dirname "${sublime_package_control}") curl -fsSL "https://packagecontrol.io/Package%20Control.sublime-package" > "${sublime_package_control}" fi diff --git a/.dotfiles/tag-smu/modules/macos/macos.sh b/.dotfiles/tag-smu/modules/macos/macos.sh index b91390816..fd55424a1 100755 --- a/.dotfiles/tag-smu/modules/macos/macos.sh +++ b/.dotfiles/tag-smu/modules/macos/macos.sh @@ -1,11 +1,5 @@ #!/bin/bash -if [[ "${EUID}" -ne 0 ]]; then - echo "This module requires sudo rights." - echo "You should run this module using the smu script." - exit 1 -fi - # Run the osx.sh Script # I strongly suggest you read through the commented osx.sh # source file and tweak any settings based on your personal @@ -24,6 +18,12 @@ echo "" # settings we’re about to change osascript -e 'tell application "System Preferences" to quit' +# Ask for the administrator password upfront +sudo -v + +# Keep-alive: update existing `sudo` time stamp until `.macos` has finished +while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & + ############################################################################### # General UI/UX # ############################################################################### diff --git a/.dotfiles/tag-smu/modules/macosupdate/macosupdate.sh b/.dotfiles/tag-smu/modules/macosupdate/macosupdate.sh index ed9bf776b..00d61a4f5 100755 --- a/.dotfiles/tag-smu/modules/macosupdate/macosupdate.sh +++ b/.dotfiles/tag-smu/modules/macosupdate/macosupdate.sh @@ -1,16 +1,16 @@ #!/bin/bash -if [[ "${EUID}" -ne 0 ]]; then - echo "This module requires sudo rights." - echo "You should run this module using the smuu script." - exit 1 -fi - echo "------------------------------" echo "Updating macOS. If this requires a restart, run the script again." echo "------------------------------" echo "" +# Ask for the administrator password upfront +sudo -v + +# Keep-alive: update existing `sudo` time stamp until `.macos` has finished +while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & + # Install all available updates sudo softwareupdate -i -a diff --git a/.dotfiles/tag-smu/modules/php/brewfile b/.dotfiles/tag-smu/modules/php/brewfile index 838e1262d..ccd9faa66 100644 --- a/.dotfiles/tag-smu/modules/php/brewfile +++ b/.dotfiles/tag-smu/modules/php/brewfile @@ -4,3 +4,4 @@ brew "rabbitmq-c" brew "php@7.2" brew "php@5.6" brew "composer" +brew "libmemcached" diff --git a/smu b/smu index 6d58ac51f..2211c46f2 100755 --- a/smu +++ b/smu @@ -130,19 +130,6 @@ provision_enabled() { export _arg_provision export -f provision_enabled -start_sudo() { - sudo -v - ( while true; do sudo -v; sleep 60; done; ) & - SUDO_PID="$!" - trap stop_sudo SIGINT SIGTERM -} - -stop_sudo() { - kill "$SUDO_PID" - trap - SIGINT SIGTERM - sudo -k -} - provision_module() { # source base from installation directory # this enables smu to work on first time installations @@ -153,7 +140,6 @@ provision_module() { fi local -r script="${1}.sh" - local -r requires_sudo=("macos" "macosupdate") if [[ ! -e "${path}/${script}" ]]; then echo "${path}/${script} does not seem to exist, skipping." @@ -163,23 +149,12 @@ provision_module() { echo "Running ${path}/${script} module" - if [[ " ${requires_sudo[@]} " =~ " ${1}" ]]; then - ( - cd "${path}/" && - start_sudo && - [[ -s ./before.sh ]] && source ./before.sh - source "./${script}" && - [[ -s ./after.sh ]] && source ./after.sh - stop_sudo - ) - else - ( - cd "${path}/" && - [[ -s ./before.sh ]] && source ./before.sh - source "./${script}" && - [[ -s ./after.sh ]] && source ./after.sh - ) - fi + ( + cd "${path}/" && + [[ -s ./before.sh ]] && source ./before.sh + source "./${script}" && + [[ -s ./after.sh ]] && source ./after.sh + ) } if [[ ${_arg_lsrc} == "on" ]]; then