.bashrc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. case $- in
  2. *i*) ;;
  3. *) return;;
  4. esac
  5. HISTCONTROL=ignoreboth
  6. shopt -s histappend
  7. HISTSIZE=1000
  8. HISTFILESIZE=2000
  9. shopt -s checkwinsize
  10. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  11. if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
  12. debian_chroot=$(cat /etc/debian_chroot)
  13. fi
  14. case "$TERM" in
  15. xterm-color|*-256color) color_prompt=yes;;
  16. esac
  17. if [ -n "$force_color_prompt" ]; then
  18. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  19. color_prompt=yes
  20. else
  21. color_prompt=
  22. fi
  23. fi
  24. if [ "$color_prompt" = yes ]; then
  25. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  26. else
  27. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  28. fi
  29. unset color_prompt force_color_prompt
  30. case "$TERM" in
  31. xterm*|rxvt*)
  32. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  33. ;;
  34. *)
  35. ;;
  36. esac
  37. if [ -x /usr/bin/dircolors ]; then
  38. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  39. alias ls='ls --color=auto'
  40. alias grep='grep --color=auto'
  41. alias fgrep='fgrep --color=auto'
  42. alias egrep='egrep --color=auto'
  43. fi
  44. export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
  45. alias ll='ls -alF'
  46. alias la='ls -A'
  47. alias l='ls -CF'
  48. alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
  49. if [ -f ~/.bash_aliases ]; then
  50. . ~/.bash_aliases
  51. fi
  52. if ! shopt -oq posix; then
  53. if [ -f /usr/share/bash-completion/bash_completion ]; then
  54. . /usr/share/bash-completion/bash_completion
  55. elif [ -f /etc/bash_completion ]; then
  56. . /etc/bash_completion
  57. fi
  58. fi
  59. ######################
  60. # Own configurations #
  61. ######################
  62. alias lynxp="proxychains4 lynx"
  63. alias lynxd="lynxp duckduckgo.com"
  64. alias emacs="emacs -nw"
  65. alias ga="git add ."
  66. alias gc="git commit -m"
  67. alias gao="git remote add origin"
  68. alias gp="git push -u origin"
  69. alias gdiff="git diff"
  70. alias ins="sudo apt install"
  71. alias upd="sudo apt update"
  72. alias upg="upd && sudo apt upgrade"
  73. alias rem="sudo apt remove"
  74. alias searx="apt search"
  75. alias dog="cat"
  76. alias tor="/home/$(whoami)/Software/tor/Browser/start-tor-browser --detach"
  77. alias blender="/home/$(whoami)/Software/blender/blender"
  78. alias godot="/home/$(whoami)/Software/Godot/Godot.64"