configurations and the like
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.
 
 
 

69 lines
1.6 KiB

  1. [[ -f /etc/profile ]] && \
  2. emulate sh -c 'source /etc/profile'
  3. ##################### MISC ####################
  4. export QT_STYLE_OVERRIDE=gtk
  5. # bad hack to make video card fans shut up
  6. [[ ! -z $(whence optirun) ]] && optirun --no-xorg true
  7. ################## SET EDITOR #################
  8. if [[ ! -z $(whence nvim) ]] then
  9. export EDITOR=nvim
  10. elif [[ ! -z $(whence vim) ]] then
  11. export EDITOR=vim
  12. elif [[ ! -z $(whence vi) ]] then
  13. export EDITOR=vi
  14. fi
  15. source $HOME/.config/init/vars
  16. ############# STORE VIMTAGS IN TMP ############
  17. [[ -d $tmpdir ]] && \
  18. touch $tmpdir/.vimtags && ln -sf $tmpdir/.vimtags .
  19. ############# INITIALISE CONFIGS ##############
  20. [[ -f $HOME/.config/init/init.sh ]] && \
  21. $HOME/.config/init/init.sh
  22. ########## MAKE USER FUNCS AVAILABLE ##########
  23. func_init_checkreq() {
  24. local func_init_state=0
  25. for e in "$@"; do
  26. if [[ $func_init_state -eq 0 ]]; then
  27. if [[ "$e" == ',' ]]; then
  28. func_init_state=1
  29. else
  30. whence $e >/dev/null
  31. [[ $? -eq 0 ]] || return 1
  32. fi
  33. else
  34. local cmd
  35. echo "$e" | read -A cmd
  36. $cmd 2>/dev/null 1>&2
  37. [[ $? -eq 0 ]] || return 1
  38. fi
  39. done
  40. return 0
  41. }
  42. if [[ -d $HOME/.config/init/funcs/ && -d $HOME/.config/init/funcreqs ]]; then
  43. rm -rf $tmpdir/funcs
  44. mkdir -p $tmpdir/funcs
  45. path+=($tmpdir/funcs)
  46. for f in $HOME/.config/init/funcreqs/*; do
  47. source "$f"
  48. func_init_checkreq $func_init_prereqs , $func_init_checks
  49. if [[ $? -eq 0 ]] then
  50. chmod +x $HOME/.config/init/funcs/${f:t}
  51. ln -s $HOME/.config/init/funcs/${f:t} $tmpdir/funcs/${f:t}
  52. fi
  53. done
  54. fi
  55. ############# CONNECTING OVER SSH #############
  56. [[ -f $HOME/.zprofile-abduco ]] && \
  57. source $HOME/.zprofile-abduco
  58. export PATH