Use distro specific aliases

This commit is contained in:
LordMathis 2023-02-04 20:58:06 +01:00
parent 40af373639
commit 6b7228e0bc
5 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,5 @@
alias mkdir='mkdir -p' alias mkdir='mkdir -p'
alias cat='bat'
alias vim='nvim' alias vim='nvim'
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
@ -10,8 +9,6 @@ alias dops='docker ps -a'
alias doe='docker exec' alias doe='docker exec'
alias dol='docker logs -f' alias dol='docker logs -f'
alias update='sudo apt-get update && sudo apt-get upgrade'
alias sudo='sudo ' alias sudo='sudo '
open () { open () {

3
.aliases_arch Normal file
View File

@ -0,0 +1,3 @@
alias cat='bat'
alias update='yay -Syu'

2
.aliases_ubuntu Normal file
View File

@ -0,0 +1,2 @@
alias cat='batcat'
alias update='sudo apt-get update && sudo apt-get upgrade'

View File

@ -1,2 +0,0 @@
set selectmode=cmd
set mouse-=a

8
.zshrc
View File

@ -23,6 +23,14 @@ if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
source /etc/profile.d/vte.sh source /etc/profile.d/vte.sh
fi fi
# Distro specific aliases
DISTRO=`cat /etc/os-release | grep ^ID= | cut -f2 -d'='`
if [ "$DISTRO" = 'arch' ]; then
source .aliases_arch
else
source .aliases_ubuntu
fi
# Conda # Conda
__conda_setup="$('/home/matus/bin/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" __conda_setup="$('/home/matus/bin/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then