Skip to content

Commit

Permalink
dotfiles | Add theme spaceship.zsh (#6)
Browse files Browse the repository at this point in the history
* dotfile | Add theme spaceship.zsh

* Testing workflow

* Set posixly to ""

* Testing

* Update command

* Remove workflow

* Add spaceship config file

* Change git status color to yellow

* Update permissions on scripts
  • Loading branch information
nicholashoule authored Oct 25, 2022
1 parent bc463cc commit eb45a28
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 39 deletions.
1 change: 1 addition & 0 deletions .homesick_subdir
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.git-template/hooks
.config/spaceship
66 changes: 36 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,82 @@
# dotfiles-macos

This repo depends on the [Homesick](https://github.com/technicalpickles/homesick) project to manage dotfiles.
## macOS

#### OS

- macOS
This repo depends on the [Homesick](https://github.com/technicalpickles/homesick) & [Homebrew](https://github.com/Homebrew/brew) 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
```

[Ruby Version Manager - RVM](https://rvm.io/)

##### Verify GPG keys

```
brew install gnupg
```

##### RVM Installation
###### [Ruby Version Manager - RVM](https://rvm.io/)

```
curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles
```
---

### To configure dotfiles
### Configure dotfiles with Homesick

1. Install Homesick with `gem install homesick`
2. Clone this castle with `homesick clone nicholashoule/dotfiles-macos`
3. Create the symlinks with `homesick symlink dotfiles`

---

#### Other post-configurations
### Post-configurations

##### Set up VundleVim
#### Set up VundleVim

[GitHub - VundleVim](https://github.com/VundleVim/Vundle.vim)
###### [GitHub - VundleVim](https://github.com/VundleVim/Vundle.vim)

```
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
```

To install from command line: `vim +PluginInstall +qall`
- To install from command line: `vim +PluginInstall +qall`
- To install inside Vim, launch vim and run `:PluginInstall`

Launch vim and run `:PluginInstall`
#### Set up .oh-my-zsh

##### Set up .oh-my-zsh

[GitHub - Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh)
###### [GitHub - Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh)

```
export ZSH="${HOME}/.oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

##### Set up coreutils
#### Set up Spaceship (Theme)

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

```
brew install spaceship
```

#### Set up Nerd Fonts (Fonts)

[homebrew - coreutils](https://formulae.brew.sh/formula/coreutils)
###### [zsh - 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
#### Set up pre-commit

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

```
brew install pre-commit
```

---
46 changes: 46 additions & 0 deletions home/.config/spaceship/spaceship.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/zsh
# shellcheck disable=all
# Settings, config: https://spaceship-prompt.sh/config/intro/
# UTF-8 Symbols: https://www.w3schools.com/charsets/ref_utf_arrows.asp

## Prompt-level options
# https://spaceship-prompt.sh/config/prompt/

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

## Prompt (Char)
SPACESHIP_CHAR_PREFIX=""
SPACESHIP_CHAR_SYMBOL=" : "
SPACESHIP_CHAR_SYMBOL_ROOT="#"

## Username & Hostname
SPACESHIP_USER_SHOW=always
SPACESHIP_USER_PREFIX="@"
SPACESHIP_USER_SUFFIX=""
SPACESHIP_USER_COLOR="green"
SPACESHIP_USER_COLOR_ROOT="red"
SPACESHIP_HOST_SHOW="always"
SPACESHIP_HOST_SHOW_FULL=true
SPACESHIP_HOST_PREFIX=""
SPACESHIP_HOST_SUFFIX="|"
SPACESHIP_HOST_COLOR="blue"
SPACESHIP_HOST_COLOR_SSH="red"

## Directory
SPACESHIP_DIR_SHOW=true
SPACESHIP_DIR_TRUNC_REPO=false
SPACESHIP_DIR_PREFIX="|"
SPACESHIP_DIR_SUFFIX="|"
SPACESHIP_DIR_COLOR="cyan"

## Execution time
SPACESHIP_EXEC_TIME_SHOW=false

## Git
# https://spaceship-prompt.sh/sections/git/
SPACESHIP_GIT_STATUS_SHOW=true
SPACESHIP_GIT_STATUS_COLOR="yellow"
13 changes: 7 additions & 6 deletions home/.sh/brew-helper.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ sudo -v
# HOMEBREW_PREFIX=/usr/local
# HOMEBREW_CELLAR=/usr/local/Cellar
# HOMEBREW_REPOSITORY=/usr/local/Homebrew
# export HOMEBREW_PREFIX HOMEBREW_CELLAR HOMEBREW_REPOSITORY
# export HOMEBREW_PREFIX HOMEBREW_CELLAR HOMEBREW_REPOSITORY HOMEBREW_CASK_OPTS
export HOMEBREW_CASK_OPTS="--appdir=~/Applications"

# Info
# sudo xcode-select --install
Expand All @@ -26,12 +27,12 @@ if command -v brew 1>/dev/null 2>&1; then
brew update && brew upgrade

# Install brew packages
brew install -sq coreutils # Install GNU core utilities (those that come with OS X are outdated)
brew install -sq wget # Install standard `vim` with IRI support
brew install -sq findutils # Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed.
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 gnupg # Install gpg (GnuPG)
brew install -sq tree # Install tree

## Create symlinks
#sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions home/.sh/nerd-fonts.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/zsh
# shellcheck disable=all
# https://github.com/ryanoasis/nerd-fonts
# https://github.com/ryanoasis/nerd-fonts#option-4-homebrew-fonts
# Check for brew (Homebrew)
if command -v brew 1>/dev/null 2>&1; then
# Install brew packages
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
fi
File renamed without changes.
10 changes: 7 additions & 3 deletions home/.zshrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# .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

## Colors
# man ls | grep -A 50 'LSCOLORS'
Expand All @@ -19,9 +22,10 @@ export COMPLETION_WAITING_DOTS
## ZSH w/.oh-my-zsh
# https://github.com/ohmyzsh/ohmyzsh
ZSH="${HOME}/.oh-my-zsh"
ZSH_THEME="rkj-repos" # Set theme to load. (agnoster, rkj-repos, ys)
zstyle ':omz:update' mode reminder # Set omz update reminder
export ZSH ZSH_THEME
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
export ZSH

## Plugins
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
Expand Down
22 changes: 22 additions & 0 deletions home/Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Brewfile
# https://github.com/Homebrew/homebrew-bundle
# tap "homebrew/cask"
tap "homebrew/cask-fonts"

# set arguments for all 'brew install --cask' commands
cask_args appdir: "~/Applications", require_sha: true

# Install brew packages
brew "coreutils" # Install GNU core utilities
brew "wget" # Install GNU wget
brew "findutils" # Install GNU find, locate, updatedb, and xargs, g-prefixed
brew "gnupg" if OS.mac? # Install GNU gpg (GnuPG)
brew "tree" # Install GNU tree

# Others
#brew "[email protected]", restart_service: true, link: true, conflicts_with: ["mysql"] # MySQL 5.6
brew "pre-commit" # Install pre-commit package manager (https://pre-commit.com/#install)

# Themes & Fonts
brew "spaceship" # Theme, https://github.com/spaceship-prompt/spaceship-prompt
brew "font-hack-nerd-font" # Fonts, https://github.com/ryanoasis/nerd-fonts

0 comments on commit eb45a28

Please sign in to comment.