zshrc/linux.zsh

52 lines
1.6 KiB
Bash
Raw Normal View History

2012-09-04 09:28:14 +02:00
# if we have a screen, we can try a colored screen
if [[ "$TERM" == "screen" ]]; then
export TERM="screen-256color"
fi
2011-04-11 22:47:38 +02:00
# activate ls colors, (private if possible)
export ZSH_DIRCOLORS="$ZSH_CONFIG/dircolors-solarized/dircolors.256dark"
if [[ -a $ZSH_DIRCOLORS ]]; then
2011-04-11 22:47:38 +02:00
if [[ "$TERM" == *256* ]]; then
which dircolors > /dev/null && eval "`dircolors -b $ZSH_DIRCOLORS 2>/dev/null`"
2011-04-11 22:47:38 +02:00
else
# standard colors for non-256-color terms
which dircolors > /dev/null && eval "`dircolors -b`"
fi
else
which dircolors > /dev/null && eval "`dircolors -b`"
fi
2012-05-01 10:18:08 +02:00
alias up=" nmcli con up id"
alias down=" nmcli con down id"
LSB_DISTRIBUTOR=`lsb_release -i -s`
2012-04-16 23:05:19 +02:00
# debian and ubuntu specific aliases
2011-04-12 19:45:36 +02:00
## autocomplete-able apt-xxx aliases
2012-05-01 10:18:08 +02:00
if [[ "$LSB_DISTRIBUTOR" == "Ubuntu" ]]; then
alias acs='apt-cache show'
alias agi='sudo apt-get install'
alias ag='sudo apt-get'
alias agu='sudo apt-get update'
alias agug='sudo apt-get upgrade'
alias aguu='agu && agug'
alias agr='sudo apt-get uninstall'
alias agp='sudo apt-get purge'
alias aga='sudo apt-get autoremove'
alias ctl='sudo service '
alias feierabend='sudo shutdown -h now'
fi
# arch linux with systemd aliases
if [[ "$LSB_DISTRIBUTOR" == "archlinux" ]]; then
# statements
alias ctl='sudo systemctl '
2012-07-16 21:58:53 +02:00
alias feierabend='sudo systemctl start poweroff.target'
2012-05-01 10:18:08 +02:00
alias start=" sudo systemctl start"
alias stop=" sudo systemctl stop"
alias status=" sudo systemctl status"
alias restart=" sudo systemctl restart"
alias reboot="sudo systemctl start reboot.target"
fi
2012-04-16 23:05:19 +02:00