[zsh/vim/irssi/...] My home files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.7KB

  1. # Created by newuser for 4.3.9
  2. autoload -U compinit
  3. compinit
  4. zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
  5. zstyle ':completion:*:warnings' format '%BNo matches found%b'
  6. zstyle ':completion:*' use-cache on
  7. zstyle ':completion:*' cache-path ~/.zsh_cache
  8. zstyle ':completion:*' menu select=2
  9. zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \
  10. /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin
  11. fpath=(~/.zsh/functions $fpath)
  12. autoload -U promptinit
  13. promptinit
  14. prompt skia
  15. autoload -U bashcompinit
  16. bashcompinit
  17. compdef _gnu_generic r2
  18. export HISTSIZE=2000
  19. export HISTFILE=$HOME/.history
  20. export SAVEHIST=$HISTSIZE
  21. setopt hist_ignore_all_dups
  22. setopt hist_ignore_space
  23. setopt autocd
  24. setopt extendedglob
  25. setopt clobber
  26. # Binkeys
  27. typeset -A key
  28. bindkey "^R" history-incremental-search-backward
  29. bindkey "^[OH" beginning-of-line
  30. bindkey "^[[H" beginning-of-line
  31. bindkey "^[OF" end-of-line
  32. bindkey "^[[F" end-of-line
  33. bindkey "^[[1~" beginning-of-line
  34. bindkey "^[[4~" end-of-line
  35. bindkey "^[[2~" beep
  36. bindkey "^[[3~" delete-char
  37. bindkey "^[[5~" up-line-or-history
  38. bindkey "^[[6~" down-line-or-history
  39. bindkey "b" backward-word
  40. export SSH_AUTH_SOCK="/run/user/$(id -u)/gnupg/S.gpg-agent.ssh"
  41. if ! [ -S "$SSH_AUTH_SOCK" ]; then
  42. gpg-agent --enable-ssh-support --daemon
  43. fi
  44. case $TERM in
  45. xterm*)
  46. precmd () {print -Pn "\e]0;%n@%m: %~\a"}
  47. ;;
  48. esac
  49. export SDL_NOMOUSE=1
  50. # Set title to GNU screen/byobu tab
  51. settitle() {
  52. if [ "$TERM" = "screen" ];
  53. then
  54. printf "\033k$1\033\\";
  55. fi
  56. }
  57. # Set title when sshing within a tab to some host
  58. ssh() {
  59. host=$(echo "$*" | sed "s/^.\+@\([^ ]\+\)[ \n]*.*/\1/")
  60. settitle $host
  61. command ssh "$@"
  62. settitle $(hostname)
  63. }
  64. source ~/.aliases