settings 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. ##### My (demuredemeanor) bashrc sub source machine settings script
  2. # Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
  3. # https://notabug.org/demure/dotfiles/
  4. # legacy repo http://github.com/demure/dotfiles
  5. # vim:set syntax=sh:
  6. ### Mac Settings ### {{{
  7. if [ ${OSTYPE} == 'darwin13' ]; then
  8. ### Brew Stuff ### {{{
  9. ## Add git completion
  10. if [ -f $(brew --prefix)/etc/bash_completion ]; then
  11. source $(brew --prefix)/etc/bash_completion
  12. fi
  13. ## Brew completion
  14. if [ -f $(brew --prefix)/Library/Contributions/brew_bash_completion.sh ]; then
  15. source $(brew --prefix)/Library/Contributions/brew_bash_completion.sh
  16. fi
  17. ### End Brew Stuff ### }}}
  18. ### Mac Aliases ### {{{
  19. ## Interactive Test
  20. if [[ $- == *i* ]]; then
  21. alias google='ping -c 1 www.google.com && growlnotify -m "google pinged"'
  22. alias ardrestart='sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -menu'
  23. alias vi='vim'
  24. alias fvreboot='sudo fdesetup authrestart'
  25. alias rebuild_open_with='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"'
  26. fi
  27. ### End Mac Aliases ### }}}
  28. __ssh_agent
  29. fi
  30. ### End Mac Settings ### }}}
  31. ### MA Settings ### {{{
  32. if [ ${HOSTNAME} == 'ma.sdf.org' ]; then
  33. export PATH=/usr/pkg/bin:/usr/local/bin:/usr/bin:/bin
  34. export TZ=EST5EDT
  35. #source /etc/bash_completion.d/git ## Add git completion
  36. ## Interactive Test
  37. if [[ $- == *i* ]]; then
  38. alias bb='bboard'
  39. alias mutt='~/bin/mutt'
  40. unalias svi
  41. fi
  42. __ssh_agent
  43. fi
  44. ### End MA Settings ### }}}
  45. ### For pi ### {{{
  46. if [ ${HOSTTYPE} == 'arm' ]; then
  47. #source /etc/bash_completion.d/git ## Add git completion
  48. ## Interactive Test
  49. if [[ $- == *i* ]]; then
  50. alias ls='ls --color=auto'
  51. alias vi='vim'
  52. alias vnc='vncserver :1 -geometry 1024x700 -depth 24'
  53. fi
  54. __ssh_agent
  55. fi
  56. ### End For pi ### }}}
  57. ### For iOS ### {{{
  58. if [ ${OSTYPE} == 'darwin9' ]; then
  59. if [[ $- == *i* ]]; then
  60. alias svi='sudo -E vi'
  61. fi
  62. fi
  63. ### End For iOS ### }}}
  64. ### For Debian Including Laptop and Netbook ### {{{
  65. if [[ ${MACHTYPE} == 'x86_64-pc-linux-gnu' || ${MACHTYPE} == 'i486-pc-linux-gnu' ]]; then
  66. ## Interactive Test
  67. if [[ $- == *i* ]]; then
  68. alias ls='ls --color=auto'
  69. alias vi='vim'
  70. alias mp='mpv'
  71. alias qmp='tsp mpv'
  72. alias mpp='mp --no-ytdl --fs=no --geometry=50%' ## for podcasts
  73. alias ssht='sshuttle --dns -vr ma 0/0'
  74. #alias hdmi-mirror='xrandr --output HDMI1 --mode 1360x768'
  75. #alias hdmi-second='xrandr --output HDMI1 --mode 1360x768 --right-of LVDS1'
  76. alias hdmi-off='xrandr --output HDMI1 --off'
  77. alias xc="xclip -selection c"
  78. fi
  79. if [ ${HOSTNAME} == "moving-computer-of-doom" ]; then
  80. alias borg_pass='export BORG_PASSPHRASE="$(pass cli/borg)"'
  81. export BORG_REPO='ssh://demure@10.0.0.10:500/mnt/borg/doom-x270'
  82. fi
  83. __ssh_agent
  84. fi
  85. ### End For Debian ### }}}
  86. ### For SDF Main Cluster ### {{{
  87. if [[ "${MACHTYPE}" == "x86_64--netbsd" && "${OSTYPE}" == "netbsd" ]]; then
  88. #LSCOLORS='exfxcxdxbxegedabagacad'
  89. export TZ=EST5EDT
  90. export PATH=/usr/pkg/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:${HOME}/projects/personal/scripts:${HOME}/bin:${HOME}/.local/bin:/usr/local/games:/usr/games
  91. ## Interactive Test
  92. if [[ $- == *i* ]]; then
  93. alias help='/usr/local/bin/help'
  94. alias bb='bboard'
  95. alias cdircd='cd /sys/pkg/etc/unrealircd/'
  96. unalias svi
  97. #alias ls='colorls -G'
  98. fi
  99. fi
  100. ### End For SDF Main Cluster ### }}}
  101. ### For OpenWrt ### {{{
  102. if [ "${MACHTYPE}" == "mips-openwrt-linux-gnu" ]; then
  103. alias opkgup="eval \$(opkg list_installed | sed 's/ - .*//' | sed 's/^/opkg upgrade /')"
  104. fi
  105. ### End For OpenWrt ### }}}
  106. ### Testing ### {{{
  107. ### End Testing ### }}}