.profile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # ~/.bashrc: executed by bash(1) for non-login shells.
  2. # Note: PS1 and umask are already set in /etc/profile. You should not
  3. # need this unless you want different defaults for root.
  4. # PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
  5. # umask 022
  6. # You may uncomment the following lines if you want `ls' to be colorized:
  7. export TERM=xterm
  8. export LS_OPTIONS='--color=auto'
  9. #eval "`dircolors`"
  10. alias ls='ls $LS_OPTIONS'
  11. alias ll='ls $LS_OPTIONS -l'
  12. alias l='ls $LS_OPTIONS -lA'
  13. #
  14. # Some more alias to avoid making mistakes:
  15. # alias rm='rm -i'
  16. # alias cp='cp -i'
  17. # alias mv='mv -i'
  18. # Resize the console to the terminal dimensions
  19. resize() {
  20. if [[ -t 0 && $# -eq 0 ]]; then
  21. local IFS='[;' escape geometry x y
  22. echo -ne '\e7\e[r\e[999;999H\e[6n\e8'
  23. read -sd R escape geometry
  24. x=${geometry##*;} y=${geometry%%;*}
  25. if [[ ${COLUMNS} -eq ${x} && ${LINES} -eq ${y} ]]; then
  26. echo "${TERM} ${x}x${y}"
  27. else
  28. echo "${COLUMNS}x${LINES} -> ${x}x${y}"
  29. stty cols ${x} rows ${y}
  30. fi
  31. else
  32. print 'Usage: resize'
  33. fi
  34. }
  35. # Reset saved brightness
  36. echo "Reset saved brightness"
  37. brightness_set $(brightness_get) >/dev/null 2>&1