mirror of
https://github.com/GRFreire/dotfiles.git
synced 2026-01-10 04:19:38 +00:00
clean up zshrc and create ~/.profile for exports
This commit is contained in:
parent
cc3e249d3a
commit
8e5ab44410
50
.profile
Normal file
50
.profile
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# ____ ____ _____ _
|
||||||
|
# / ___| _ \| ___| __ ___(_)_ __ ___
|
||||||
|
# | | _| |_) | |_ | '__/ _ \ | '__/ _ \ Guilherme Rugai Freire
|
||||||
|
# | |_| | _ <| _|| | | __/ | | | __/ https://grfreire.com
|
||||||
|
# \____|_| \_\_| |_| \___|_|_| \___| https://github.com/GRFreire
|
||||||
|
#
|
||||||
|
|
||||||
|
### Default programs ###
|
||||||
|
export EDITOR="nvim"
|
||||||
|
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||||
|
export TERMINAL="alacritty"
|
||||||
|
export BROWSER="firefox"
|
||||||
|
|
||||||
|
### PATH exports ###
|
||||||
|
# $1 = path to export
|
||||||
|
try_export_path() {
|
||||||
|
if [ -d "$1" ] ;
|
||||||
|
then export PATH="$1:$PATH"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
try_export_path $HOME/.bin
|
||||||
|
|
||||||
|
try_export_path $HOME/.local/bin
|
||||||
|
|
||||||
|
try_export_path $HOME/.yarn/bin
|
||||||
|
|
||||||
|
try_export_path $HOME/.cargo/bin
|
||||||
|
|
||||||
|
# Android Studio
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
|
||||||
|
export ANDROID_HOME=$HOME/Android/Sdk
|
||||||
|
export PATH=$PATH:$ANDROID_HOME/emulator
|
||||||
|
export PATH=$PATH:$ANDROID_HOME/tools
|
||||||
|
export PATH=$PATH:$ANDROID_HOME/tools/bin
|
||||||
|
export PATH=$PATH:$ANDROID_HOME/platform-tools
|
||||||
|
export PATH=$PATH:~/android-studio/bin
|
||||||
|
|
||||||
|
# SPICETIFY (SPOTIFY)
|
||||||
|
export SPICETIFY_INSTALL="$HOME/spicetify-cli"
|
||||||
|
export PATH="$SPICETIFY_INSTALL:$PATH"
|
||||||
|
|
||||||
|
# Use custom mono path (C#)
|
||||||
|
export FrameworkPathOverride=/etc/mono/4.5
|
||||||
|
|
||||||
|
# Path for cuda
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/cuda/lib64
|
||||||
|
|
||||||
40
.zshrc
40
.zshrc
@ -5,6 +5,7 @@
|
|||||||
# \____|_| \_\_| |_| \___|_|_| \___| https://github.com/GRFreire
|
# \____|_| \_\_| |_| \___|_|_| \___| https://github.com/GRFreire
|
||||||
#
|
#
|
||||||
|
|
||||||
|
source ~/.profile
|
||||||
|
|
||||||
# Themes
|
# Themes
|
||||||
ZSH_THEME="robbyrussell"
|
ZSH_THEME="robbyrussell"
|
||||||
@ -24,23 +25,8 @@ zinit light zsh-users/zsh-autosuggestions
|
|||||||
zinit light zsh-users/zsh-completions
|
zinit light zsh-users/zsh-completions
|
||||||
### zinit plugins - end
|
### zinit plugins - end
|
||||||
|
|
||||||
# $1 = path to export
|
|
||||||
try_export_path() {
|
|
||||||
if [ -d "$1" ] ;
|
|
||||||
then export PATH="$1:$PATH"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
try_export_path $HOME/.bin
|
|
||||||
|
|
||||||
try_export_path $HOME/.local/bin
|
|
||||||
|
|
||||||
try_export_path $HOME/.yarn/bin
|
|
||||||
|
|
||||||
try_export_path $HOME/.cargo/bin
|
|
||||||
|
|
||||||
# Alias config to manage dotfiles with git
|
# Alias config to manage dotfiles with git
|
||||||
alias config="git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME"
|
alias config="git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME"
|
||||||
|
|
||||||
# Alias for python3
|
# Alias for python3
|
||||||
alias python="python3"
|
alias python="python3"
|
||||||
@ -58,33 +44,11 @@ alias vim="nvim"
|
|||||||
# Fix zathura window swallowing
|
# Fix zathura window swallowing
|
||||||
alias zathura="devour zathura"
|
alias zathura="devour zathura"
|
||||||
|
|
||||||
export EDITOR=nvim
|
|
||||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
|
||||||
|
|
||||||
# This loads nvm
|
# This loads nvm
|
||||||
export PATH="$HOME/.nvm/versions/node/$(/bin/cat $HOME/.nvm/alias/default)/bin:$PATH"
|
export PATH="$HOME/.nvm/versions/node/$(/bin/cat $HOME/.nvm/alias/default)/bin:$PATH"
|
||||||
nvm() {
|
nvm() {
|
||||||
source $HOME/.nvm/nvm.sh; nvm "$@"
|
source $HOME/.nvm/nvm.sh; nvm "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Android Studio
|
|
||||||
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
|
|
||||||
export ANDROID_HOME=$HOME/Android/Sdk
|
|
||||||
export PATH=$PATH:$ANDROID_HOME/emulator
|
|
||||||
export PATH=$PATH:$ANDROID_HOME/tools
|
|
||||||
export PATH=$PATH:$ANDROID_HOME/tools/bin
|
|
||||||
export PATH=$PATH:$ANDROID_HOME/platform-tools
|
|
||||||
export PATH=$PATH:~/android-studio/bin
|
|
||||||
|
|
||||||
# SPICETIFY (SPOTIFY)
|
|
||||||
export SPICETIFY_INSTALL="$HOME/spicetify-cli"
|
|
||||||
export PATH="$SPICETIFY_INSTALL:$PATH"
|
|
||||||
|
|
||||||
# Use custom mono path (C#)
|
|
||||||
export FrameworkPathOverride=/etc/mono/4.5
|
|
||||||
|
|
||||||
# Path for cuda
|
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/cuda/lib64
|
|
||||||
|
|
||||||
# Run color-scripts https://github.com/GRFreire/shell-color-scripts
|
# Run color-scripts https://github.com/GRFreire/shell-color-scripts
|
||||||
colorscript random
|
colorscript random
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user