.mkshrc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Set PS1 and path
  2. PS1="$(echo '\033[01;34m$(pwd | sed "s,^$HOME,~,") \033[00m$') "
  3. # PATH=$PATH:/home/c/scripts
  4. # History
  5. HISTFILE="$HOME/.mksh_history"
  6. HISTSIZE=5000
  7. export VISUAL="nvim"
  8. export EDITOR="$VISUAL"
  9. set -o vi
  10. # Program aliases and functions
  11. alias wttr='curl wttr.in/Uzhgorod'
  12. alias xip='curl ifconfig.co; curl ifconfig.co/country'
  13. alias ls='ls --color=auto'
  14. alias grep='grep --color=auto'
  15. alias v='nvim'
  16. alias xi='sudo xbps-install'
  17. alias xq='xbps-query'
  18. alias xr='sudo xbps-remove'
  19. alias yv='pipe-viewer --api=auto'
  20. alias cp='cp -v'
  21. alias mv='mv -v'
  22. alias rm='rm -iv'
  23. alias v='nvim'
  24. alias L='ls -la'
  25. alias nnn='nnn -e'
  26. alias cl='clear'
  27. function ytm() {
  28. youtube-dl -x --audio-format=mp3 $1
  29. }
  30. function cdf () {
  31. cd "$(find . -type d | fzf)"
  32. }
  33. function vif () {
  34. vim "$(find . -type f | fzf)"
  35. }
  36. # Re-run last command as root
  37. alias s!!='sudo $(fc -r -l -n -1)'
  38. # Hide sxiv bottom bar
  39. alias sxiv='sxiv -b'
  40. # Quick dirs
  41. alias gm='cd ~/music; ls;'
  42. alias gmc='cd ~/music/classicalmisc; ls;'
  43. alias gme='cd ~/music/electronicmisc; ls;'
  44. alias gi='cd ~/images; ls;'
  45. alias gd='cd ~/downloads; ls;'
  46. alias ge='cd ~/projects/ecosim/src; ls;'