.bashrc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # .bashrc
  2. ## Icons in terminal
  3. source ~/.local/share/icons-in-terminal/icons_bash.sh
  4. ## FZF Support
  5. source /usr/share/fzf/completion.bash
  6. source /usr/share/fzf/key-bindings.bash
  7. ## Add pass update completions
  8. source /usr/share/bash-completion/completions/pass-update
  9. ## Acitivatre vi-mode with <Escape>
  10. set -o vi
  11. ## If not running interactively, don't do anything
  12. [[ $- != *i* ]] && return
  13. alias sudo='doas'
  14. alias g='git'
  15. alias ls='eza'
  16. alias la='eza -lag'
  17. alias ll='eza -lg'
  18. alias xi='doas xbps-install'
  19. alias xq='xbps-query'
  20. alias xr='doas xbps-remove'
  21. alias yv='pipe-viewer --api=auto'
  22. alias cp='cp -v'
  23. alias mv='mv -v'
  24. alias rm='rm -iv'
  25. alias v='nvim'
  26. alias vl='NVIM_APPNAME=nvim-lazyvim nvim'
  27. alias L='ls -la'
  28. alias nnn='nnn -eU'
  29. alias cl='clear'
  30. alias grep='grep --color'
  31. alias mbsync="mbsync -c $MBSYNCRC"
  32. alias i="doas xbps-install -S"
  33. alias u="i; doas xbps-install -u xbps; doas xbps-install -u"
  34. alias q="xbps-query -Rs"
  35. alias r="doas xbps-remove -R"
  36. alias tmate='tmate -a ~/.ssh/authorized_keys -f ~/.config/tmate/tmate.conf new-session -s TMATE'
  37. # alias cp='/usr/local/bin/cpg -gv'
  38. # alias mv='/usr/local/bin/mvg -gv'
  39. function cdf() {
  40. cd "$(find . -type d | fzf)" || exit
  41. }
  42. function vif() {
  43. vim "$(find . -type f | fzf)" || exit
  44. }
  45. _BLACK=$(tput bold)$(tput setaf 0)
  46. _RED=$(tput bold)$(tput setaf 1)
  47. _GREEN=$(tput bold)$(tput setaf 2)
  48. _YELLOW=$(tput bold)$(tput setaf 3)
  49. _BLUE=$(tput bold)$(tput setaf 4)
  50. _MAGENTA=$(tput bold)$(tput setaf 5)
  51. _CYAN=$(tput bold)$(tput setaf 6)
  52. _WHITE=$(tput bold)$(tput setaf 7)
  53. _RESET=$(tput sgr0)
  54. _BOLD=$(tput bold)
  55. PS1="${_YELLOW}[\h \w]> ${_RESET}"
  56. #PS1='[\u@\h \W]\$ '
  57. #PS1="\[$(tput bold)\]\[$(tput setaf 5)\][\u@\h \W]\\$ \[$(tput sgr0)\]"
  58. # PS1="$(tput bold)$(tput setaf 3)[\h $(tput setaf 2)\w$(tput setaf 3)]> $(tput sgr0)"
  59. # To initialize zoxide, add this to your configuration (usually ~/.bashrc):
  60. eval "$(zoxide init bash)"