Make config less scattered
This commit is contained in:
parent
2c953705f6
commit
da9c2eb765
4 changed files with 27 additions and 38 deletions
|
@ -1,27 +0,0 @@
|
||||||
export EDITOR="vim"
|
|
||||||
|
|
||||||
if [ $(uname -s) = "Darwin" ]; then
|
|
||||||
export MAKEOPTS="-j$(sysctl -n hw.ncpu)"
|
|
||||||
export PATH="/usr/local/opt/php@7.4/bin:$PATH"
|
|
||||||
else
|
|
||||||
export MAKEOPTS="-j$(cat /proc/cpuinfo | awk -F: '$1 ~ /cpu cores/ { print $2 }' | head -n 1 | tr -d ' ')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export CFLAGS="-march=native -O2"
|
|
||||||
export CXXFLAGS="$CFLAGS"
|
|
||||||
|
|
||||||
if [ -n "$(command -v clang)" ]; then
|
|
||||||
export CC=clang
|
|
||||||
else
|
|
||||||
export CC=gcc
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$(command -v clang++)" ]; then
|
|
||||||
export CXX=clang++
|
|
||||||
else
|
|
||||||
export CXX=g++
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$(command -v ruby)" ] && [ -n "$(command -v gem)" ]; then
|
|
||||||
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
|
|
||||||
fi
|
|
|
@ -1,6 +1,5 @@
|
||||||
source ~/.zcustom/packages.zsh
|
source ~/.zcustom/packages.zsh
|
||||||
source ~/.zcustom/p9k.zsh
|
source ~/.zcustom/p9k.zsh
|
||||||
source ~/.zcustom/env.zsh
|
|
||||||
source ~/.zcustom/alias.zsh
|
source ~/.zcustom/alias.zsh
|
||||||
source ~/.zcustom/motd.zsh
|
source ~/.zcustom/motd.zsh
|
||||||
|
|
||||||
|
@ -12,5 +11,3 @@ if ! zplug check --verbose; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
zplug load --verbose
|
zplug load --verbose
|
||||||
|
|
||||||
source ~/.zcustom/opts.zsh
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
setopt extendedglob
|
|
34
shell/.zshrc
34
shell/.zshrc
|
@ -1,12 +1,26 @@
|
||||||
# Use Oh My Zsh
|
setopt extendedglob
|
||||||
|
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
source $ZSH/oh-my-zsh.sh
|
export EDITOR="vim"
|
||||||
|
export CFLAGS="-march=native -O2"
|
||||||
|
export CXXFLAGS="$CFLAGS"
|
||||||
|
export MAKEOPTS="-j$(cat /proc/cpuinfo | awk -F: '$1 ~ /cpu cores/ { print $2 }' | head -n 1 | tr -d ' ')"
|
||||||
|
|
||||||
# Use zplug
|
if [ -n "$(command -v clang)" ]; then
|
||||||
source ~/.zplug/init.zsh
|
export CC=clang
|
||||||
|
else
|
||||||
|
export CC=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
# Use custom config
|
if [ -n "$(command -v clang++)" ]; then
|
||||||
source ~/.zcustom/init.zsh
|
export CXX=clang++
|
||||||
|
else
|
||||||
|
export CXX=g++
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$(command -v ruby)" ] && [ -n "$(command -v gem)" ]; then
|
||||||
|
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
# pnpm
|
# pnpm
|
||||||
export PNPM_HOME="/home/dhalucario/.local/share/pnpm"
|
export PNPM_HOME="/home/dhalucario/.local/share/pnpm"
|
||||||
|
@ -14,4 +28,10 @@ case ":$PATH:" in
|
||||||
*":$PNPM_HOME:"*) ;;
|
*":$PNPM_HOME:"*) ;;
|
||||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||||
esac
|
esac
|
||||||
# pnpm end
|
# pnpm end
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
source ~/.zplug/init.zsh
|
||||||
|
source ~/.zcustom/init.zsh
|
||||||
|
|
||||||
|
eval "$(zoxide init zsh)"
|
||||||
|
|
Loading…
Reference in a new issue