Advertisement
Guest User

Test bashrc

a guest
Mar 22nd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. # Import colorscheme from 'wal' asynchronously
  2. # & # Run the process in the background.
  3. # ( ) # Hide shell job control messages.
  4. (cat ~/.cache/wal/sequences &)
  5.  
  6. # Alternative (blocks terminal for 0-u3ms)
  7. cat ~/.cache/wal/sequences
  8.  
  9. # To add support for TTYs this line can be optionally added.
  10. source ~/.cache/wal/colors-tty.sh
  11.  
  12. # ~/.bashrc: executed by bash(1) for non-login shells.
  13. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  14. # for examples
  15.  
  16. # If not running interactively, don't do anything
  17. case $- in
  18. *i*) ;;
  19. *) return;;
  20. esac
  21.  
  22. # don't put duplicate lines or lines starting with space in the history.
  23. # See bash(1) for more options
  24. HISTCONTROL=ignoreboth
  25.  
  26. # append to the history file, don't overwrite it
  27. shopt -s histappend
  28.  
  29. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  30. HISTSIZE=1000
  31. HISTFILESIZE=2000
  32.  
  33. # check the window size after each command and, if necessary,
  34. # update the values of LINES and COLUMNS.
  35. shopt -s checkwinsize
  36.  
  37. # If set, the pattern "**" used in a pathname expansion context will
  38. # match all files and zero or more directories and subdirectories.
  39. #shopt -s globstar
  40.  
  41. # make less more friendly for non-text input files, see lesspipe(1)
  42. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  43.  
  44. # set variable identifying the chroot you work in (used in the prompt below)
  45. if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
  46. debian_chroot=$(cat /etc/debian_chroot)
  47. fi
  48.  
  49. # set a fancy prompt (non-color, unless we know we "want" color)
  50. case "$TERM" in
  51. xterm-color|*-256color) color_prompt=yes;;
  52. esac
  53.  
  54. # uncomment for a colored prompt, if the terminal has the capability; turned
  55. # off by default to not distract the user: the focus in a terminal window
  56. # should be on the output of commands, not on the prompt
  57. #force_color_prompt=yes
  58.  
  59. if [ -n "$force_color_prompt" ]; then
  60. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  61. # We have color support; assume it's compliant with Ecma-48
  62. # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  63. # a case would tend to support setf rather than setaf.)
  64. color_prompt=yes
  65. else
  66. color_prompt=
  67. fi
  68. fi
  69.  
  70. if [ "$color_prompt" = yes ]; then
  71. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  72. else
  73. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  74. fi
  75. unset color_prompt force_color_prompt
  76.  
  77. # If this is an xterm set the title to user@host:dir
  78. case "$TERM" in
  79. xterm*|rxvt*)
  80. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  81. ;;
  82. *)
  83. ;;
  84. esac
  85.  
  86. # enable color support of ls and also add handy aliases
  87. if [ -x /usr/bin/dircolors ]; then
  88. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  89. alias ls='ls --color=auto'
  90. #alias dir='dir --color=auto'
  91. #alias vdir='vdir --color=auto'
  92.  
  93. alias grep='grep --color=auto'
  94. alias fgrep='fgrep --color=auto'
  95. alias egrep='egrep --color=auto'
  96. fi
  97.  
  98. # colored GCC warnings and errors
  99. #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
  100.  
  101. # some more ls aliases
  102. alias ll='ls -alF'
  103. alias la='ls -A'
  104. alias l='ls -CF'
  105.  
  106. # Add an "alert" alias for long running commands. Use like so:
  107. # sleep 10; alert
  108. 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$//'\'')"'
  109.  
  110. # Alias definitions.
  111. # You may want to put all your additions into a separate file like
  112. # ~/.bash_aliases, instead of adding them here directly.
  113. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
  114.  
  115. if [ -f ~/.bash_aliases ]; then
  116. . ~/.bash_aliases
  117. fi
  118.  
  119.  
  120. # enable programmable completion features (you don't need to enable
  121. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  122. # sources /etc/bash.bashrc).
  123. if ! shopt -oq posix; then
  124. if [ -f /usr/share/bash-completion/bash_completion ]; then
  125. . /usr/share/bash-completion/bash_completion
  126. elif [ -f /etc/bash_completion ]; then
  127. . /etc/bash_completion
  128. fi
  129. fi
  130. c
  131. c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement