added .bashrc
This commit is contained in:
parent
830d8f02f9
commit
c01d9b7638
1 changed files with 104 additions and 0 deletions
104
.bashrc
Normal file
104
.bashrc
Normal file
|
|
@ -0,0 +1,104 @@
|
||||||
|
#
|
||||||
|
# ~/.bashrc
|
||||||
|
#
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
export EDITOR="nvim"
|
||||||
|
export VISUAL="nvim"
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
|
||||||
|
export PATH=$PATH:$JAVA_HOME/bin
|
||||||
|
export HADOOP_HOME=/opt/hadoop
|
||||||
|
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
|
||||||
|
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
|
||||||
|
|
||||||
|
# android developpement
|
||||||
|
export ANDROID_SDK_ROOT='/opt/android-sdk'
|
||||||
|
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools/
|
||||||
|
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin/
|
||||||
|
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
|
||||||
|
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/
|
||||||
|
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
PS1='[\u@\h \W]\$ '
|
||||||
|
|
||||||
|
alias olagem='sudo /root/.cargo/bin/olagem'
|
||||||
|
alias zz="history | fzf | sed 's/^[ \t]*[0-9]*[ \t]*//' | bash"
|
||||||
|
alias update='sudo pacman -Syu'
|
||||||
|
alias flush="sudo rm -rf ~/.local/share/Trash"
|
||||||
|
alias tp='trash-put'
|
||||||
|
alias power='upower -i /org/freedesktop/UPower/devices/battery_BAT0'
|
||||||
|
alias space='df -h /'
|
||||||
|
alias cache='sudo pacman -Scc && docker system prune -a --volumes && flush'
|
||||||
|
alias die='shutdown -h now'
|
||||||
|
alias protu='ls -la -h'
|
||||||
|
alias ll='ls -a'
|
||||||
|
alias lg='lazygit'
|
||||||
|
alias cl='clear'
|
||||||
|
alias pac='sudo pacman -Syu'
|
||||||
|
alias nv='nvim'
|
||||||
|
alias bim='sudo nvim'
|
||||||
|
alias sc='syncthing --browser-only'
|
||||||
|
alias gp='sudo -E gparted'
|
||||||
|
ff() {
|
||||||
|
firefox "$@" &
|
||||||
|
}
|
||||||
|
function search {
|
||||||
|
if [ $# -ne 2 ]; then
|
||||||
|
folder="."
|
||||||
|
wanted="$1"
|
||||||
|
else
|
||||||
|
folder="$1"
|
||||||
|
wanted="$2"
|
||||||
|
fi
|
||||||
|
sudo find "$folder" -name "$wanted" 2>/dev/null
|
||||||
|
}
|
||||||
|
alias search='search'
|
||||||
|
alias where='sudo find / -name 2>/dev/null'
|
||||||
|
alias t='tree -d'
|
||||||
|
setGithub() {
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
echo "Usage: setGithub <git-url>"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local newurl="$1"
|
||||||
|
|
||||||
|
if ! git rev-parse --show-toplevel >/dev/null 2>&1; then
|
||||||
|
echo "Not a git repository (or no .git found in this directory or parents)."
|
||||||
|
return 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
if git remote set-url origin "$newurl"; then
|
||||||
|
echo "Updated origin to: $newurl"
|
||||||
|
git remote -v
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "Failed to update remote origin"
|
||||||
|
return 4
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Generated for envman. Do not edit.
|
||||||
|
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
|
||||||
|
alias setUser='git config --global credential.helper store'
|
||||||
|
|
||||||
|
export NVM_DIR="$HOME/.nvm"
|
||||||
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
|
||||||
|
|
||||||
|
# Load Angular CLI autocompletion.
|
||||||
|
source <(ng completion script)
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
|
||||||
|
|
||||||
|
# BEGIN opam configuration
|
||||||
|
# This is useful if you're using opam as it adds:
|
||||||
|
# - the correct directories to the PATH
|
||||||
|
# - auto-completion for the opam binary
|
||||||
|
# This section can be safely removed at any time if needed.
|
||||||
|
test -r '/home/pluto/.opam/opam-init/init.sh' && . '/home/pluto/.opam/opam-init/init.sh' > /dev/null 2> /dev/null || true
|
||||||
|
# END opam configuration
|
||||||
Loading…
Reference in a new issue