Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git co working #4

Merged
merged 4 commits into from May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions dots/config/zsh/aliases.zsh
Expand Up @@ -12,3 +12,6 @@ fi

# Reload the shell (i.e. invoke as a login shell)
alias reload="exec $SHELL -l"

# Git co-working with
alias gcww='npx @koddsson/coworking-with '
7 changes: 7 additions & 0 deletions dots/config/zsh/prompt.zsh
@@ -0,0 +1,7 @@
is_coworking() {
if [[ -n $(git config --get-all coworking.coauthor) ]]; then
echo "🤝"
fi
}

export TYPEWRITTEN_RIGHT_PROMPT_PREFIX_FUNCTION=is_coworking
4 changes: 3 additions & 1 deletion dots/gitconfig
Expand Up @@ -8,6 +8,7 @@
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
editor = code --wait
pager = cat
[push]
default = simple
[apply]
Expand All @@ -16,4 +17,5 @@
autocorrect = 1
[init]
defaultBranch = main

[pager]
branch = false
1 change: 1 addition & 0 deletions dots/zshrc
@@ -1,6 +1,7 @@
source ~/.config/zsh/init.zsh
source ~/.config/zsh/exports.zsh
source ~/.config/zsh/aliases.zsh
source ~/.config/zsh/prompt.zsh

command -v brew >/dev/null && eval "$(/opt/homebrew/bin/brew shellenv)"
[ -f ~/.config/zsh/fzf.zsh ] && source ~/.config/zsh/fzf.zsh
Expand Down
3 changes: 3 additions & 0 deletions script/setup
Expand Up @@ -39,6 +39,9 @@ if [ "$SHELL" != $(which zsh) ]; then
sudo chsh -s $(which zsh)
fi

# utils
npm i -g @koddsson/coworking-with

# done
if [ -n $CODESPACES ]; then
# git hooks magic
Expand Down