diff --git a/.editorconfig b/.editorconfig index 104850f..6d861c6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,3 +11,12 @@ trim_trailing_whitespace = true [.git{ignore,modules}] indent_style = tab indent_size = 1 + +[local/bin/*] +shell_variant = bash # --language-variant +binary_next_line = true +switch_case_indent = true # --case-indent +space_redirects = true +keep_padding = true +function_next_line = true # --func-next-line + diff --git a/config/exports-apps b/config/exports-apps index 564f644..01ad961 100755 --- a/config/exports-apps +++ b/config/exports-apps @@ -110,4 +110,4 @@ export ANDROID_HOME="$XDG_DATA_HOME/android" export GNUPGHOME="$XDG_DATA_HOME/gnupg" export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc" export TMUX_CONF="$DOTFILES/config/tmux/tmux.conf" - +export BAT_THEME="ansi" diff --git a/local/bin/dfm b/local/bin/dfm index 22b0c20..9db0da0 100755 --- a/local/bin/dfm +++ b/local/bin/dfm @@ -200,8 +200,8 @@ function section_dotfiles ~/.config/astronvim \ ~/.config/nvim msg_ok "Deleted old nvim files" - ln -s $DOTFILES/config/astronvim ~/.config/astronvim - ln -s $DOTFILES/config/nvim ~/.config/nvim + ln -s "$DOTFILES/config/astronvim" ~/.config/astronvim + ln -s "$DOTFILES/config/nvim" ~/.config/nvim msg_ok "Linked nvim and astronvim" have npm && $0 install npm msg_ok "Installed packages" @@ -218,6 +218,7 @@ function section_dotfiles -type f -perm +111 \ -not -path '*/.git/*' \ -not -path '*dotbot*' \ + -not -path '*tmux*' \ -not -name '*.pl' \ -not -name '*.py' \ -not -name '*.php' \ diff --git a/scripts/install-fzf.sh b/scripts/install-fzf.sh index 804ad93..f1ad24c 100755 --- a/scripts/install-fzf.sh +++ b/scripts/install-fzf.sh @@ -10,7 +10,7 @@ FZF_PATH="${XDG_CONFIG_HOME}/fzf" if [ ! -d "$FZF_PATH" ]; then git clone --depth 1 "$FZF_GIT" "$FZF_PATH" - $FZF_PATH/install --xdg --all --no-update-rc + "$FZF_PATH/install" --xdg --all --no-update-rc else msg_done "fzf ($FZF_PATH/) already installed" fi diff --git a/scripts/install-go-packages.sh b/scripts/install-go-packages.sh index 53f924b..587991d 100755 --- a/scripts/install-go-packages.sh +++ b/scripts/install-go-packages.sh @@ -20,6 +20,8 @@ have go && { github.com/cheat/cheat/cmd/cheat@latest # Render markdown on the CLI, with pizzazz! 💅 github.com/charmbracelet/glow@latest + # Static checker for GitHub Actions workflow files + github.com/rhysd/actionlint/cmd/actionlint@latest ) for pkg in "${packages[@]}"; do diff --git a/scripts/install-xcode-cli-tools.sh b/scripts/install-xcode-cli-tools.sh index 7d109dd..25df175 100755 --- a/scripts/install-xcode-cli-tools.sh +++ b/scripts/install-xcode-cli-tools.sh @@ -20,10 +20,12 @@ while true; do kill -0 "$$" || exit done 2> /dev/null & -# https://unix.stackexchange.com/a/408305 -# check if user has git installed and propose to install if not installed -if [ "$(which git)" ]; then - echo "You already have git. Continuing..." +XCODE_TOOLS_PATH=$(xcode-select -p) +XCODE_SWIFT_PATH="$XCODE_TOOLS_PATH/usr/bin/swift" + +# Modified from https://unix.stackexchange.com/a/408305 +if [ -a "$XCODE_SWIFT_PATH" ]; then + echo "You have swift from xcode-select. Continuing..." else XCODE_MESSAGE="$( osascript -e \ @@ -38,7 +40,7 @@ else fi fi -until [ "$(which git)" ]; do +until [ -f "$XCODE_SWIFT_PATH" ]; do echo -n "." sleep 1 done diff --git a/scripts/set-macos-defaults.sh b/scripts/set-macos-defaults.sh index 2bf8084..4fee598 100755 --- a/scripts/set-macos-defaults.sh +++ b/scripts/set-macos-defaults.sh @@ -191,7 +191,8 @@ defaults write com.apple.finder FXInfoPanesExpanded -dict \ ############################################################################### # Set default screenshot location -#defaults write com.apple.screencapture "location" -string "~/Documents/Screenshots" +mkdir -p "$HOME/Documents/Screenshots" +defaults write com.apple.screencapture "location" -string "$HOME/Documents/Screenshots" # Exclude date and time in screenshot filenames defaults write com.apple.screencapture "include-date" -bool true @@ -245,7 +246,10 @@ defaults write com.apple.Safari \ -bool true # Don’t display the annoying prompt when quitting iTerm -#defaults write com.googlecode.iterm2 PromptOnQuit -bool false +defaults write com.googlecode.iterm2 PromptOnQuit -bool false +# Use iTerm2 preferences from the .dotfiles folder. +defaults write com.googlecode.iterm2 PrefsCustomFolder \ + -string "$HOME/.dotfiles/config/iterm2" # Prevent Time Machine from prompting to use new hard drives as backup volume defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true