diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b2a8044 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "submodules/romkatv-gitstatus"] + path = submodules/romkatv-gitstatus + url = https://github.com/romkatv/gitstatus.git diff --git a/bash.d/00-init.sh b/bash.d/00-init.sh new file mode 100644 index 0000000..e14dfb3 --- /dev/null +++ b/bash.d/00-init.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# shellcheck disable=SC2034 +DOTFILES=$( cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd || return) + +SUBMODULES=$( cd "$DOTFILES/submodules" && pwd) diff --git a/bash.d/10-dotenv.sh b/bash.d/10-dotenv.sh new file mode 100644 index 0000000..d7bb4ce --- /dev/null +++ b/bash.d/10-dotenv.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +function dotenv { + export "$(grep -E -v '^#' .env | xargs)" +} diff --git a/bash.d/10-no-ms-spying.sh b/bash.d/10-no-ms-spying.sh new file mode 100644 index 0000000..6d7f94a --- /dev/null +++ b/bash.d/10-no-ms-spying.sh @@ -0,0 +1 @@ +export DOTNET_CLI_TELEMETRY_OPTOUT=1 diff --git a/bash.d/10-prompt.sh b/bash.d/10-prompt.sh new file mode 100644 index 0000000..65d394d --- /dev/null +++ b/bash.d/10-prompt.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +PROMPT_SUBMODULE="${SUBMODULES}/romkatv-gitstatus" + +if ls -A "$PROMPT_SUBMODULE"; then + git submodule init + git submodule update +fi + +# shellcheck disable=SC1090 +source "$PROMPT_SUBMODULE/gitstatus.prompt.sh" diff --git a/gitconfig b/gitconfig index d47ef9b..3290416 100644 --- a/gitconfig +++ b/gitconfig @@ -1,10 +1,13 @@ [user] - name = Vasili Svirydau - email = vsvirydau@copperleaf.com + name = Vasili Sviridov + email = vasili@sviridov.ca [push] default = simple +[pull] + rebase = true + [core] editor = /usr/bin/vim @@ -23,6 +26,7 @@ [difftool "bcompare"] trustExitCode = true - cmd = bcompare "$LOCAL" "$REMOTE" + cmd = bcompare \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" + [alias] - ignore = "!gi() { curl -sL https://www.gitignore.io/api/$@ ;}; gi" + ignore = "!gi() { curl -sL https://www.gitignore.io/api/$@ ;}; gi" diff --git a/submodules/romkatv-gitstatus b/submodules/romkatv-gitstatus new file mode 160000 index 0000000..7d9f0d0 --- /dev/null +++ b/submodules/romkatv-gitstatus @@ -0,0 +1 @@ +Subproject commit 7d9f0d0db3ffbe0a6993a5ff7d47e741cef3473b diff --git a/tmux.conf b/tmux.conf index 61a6b2a..b50d2fa 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,5 +1,5 @@ -if-shell "uname | grep -q Darwin" "set -g default-command \"reattach-to-user-namespace -l $SHELL\"" -set -g default-terminal "screen-256color" +if-shell "command -v reattach-to-user-namespace" "set -g default-command \"reattach-to-user-namespace -l $SHELL\"" +set -g default-terminal "tmux-256color" run "~/.dotfiles/tmux.sh" set -g base-index 1 set -g set-titles on @@ -15,6 +15,8 @@ setw -g automatic-rename on setw -g monitor-activity on setw -g aggressive-resize on +set -g mouse on + unbind C-a unbind C-b