Skip to content

Commit

Permalink
Update macos script to change terminal colors
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslago committed Jun 8, 2022
1 parent 8692ceb commit ddcc319
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 6 deletions.
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ brew "zsh"
brew "fzf"
brew "yarn"
brew "fnm"
brew "node"

cask "stats"
cask "docker"
Expand Down
41 changes: 40 additions & 1 deletion Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,45 @@
"hashicorp/tap/terraform-ls": {
"version": "0.27.0",
"bottle": false
},
"node": {
"version": "18.3.0",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:b94f7e660f6f77d825bdeed827cefa55ec029f5b050cbed3d18978701b7da09a",
"sha256": "b94f7e660f6f77d825bdeed827cefa55ec029f5b050cbed3d18978701b7da09a"
},
"arm64_big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:945e7ed51e0ddc5b1d3579d108d52667fda325b63216b13a67019b827c891ea1",
"sha256": "945e7ed51e0ddc5b1d3579d108d52667fda325b63216b13a67019b827c891ea1"
},
"monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:94c0e757267632e845d84aa25e2a2cd84df9785c61e876c27bb039a860084266",
"sha256": "94c0e757267632e845d84aa25e2a2cd84df9785c61e876c27bb039a860084266"
},
"big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:156c5fa577548a1e2860a5213994f3311b6b3e3bbbfbd1a3bfc9c0a35a697720",
"sha256": "156c5fa577548a1e2860a5213994f3311b6b3e3bbbfbd1a3bfc9c0a35a697720"
},
"catalina": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:712fcc0fd3691e1cb62d5bb8cc339aa3202a1542e005acd9f049d9061d70019c",
"sha256": "712fcc0fd3691e1cb62d5bb8cc339aa3202a1542e005acd9f049d9061d70019c"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:1796f7cd6c5cb20cb76cb8c304e7f47be6eecef4a0b4bdf06146c5c9495d3ee0",
"sha256": "1796f7cd6c5cb20cb76cb8c304e7f47be6eecef4a0b4bdf06146c5c9495d3ee0"
}
}
}
}
},
"cask": {
Expand Down Expand Up @@ -711,7 +750,7 @@
"monterey": {
"HOMEBREW_VERSION": "3.5.1",
"HOMEBREW_PREFIX": "/opt/homebrew",
"Homebrew/homebrew-core": "c9daa2d90940843389abb333630bd6cdfbf6c004",
"Homebrew/homebrew-core": "56e6bcd7a8a8e35ea7f7f5c59d97f862e07349aa",
"CLT": "13.0.0.0.1.1627064638",
"Xcode": "13.2.1",
"macOS": "12.2.1"
Expand Down
55 changes: 55 additions & 0 deletions gruvbox-dark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash

# ====================CONFIG THIS =============================== #
export COLOR_01="#282828" # HOST
export COLOR_02="#cc241d" # SYNTAX_STRING
export COLOR_03="#98971a" # COMMAND
export COLOR_04="#d79921" # COMMAND_COLOR2
export COLOR_05="#458588" # PATH
export COLOR_06="#b16286" # SYNTAX_VAR
export COLOR_07="#689d6a" # PROMP
export COLOR_08="#a89984" #

export COLOR_09="#928374" #
export COLOR_10="#fb4934" # COMMAND_ERROR
export COLOR_11="#b8bb26" # EXEC
export COLOR_12="#fabd2f" #
export COLOR_13="#83a598" # FOLDER
export COLOR_14="#d3869b" #
export COLOR_15="#8ec07c" #
export COLOR_16="#ebdbb2" #

export BACKGROUND_COLOR="#282828" # Background Color
export FOREGROUND_COLOR="#ebdbb2" # Text
export CURSOR_COLOR="$FOREGROUND_COLOR" # Cursor
export PROFILE_NAME="Gruvbox Dark"
# =============================================================== #







# =============================================================== #
# | Apply Colors
# ===============================================================|#
SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
PARENT_PATH="$(dirname "${SCRIPT_PATH}")"

# Allow developer to change url to forked url for easier testing
# IMPORTANT: Make sure you export this variable if your main shell is not bash
BASE_URL=${BASE_URL:-"https://raw.githubusercontent.com/Gogh-Co/Gogh/master"}


if [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then
bash "${PARENT_PATH}/apply-colors.sh"
else
if [[ "$(uname)" = "Darwin" ]]; then
# OSX ships with curl and ancient bash
bash -c "$(curl -so- "${BASE_URL}/apply-colors.sh")"
else
# Linux ships with wget
bash -c "$(wget -qO- "${BASE_URL}/apply-colors.sh")"
fi
fi
7 changes: 2 additions & 5 deletions macos-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ if [ ! -d "${HOME}/.tmux/plugins" ]; then
${HOME}/.tmux/plugins/tpm/bin/install_plugins
fi

echo "Change terminal color? [y/N]"
read input
if [[ $input == "Y" || $input == "y" ]]; then
TERMINAL=gnome-terminal bash -c "$(curl -sLo- https://git.io/vQgMr)"
fi
echo "Changing terminal color to gruvbox-dark"
bash ./gruvbox-dark.sh

echo "Done!"

0 comments on commit ddcc319

Please sign in to comment.