Compare commits

...

2 Commits

Author SHA1 Message Date
dbadcc3b6c zsh: enable colors in listings, enable gcloud 2023-04-04 14:15:59 +03:00
Ismo Vuorinen
4f2fd3cfd6 Merge 2023-04-03 11:15:08 +03:00
3 changed files with 25 additions and 7 deletions

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env bash
# shellcheck shell=bash # shellcheck shell=bash
# Explicitly set XDG folders # Explicitly set XDG folders
@@ -35,6 +36,13 @@ hash shopt 2> /dev/null && shopt -s checkwinsize
export LC_ALL=fi_FI.utf8 export LC_ALL=fi_FI.utf8
# If we are using zsh, color our dir lists and such
if [ $SHELL = $(which zsh) ]; then
LS_COLORS='no=00;37:fi=00:di=00;33:ln=04;36:pi=40;33:so=01;35:bd=40;33;01:'
export LS_COLORS
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
fi
# Antigen configuration # Antigen configuration
# https://github.com/zsh-users/antigen/wiki/Configuration # https://github.com/zsh-users/antigen/wiki/Configuration
export ADOTDIR="$XDG_DATA_HOME/antigen" export ADOTDIR="$XDG_DATA_HOME/antigen"
@@ -131,13 +139,14 @@ if hash ansible 2> /dev/null; then
fi fi
# gcloud is present # gcloud is present
#if hash gcloud 2>/dev/null; then if hash gcloud 2>/dev/null; then
# GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet) GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
# [[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc" [[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
# [[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc" [[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
#fi fi
# Load iterm2 shell integration # Load iterm2 shell integration
# https://iterm2.com/documentation-shell-integration.html # https://iterm2.com/documentation-shell-integration.html
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] \ [[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] \
&& source "$XDG_BIN_HOME/iterm2_shell_integration.zsh" && source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"

View File

@@ -91,3 +91,4 @@ function x-default-antigen-bundles
hash python 2> /dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv hash python 2> /dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
hash rvm 2> /dev/null && antigen bundle unixorn/rvm-plugin hash rvm 2> /dev/null && antigen bundle unixorn/rvm-plugin
} }

View File

@@ -29,6 +29,7 @@ function section_install
$0 install starship $0 install starship
$0 brew install $0 brew install
$0 install composer $0 install composer
$0 install dotenv-linter
$0 install nvm $0 install nvm
$0 install npm $0 install npm
$0 install ntfy $0 install ntfy
@@ -42,6 +43,12 @@ function section_install
bash "$DOTFILES/scripts/install-composer.sh" \ bash "$DOTFILES/scripts/install-composer.sh" \
&& msg_done "🎉 composer installed!" && msg_done "🎉 composer installed!"
;; ;;
dotenv-linter)
curl -sSfL \
https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh \
| sh -s -- -b "$XDG_BIN_HOME" \
&& msg_done "🎉 dotenv-linter installed!"
;;
starship) starship)
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir ~/.local/bin \ curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir ~/.local/bin \
&& msg_done "🎉 starship installed!" && msg_done "🎉 starship installed!"
@@ -69,10 +76,11 @@ function section_install
&& msg_done "🎉 Z has been installed!" && msg_done "🎉 Z has been installed!"
;; ;;
*) *)
menu_section "$USAGE_PREFIX" "all | antigen | composer | starship | macos | nvm | npm" menu_section "$USAGE_PREFIX" "all | antigen | composer | dotenv-linter | starship | macos | nvm | npm"
menu_item "all" "Installs macos defaults, antigen, starship, brew, nvm and npm packages" menu_item "all" "Installs macos defaults, antigen, starship, brew, nvm, npm packages and others"
menu_item "antigen" "Updates the antigen.zsh file" menu_item "antigen" "Updates the antigen.zsh file"
menu_item "composer" "Install composer" menu_item "composer" "Install composer"
menu_item "dotenv-linter" "Install dotenv-linter"
menu_item "starship" "Install starship.rs" menu_item "starship" "Install starship.rs"
menu_item "macos" "Setup nice macOS defaults" menu_item "macos" "Setup nice macOS defaults"
menu_item "nvm" "Install Node Version Manager (nvm)" menu_item "nvm" "Install Node Version Manager (nvm)"