Gnu Guix Rice (ofc with stow)
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.

67 lines
1.4 KiB

3 years ago
3 years ago
3 years ago
3 years ago
  1. # Bash initialization for interactive non-login shells and
  2. # for remote shells (info "(bash) Bash Startup Files").
  3. # Export 'SHELL' to child processes. Programs such as 'screen'
  4. # honor it and otherwise use /bin/sh.
  5. export SHELL
  6. if [[ $- != *i* ]]
  7. then
  8. # We are being invoked from a non-interactive shell. If this
  9. # is an SSH session (as in "ssh host command"), source
  10. # /etc/profile so we get PATH and other essential variables.
  11. [[ -n "$SSH_CLIENT" ]] && source /etc/profile
  12. # Don't do anything else.
  13. return
  14. fi
  15. # Source the system-wide file.
  16. source /etc/bashrc
  17. # Adjust the prompt depending on whether we're in 'guix environment'.
  18. if [ -n "$GUIX_ENVIRONMENT" ]
  19. then
  20. PS1='\u@\h \w [env]\$ '
  21. else
  22. PS1='\u@\h \w\$ '
  23. fi
  24. alias ls='ls -p --color=auto'
  25. alias ll='ls -l'
  26. alias grep='grep --color=auto'
  27. alias s='ls'
  28. alias v='nvim'
  29. alias c='clear'
  30. alias e='exit'
  31. alias gp='git push'
  32. alias gac='git add . && git commit'
  33. alias g='git'
  34. alias sb='source ~/.bashrc'
  35. alias vb='nvim ~/.bashrc'
  36. alias r='ranger'
  37. timeout 5s pfetch
  38. export TERM=alacritty
  39. export VISUAL=nvim
  40. set -o vi
  41. NORMAL="\[\e[0m\]"
  42. RED="\[\e[31;1m\]"
  43. GREEN="\[\e[32;1m\]"
  44. YELLOW="\[\e[33;1m\]"
  45. BLUE="\[\e[34;1m\]"
  46. PURPLE="\[\e[35m\]"
  47. NEWLINE="\n"
  48. parse_git_branch() {
  49. git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
  50. }
  51. init_ps1() {
  52. PS1="$RED[$YELLOW\u$GREEN@$BLUE\h $PURPLE\W$GREEN`parse_git_branch` $RED]$YELLOW\$$NORMAL "
  53. }
  54. export PROMPT_COMMAND=init_ps1