diff --git a/gitconfig b/gitconfig index ee9fb2d..3b1a982 100644 --- a/gitconfig +++ b/gitconfig @@ -6,5 +6,6 @@ [core] editor = vim -c 'startinsert' excludesfile = ~/.globalgitignore + pager = less -F -X [push] default = simple diff --git a/globalgitignore b/globalgitignore index 1377554..3819313 100644 --- a/globalgitignore +++ b/globalgitignore @@ -1 +1,2 @@ *.swp +*.swo diff --git a/vimrc b/vimrc index 0fa9714..483413d 100644 --- a/vimrc +++ b/vimrc @@ -18,6 +18,8 @@ if exists("*vundle#begin") Plugin 'garbas/vim-snipmate' Plugin 'honza/vim-snippets' Plugin 'alfredodeza/coveragepy.vim' + Plugin 'tikhomirov/vim-glsl' + Plugin 'ntpeters/vim-better-whitespace' " All of your Plugins must be added before the following line call vundle#end() " required @@ -59,6 +61,9 @@ if argc() == 2 endif "Map on python files +au FileType python :map i +au FileType python :imap import pdb; pdb.set_trace() +"Map on python files au FileType python :map :Coveragepy show au FileType python :imap diff --git a/zsh_functions b/zsh_functions index 63dd076..bab6e2a 100644 --- a/zsh_functions +++ b/zsh_functions @@ -1,3 +1,14 @@ +sysupgrade(){ + old_kernel=$(pacman -Q linux-raspberrypi | awk '{print $2 }') + sudo pacmatic -Syu + new_kernel=$(pacman -Q linux-raspberrypi | awk '{print $2 }') + if [[ $old_kernel != $new_kernel ]] + then + sudo mkinitcpio -k "$new_kernel-ARCH" -g /boot/initrd + fi + cower -u +} + copy_img_to_usb(){ if [[ $1 = "" ]] then @@ -64,3 +75,7 @@ pacman_disowned(){ comm -23 "$fs" "$db" } + +virtual_env_prompt() { + REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) } +} diff --git a/zshrc b/zshrc index 3ab1ae5..da6a1db 100644 --- a/zshrc +++ b/zshrc @@ -1,8 +1,26 @@ +# source all other zsh files +if [ -f .zsh_environment ] +then + source ~/.zsh_environment +fi +#for accounts whithout root +if [ -f .zsh_grml ] +then + source ~/.zsh_grml +fi +#for untrusted machines +if [ -f .zsh_sensitive ] +then + source ~/.zsh_sensitive +fi +source ~/.zsh_functions +export EDITOR=vim + alias sudo='sudo ' alias tasks="ps -u fab" alias update-grub="grub-mkconfig -o /boot/grub/grub.cfg" alias sml2p='/home/fab/.Sync-my-L2P/Sync-my-L2P.run' -alias update-mirrors='sh -c "reflector -p http -l 20 --sort rate | tee /etc/pacman.d/mirrorlist"' +alias update-mirrors='sh -c "reflector -p http -l 50 --sort rate | tee /etc/pacman.d/mirrorlist"' alias ssh='ssh ' alias ping='ping ' alias aur-update='pacaur -Syu --devel --noconfirm' @@ -23,6 +41,8 @@ alias gad='git add' alias gcm='git commit' alias resource='source ~/.zshrc' alias battery='upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep "time to empty"' +alias poweroff='sudo poweroff' +alias reboot='sudo reboot' if [ -f .zsh_environment ] then source ~/.zsh_environment @@ -40,15 +60,42 @@ fi source ~/.zsh_functions export EDITOR=vim export PATH=$PATH:/home/fab/bin:/home/fab/.gem/ruby/2.1.0/bin +alias emacs='emacs -nw' +alias aiawiki='ssh aia -L 80:ldap2:80' +alias rbtv='livestreamer twitch.tv/rocketbeanstv &' +alias taketv='livestreamer twitch.tv/taketv &' +alias ls='ls --color=auto' export ASPROOT=~/.asp +export PATH=$PATH:/home/fab/bin:/home/fab/.gem/ruby/2.2.0/bin +export LFS=/mnt/lfs #vi mode bindkey -v export KEYTIMEOUT=1 - +bindkey -M viins 'fd' vi-cmd-mode bindkey -M vicmd 'k' history-beginning-search-backward bindkey -M vicmd 'j' history-beginning-search-forward #backspace working after returning from command mode bindkey '^?' backward-delete-char bindkey '^h' backward-delete-char + +if [ -f /usr/share/doc/pkgfile/command-not-found.zsh ] +then + source /usr/share/doc/pkgfile/command-not-found.zsh +fi + +if [ -f /usr/bin/virtualenvwrapper_lazy.sh ] +then + # Automatically source virtualenv + source /usr/bin/virtualenvwrapper_lazy.sh +fi + +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