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

dotfiles | Minor additions and orginization changes #10

Merged
merged 3 commits into from
Oct 25, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,32 @@ OWNERS text
*.DOCX diff=astextplain

# Shell
*.sh eol=lf
*.sh eol=lf
*.zsh eol=lf
*.awk eol=lf
*.aliases eol=lf

# Git
*.gitattributes eol=lf linguist-language=gitattributes
*.gitignore eol=lf
*.gitkeep eol=lf
*.gitmodules eol=lf
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
.gitmodules export-ignore

# configs
.editorconfig eol=lf
.tmux.conf eol=lf

# markdown
*.md text diff=markdown eol=lf

# vim
*.vim eol=lf
.vimrc eol=lf
.gvimrc eol=lf
*.vim eol=lf
.vimrc eol=lf
.vimrc.settings eol=lf

# yaml
*.yaml eol=lf
Expand All @@ -58,6 +64,9 @@ OWNERS text
.ruby-version eol=lf
Gemfile eol=lf

# homebrew
Brewfile eol=lf

# python
*.py diff=python eol=lf
*.py3 diff=python eol=lf
Expand Down
7 changes: 7 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://git-scm.com/docs/gitmodules
[submodule ".oh-my-zsh"]
path = .oh-my-zsh
url = http://github.com/robbyrussell/oh-my-zsh.git
[submodule ".vim/bundle/Vundle.vim"]
path = .vim/bundle/Vundle.vim
url = https://github.com/VundleVim/Vundle.vim.git
32 changes: 12 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## macOS

This repo depends on the [Homesick](https://github.com/technicalpickles/homesick) & [Homebrew](https://github.com/Homebrew/brew) projects to manage system dotfiles.
This git repo depends on the [Homebrew](https://github.com/Homebrew/brew), [Homesick](https://github.com/technicalpickles/homesick) & [Spaceship Prompt](https://github.com/spaceship-prompt/spaceship-prompt) projects to manage system dotfiles.

### Required: Ruby

[Homebrew - Ruby](https://www.ruby-lang.org/en/documentation/installation/)
###### [Homebrew - Ruby](https://www.ruby-lang.org/en/documentation/installation/)

```
brew install ruby
Expand All @@ -24,7 +24,7 @@ brew install ruby

---

### Post-configurations
## Git submodules

#### Set up VundleVim

Expand All @@ -46,37 +46,29 @@ export ZSH="${HOME}/.oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

#### Set up Spaceship (Theme)
## Post-configurations

###### [zsh - Spaceship](https://github.com/spaceship-prompt/spaceship-prompt)
#### Theme - Set up Spaceship

###### [Spaceship Prompt](https://github.com/spaceship-prompt/spaceship-prompt)

```
brew install spaceship
```

#### Set up Nerd Fonts (Fonts)
#### Fonts - Set up Nerd Fonts

###### [zsh - Nerd Fonts](https://github.com/ryanoasis/nerd-fonts)
###### [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts)

```
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
```

#### Set up coreutils

###### [homebrew - coreutils](https://formulae.brew.sh/formula/coreutils)

```
brew install coreutils
```

#### Set up pre-commit
#### Homebrew

###### [homebrew - pre-commit](https://pre-commit.com/#installation)
###### [Brewfile](home/Brewfile)

```
brew install pre-commit
brew bundle
```

---
3 changes: 2 additions & 1 deletion home/.config/spaceship/spaceship.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

## Time
SPACESHIP_TIME_SHOW=true
SPACESHIP_TIME_PREFIX="·"
SPACESHIP_TIME_SUFFIX="|"
SPACESHIP_TIME_FORMAT='%W%t'
SPACESHIP_TIME_FORMAT='%W %t'
SPACESHIP_TIME_COLOR='white'

## Prompt (Char)
Expand Down
10 changes: 10 additions & 0 deletions home/.gemrc
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
---
gem: --no-rdoc --no-ri
---
gem: --no-ri --no-rdoc
:verbose: false
:backtrace: false
:bulk_threshold: 1000
:update_sources: true
:sources:
- https://rubygems.org
- https://gems.rubyforge.org
23 changes: 15 additions & 8 deletions home/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
# https://git-scm.com/docs/git-config
; core variables
[core]
whitespace = trailing-space,space-before-tab
editor = vim
filemode = false
whitespace = trailing-space,space-before-tab,cr-at-eol
editor = vim
filemode = false

; template
# git config --global init.templateDir ~/.git-template
# pre-commit init-templatedir ~/.git-template
[init]
templatedir = "~/.git-template"
templatedir = "~/.git-template"
defaultBranch = main

; color
[color]
ui = auto
ui = auto
showBranch = auto
status = auto
status = auto

; Defaults
[pull]
Expand All @@ -36,6 +37,8 @@

; Aliases
[alias]
br = branch
co = checkout
gconf = config --global -e
hash = rev-parse HEAD
ghist = log --pretty=format:'%C(dim cyan)%G?%C(reset) %C(yellow)%h%C(reset) - %C(green)(%cr)%C(reset) %C(bold white)%an%C(reset) %s %C(bold blue)%d%C(reset)' --graph --date-order --date=relative --abbrev-commit
Expand All @@ -46,11 +49,15 @@

; user
[user]
name = "[name]"
email = [email protected]
name = "full name"
email = [email protected]
username = "username"

; credential
# Cache credentials in memory for a short period of time
[credential]
#credential.helper=osxkeychain
helper = cache --timeout 7200

# [url "[email protected]:"]
# insteadOf = https://github.com/
21 changes: 13 additions & 8 deletions home/.sh/brew-helper.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
# Doc: https://docs.brew.sh/Installation#macos-requirements
# Command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Ask for the administrator password upfront.
# Ask for the administrator password upfront
sudo -v

## Settings
# HOMEBREW_PREFIX=/usr/local
# HOMEBREW_CELLAR=/usr/local/Cellar
# HOMEBREW_REPOSITORY=/usr/local/Homebrew
# export HOMEBREW_PREFIX HOMEBREW_CELLAR HOMEBREW_REPOSITORY HOMEBREW_CASK_OPTS
export HOMEBREW_CASK_OPTS="--appdir=~/Applications"

# Info
## Info
# sudo xcode-select --install
# brew --env
# brew cat dos2unix
Expand All @@ -21,22 +23,25 @@ export HOMEBREW_CASK_OPTS="--appdir=~/Applications"
## Permission issues
# sudo chown -R $(whoami) $(brew --prefix)/*

## Brew
# Check for brew (Homebrew)
if command -v brew 1>/dev/null 2>&1; then
## Update & upgrade
# Update & upgrade
brew update && brew upgrade

# Install brew packages
# Install core packages
brew install -sq coreutils # Install GNU core utilities
brew install -sq wget # Install GNU wget
brew install -sq findutils # Install GNU find, locate, updatedb, and xargs, g-prefixed
brew install -sq gnupg # Install GNU gpg (GnuPG)
brew install -sq tree # Install GNU tree
brew install -sq pre-commit # Install pre-commit package manager (https://pre-commit.com/#install)
brew install -sq dos2unix # Install GNU dos2unix

## Create symlinks
#sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum
# Install other packages
brew install -sq tmux # Install tmux
brew install -sq jq # Install jq
brew install -sq pre-commit # Install pre-commit package manager (https://pre-commit.com/#install)

## Remove outdated versions
# Remove outdated versions
brew cleanup
fi
2 changes: 2 additions & 0 deletions home/.sh/nerd-fonts.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# shellcheck disable=all
# https://github.com/ryanoasis/nerd-fonts
# https://github.com/ryanoasis/nerd-fonts#option-4-homebrew-fonts

## Brew
# Check for brew (Homebrew)
if command -v brew 1>/dev/null 2>&1; then
# Install brew packages
Expand Down
4 changes: 1 addition & 3 deletions home/.sh/oh-my-zsh-helper.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
# shellcheck disable=all
# https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
typeset -r ZSH="${HOME}/.oh-my-zsh"
export ZSH

sh -c "$(curl -fsSL 'https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh')"
export ZSH && sh -c "$(curl -fsSL 'https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh')"
2 changes: 1 addition & 1 deletion home/.sh/powerline-fonts.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# shellcheck disable=all
# https://github.com/powerline/fonts
# https://powerline.readthedocs.io/en/master/installation.html#pip-installation
pip3 install --user powerline-status
pip3 install --user powerline-status
11 changes: 11 additions & 0 deletions home/.sh/spaceship.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/zsh
# shellcheck disable=all
# https://github.com/spaceship-prompt/spaceship-prompt

## Brew
# Check for brew (Homebrew)
if command -v brew 1>/dev/null 2>&1; then
# Themes & Fonts
brew install -sq spaceship # Theme, https://github.com/spaceship-prompt/spaceship-prompt
brew install -sq font-hack-nerd-font # Fonts, https://github.com/ryanoasis/nerd-fonts
fi
2 changes: 2 additions & 0 deletions home/.sh/vscode-helper.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# https://code.visualstudio.com/download
# https://code.visualstudio.com/docs/setup/mac

## Settings, .zprofile
# Adding Visual Studio Code (code) to .zprofile
typeset -r ZPROFILE="${HOME}/.zprofile"
typeset -r vscode_app_path='/Applications/Visual Studio Code.app/Contents/Resources/app/bin'
Expand All @@ -16,6 +17,7 @@ EOF
source "${ZPROFILE}"
fi

## Extensions
# code --list-extensions
# code --install-extension [email protected]
# @installed
Expand Down
47 changes: 27 additions & 20 deletions home/.zshrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
# .zshrc
# shellcheck disable=all
# https://zsh.sourceforge.io/Guide/zshguide02.html
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
export LANG LC_ALL

# ## Locale
# LANG=en_US.UTF-8
# LC_ALL=en_US.UTF-8
# export LANG LC_ALL

## Completion
# Rebuild: rm -f ~/.zcompdump && compinit
autoload -Uz compinit
compinit
COMPLETION_WAITING_DOTS="%F{blue}…%f"
export COMPLETION_WAITING_DOTS

## History
# zstyle -L, zstyle :completion:history-words:
zstyle ':completion:*:history-words' menu yes # activate menu
zstyle ':completion:*:history-words' remove-all-dups yes # ignore duplicate entries
setopt EXTENDED_HISTORY

## Colors
# man ls | grep -A 50 'LSCOLORS'
Expand All @@ -13,39 +28,31 @@ LSCOLORS=Gxfxcxdxbxegedabagacad
zstyle ':completion:*' list-colors "${(s.:.)LSCOLORS}"
export CLICOLOR COLORTERM LSCOLORS

## Completion
autoload -U compinit
compinit
COMPLETION_WAITING_DOTS="%F{blue}…%f"
export COMPLETION_WAITING_DOTS

## ZSH w/.oh-my-zsh
# https://github.com/ohmyzsh/ohmyzsh
ZSH="${HOME}/.oh-my-zsh"
zstyle ':omz:update' mode reminder # Set omz update reminder
#ZSH_THEME="spaceship" # Set theme to load. (agnoster, rkj-repos, ys)
source $(brew --prefix)/opt/spaceship/spaceship.zsh # (brew install spaceship), https://github.com/spaceship-prompt/spaceship-prompt
zstyle ':omz:update' mode reminder # Set omz update reminder
export ZSH

## Plugins
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
plugins=(git macos brew ssh-agent tmux)

# Load SSH identities
## Load SSH identities
# id_rsa gitlab_priv gitlab_work github_priv github_work
zstyle ':omz:plugins:ssh-agent' identities id_rsa

## Source
# Start oh-my-zsh
source "${ZSH}/oh-my-zsh.sh"

# Source other configs
# Aliases
source "${HOME}/.aliases"

## History
# zstyle -L, zstyle :completion:history-words:
zstyle ':completion:*:history-words' menu yes # activate menu
zstyle ':completion:*:history-words' remove-all-dups yes # ignore duplicate entries
setopt EXTENDED_HISTORY
## Themes
#ZSH_THEME="spaceship" # Set theme to load. (agnoster, rkj-repos)
source $(brew --prefix)/opt/spaceship/spaceship.zsh # (brew install spaceship), https://github.com/spaceship-prompt/spaceship-prompt

## Additional Configurations

# ## Python, pyenv
# if command -v pyenv 1>/dev/null 2>&1; then
Expand Down
Loading