Make config less scattered

This commit is contained in:
Leon Grünewald 2024-02-15 13:10:06 +01:00
parent 2c953705f6
commit da9c2eb765
4 changed files with 27 additions and 38 deletions

View file

@ -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

View file

@ -1,6 +1,5 @@
source ~/.zcustom/packages.zsh
source ~/.zcustom/p9k.zsh
source ~/.zcustom/env.zsh
source ~/.zcustom/alias.zsh
source ~/.zcustom/motd.zsh
@ -12,5 +11,3 @@ if ! zplug check --verbose; then
fi
zplug load --verbose
source ~/.zcustom/opts.zsh

View file

@ -1 +0,0 @@
setopt extendedglob

View file

@ -1,12 +1,26 @@
# Use Oh My Zsh
setopt extendedglob
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
source ~/.zplug/init.zsh
if [ -n "$(command -v clang)" ]; then
export CC=clang
else
export CC=gcc
fi
# Use custom config
source ~/.zcustom/init.zsh
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
# pnpm
export PNPM_HOME="/home/dhalucario/.local/share/pnpm"
@ -14,4 +28,10 @@ case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
# pnpm end
source $ZSH/oh-my-zsh.sh
source ~/.zplug/init.zsh
source ~/.zcustom/init.zsh
eval "$(zoxide init zsh)"