.dotfiles/zshrc

108 lines
3.3 KiB
Bash
Raw Normal View History

# source all other zsh files
2016-07-14 11:03:13 +00:00
if [ -f ~/.zsh_environment ]
then
source ~/.zsh_environment
fi
#for accounts whithout root
2016-07-14 11:03:13 +00:00
if [ -f ~/.zsh_grml ]
then
source ~/.zsh_grml
fi
#for untrusted machines
2016-07-14 11:03:13 +00:00
if [ -f ~/.zsh_sensitive ]
then
source ~/.zsh_sensitive
2015-06-21 20:27:36 +00:00
fi
2016-07-14 11:03:13 +00:00
#for accounts whithout root
if [ -f ~/.zsh_grml ]
then
source ~/.zsh_grml
fi
source ~/.zsh_functions
export EDITOR=vim
2016-03-02 16:53:58 +00:00
export SYSTEMD_EDITOR=vim
2015-06-21 20:27:36 +00:00
alias sudo='sudo '
alias tasks="ps -u fab"
2016-03-02 16:54:30 +00:00
alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
alias sml2p='/home/fab/.Sync-my-L2P/Sync-my-L2P.run'
alias ssh='ssh '
alias ping='ping '
2014-02-19 20:36:40 +00:00
alias aur-update='pacaur -Syu --devel --noconfirm'
2015-12-03 12:41:42 +00:00
alias clear-orphans='sudo pacman -Rns $(pacman -Qqdt)'
alias rmtex='rm *.log; rm *.aux'
2014-04-15 22:52:11 +00:00
alias chibernate='cinnamon-screensaver-command --lock && sudo systemctl hibernate'
alias load-vboxdrivers='modprobe -a vboxdrv vboxnetadp vboxnetflt'
alias mount-chroot='sudo mount /mnt/tmpfs; sudo mkdir /mnt/tmpfs/chroot{32,64}'
2014-12-04 22:33:16 +00:00
alias open='xdg-open'
2014-02-19 20:36:40 +00:00
# british mnemonic finder
alias mnemonic="cat /usr/share/dict/british | sed -r -n '/^.{5,10}$/p' | sed \"s/'//g\" | tr '[:upper:]' '[:lower:]' | shuf -n 1"
2014-01-17 13:01:16 +00:00
#overwrite "default(?)" with my own function
alias cdt='cdtemp'
2014-07-17 10:02:58 +00:00
alias gst='git status'
2014-07-27 16:46:17 +00:00
alias gdf='git diff'
alias gdfs='git diff --staged'
2014-07-27 16:49:38 +00:00
alias gad='git add'
alias gcm='git commit'
alias resource='source ~/.zshrc'
2016-04-03 22:41:43 +00:00
alias battery='upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "time to"'
2015-06-28 17:28:37 +00:00
alias poweroff='sudo poweroff'
alias reboot='sudo reboot'
2015-11-07 20:18:02 +00:00
alias n='ninja'
2016-04-15 08:27:12 +00:00
alias m='make'
2015-11-07 20:18:02 +00:00
alias cmake='cmake -G Ninja'
2015-12-12 13:31:26 +00:00
alias wlan='sudo netctl-auto list'
2015-12-12 17:08:43 +00:00
alias adb-connect='adb connect 192.168.1.138:5555'
2017-02-23 11:51:27 +00:00
alias sysupgrade='sudo pacmatic -Syu; cower -u'
2016-09-20 11:23:47 +00:00
alias delete-old-archives='sudo zsh -ci _delete-old-archives'
2016-09-29 08:57:16 +00:00
alias clean-paccache='sudo -s -- paccache -r; paccache -ruk0'
2017-02-23 11:51:27 +00:00
alias krypto="ssh -t azure screen -r"
2017-10-11 16:02:27 +00:00
alias prefix-create-date='exiftool -d %Y%m%d-%H%M%S_%%f.%%le "-filename<CreateDate"'
2015-11-29 22:04:37 +00:00
if test -f "$(which nvim)"
2015-11-17 11:23:53 +00:00
then
alias v='nvim'
else
alias v='vim'
fi
source ~/.zsh_functions
export EDITOR=vim
2015-06-21 20:33:49 +00:00
alias emacs='emacs -nw'
alias aiawiki='ssh aia -L 80:ldap2:80'
2016-09-20 11:23:47 +00:00
alias rbtv='livestreamer "https://www.youtube.com/watch?v=mT0TbIqBliw" &'
2015-06-28 17:27:30 +00:00
alias taketv='livestreamer twitch.tv/taketv &'
2015-06-21 20:28:43 +00:00
alias ls='ls --color=auto'
2015-05-02 11:11:06 +00:00
export ASPROOT=~/.asp
export PATH=$PATH:/home/fab/bin:/home/fab/.gem/ruby/2.3.0/bin:~/.local/bin
2015-06-21 20:33:49 +00:00
export LFS=/mnt/lfs
2014-01-27 15:37:40 +00:00
#vi mode
bindkey -v
export KEYTIMEOUT=1
2015-06-21 20:33:49 +00:00
bindkey -M viins 'fd' vi-cmd-mode
2014-01-27 16:26:31 +00:00
bindkey -M vicmd 'k' history-beginning-search-backward
bindkey -M vicmd 'j' history-beginning-search-forward
2014-01-27 15:37:40 +00:00
#backspace working after returning from command mode
bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char
2015-06-21 20:33:49 +00:00
2015-06-21 20:35:33 +00:00
if [ -f /usr/share/doc/pkgfile/command-not-found.zsh ]
then
source /usr/share/doc/pkgfile/command-not-found.zsh
fi
2015-06-21 20:33:49 +00:00
2015-06-21 20:35:33 +00:00
if [ -f /usr/bin/virtualenvwrapper_lazy.sh ]
then
# Automatically source virtualenv
2015-06-21 20:35:33 +00:00
source /usr/bin/virtualenvwrapper_lazy.sh
fi
2015-06-28 17:27:30 +00:00
if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]
then
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
# displaying current virtual env
grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f'
zstyle ':prompt:grml:left:setup' items rc virtual-env change-root user at host path vcs percent