.bash_profile 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # .bash_profile
  2. ## Get the aliases and functions
  3. [ -f "$HOME"/.bashrc ] && . "$HOME"/.bashrc
  4. ## Adds `~/.local/bin` to $PATH
  5. HOME_BIN=$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')
  6. export PATH="$PATH:$HOME_BIN"
  7. ## Default programs:
  8. export EDITOR="nvim"
  9. export TERMINAL="st"
  10. export BROWSER="qutebrowser"
  11. export READER="zathura"
  12. ## ~/ Clean-up:
  13. export XDG_CONFIG_HOME="$HOME/.config"
  14. export XDG_DATA_HOME="$HOME/.local/share"
  15. export XDG_CACHE_HOME="$HOME/.cache"
  16. export XDG_RUNTIME_DIR="$XDG_CONFIG_HOME"
  17. export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
  18. export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch/config"
  19. export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
  20. export LESSHISTFILE="-"
  21. export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
  22. export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/inputrc"
  23. #export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc"
  24. export GNUPGHOME="$XDG_DATA_HOME/gnupg"
  25. export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
  26. export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
  27. export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
  28. #export PASSWORD_STORE_KEY="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg"
  29. export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
  30. export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
  31. export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
  32. export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
  33. export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
  34. export HISTSIZE=3000
  35. export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat"
  36. export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config"
  37. export PENTADACTYL_RUNTIME=$HOME/.config/pentadactyl
  38. export VIKING_MAPS="$XDG_CACHE_HOME/viking"
  39. # export XDG_DATA_DIRS="$XDG_DATA_HOME/viking"
  40. export W3M_DIR="$HOME/.config/w3m"
  41. ## Other program settings:
  42. export DICS="/usr/share/stardict/dic/"
  43. export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
  44. # --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
  45. # --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
  46. # --color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \
  47. export FZF_DEFAULT_OPTS="--layout=reverse --height 50%"
  48. ## set options for less
  49. export LESS='--quit-if-one-screen --ignore-case --status-column --LONG-PROMPT --RAW-CONTROL-CHARS --HILITE-UNREAD --tabs=4 --no-init --window=-4'
  50. ## or the short version
  51. # export LESS='-F -i -J -M -R -W -x4 -X -z-4'
  52. ## Set colors for less. Borrowed from https://wiki.archlinux.org/index.php/Color_output_in_console#less .
  53. export LESS_TERMCAP_mb=$'\E[1;31m' # begin bold
  54. export LESS_TERMCAP_md=$'\E[1;36m' # begin blink
  55. export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
  56. export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
  57. export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
  58. export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
  59. export LESS_TERMCAP_ue=$'\E[0m' # reset underline
  60. # export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
  61. export LESSOPEN='|lesspipe.sh %s'
  62. export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
  63. export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
  64. export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
  65. ## fzf: search also hidden files
  66. export FZF_DEFAULT_COMMAND='fd --type f -H'
  67. ## Option for nnn file manager
  68. #export VISUAL=ewrap
  69. export NNN_BMS='l:~/.local;c:~/.config;d:~/Documents;m:~/Music;v:~/Video;D:~/Downloads/'
  70. export NNN_FIFO='/tmp/nnn.fifo nnn'
  71. export NNN_PLUG='f:fzopen;p:preview-tui;d:diffs;t:nmount;v:imgview;c:fzcd'
  72. export NNN_TRASH=1
  73. export NNN_FCOLORS='c1e2272e006033f7c6d6abc4'
  74. export NNN_ARCHIVE="\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)"
  75. # export NNN_OPENER=~/.config/nnn/plugins/nuke
  76. ## man option for vim`
  77. export MANPAGER='nvim +Man!'
  78. # export MANPAGER="sh -c 'col -bx | bat -l man -p'"
  79. # export MANROFFOPT="-c"
  80. ## Clipmenu options
  81. ## $CM_DIR: specify the base directory to store the cache dir in (default: $XDG_RUNTIME_DIR, $TMPDIR, or /tmp)
  82. ## $CM_HISTLENGTH: specify the number of lines to show in dmenu/rofi (default: 8)
  83. ## $CM_LAUNCHER: specify a dmenu-compatible launcher (default: dmenu)
  84. ## $CM_OUTPUT_CLIP: if set, output clip selection to stdout
  85. # export CM_LAUNCHER=fzf
  86. # export CM_OUTPUT_CLIP=1
  87. export CM_HISTLENGTH=16
  88. #[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ] && shortcuts >/dev/null 2>&1 &
  89. ## Start graphical server on tty1 if not already running.
  90. [ "$(tty)" = "/dev/tty1" ] && ! ps -e | grep -qw Xorg && exec startx
  91. #if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startx; fi # Profile file. Runs on login. Environmental variables are set here.
  92. ## Switch escape and caps if tty and no passwd required:
  93. #sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null