settings 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. ### Settings ### {{{
  7. ### Mac Settings ### {{{
  8. if [ $OSTYPE == 'darwin13' ]; then
  9. ### Brew Stuff ### {{{
  10. ## Add git completion
  11. if [ -f $(brew --prefix)/etc/bash_completion ]; then
  12. source $(brew --prefix)/etc/bash_completion
  13. fi
  14. ## Brew completion
  15. if [ -f $(brew --prefix)/Library/Contributions/brew_bash_completion.sh ]; then
  16. source $(brew --prefix)/Library/Contributions/brew_bash_completion.sh
  17. fi
  18. ### End Brew Stuff ### }}}
  19. ### Mac Aliases ### {{{
  20. ## Interactive Test
  21. if [[ $- == *i* ]]; then
  22. alias google='ping -c 1 www.google.com && growlnotify -m "google pinged"'
  23. alias ardrestart='sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -menu'
  24. alias vi='vim'
  25. alias fvreboot='sudo fdesetup authrestart'
  26. 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"'
  27. fi
  28. ### End Mac Aliases ### }}}
  29. __ssh_agent
  30. fi
  31. ### End Mac Settings ### }}}
  32. ### MA Settings ### {{{
  33. if [ $HOSTNAME == 'ma.sdf.org' ]; then
  34. export PATH=/usr/pkg/bin:/usr/local/bin:/usr/bin:/bin
  35. export TZ=EST5EDT
  36. #source /etc/bash_completion.d/git ## Add git completion
  37. ## Interactive Test
  38. if [[ $- == *i* ]]; then
  39. alias bb='bboard'
  40. alias mutt='~/bin/mutt'
  41. unalias svi
  42. fi
  43. __ssh_agent
  44. fi
  45. ### End MA Settings ### }}}
  46. ### For pi ### {{{
  47. if [ $HOSTTYPE == 'arm' ]; then
  48. #source /etc/bash_completion.d/git ## Add git completion
  49. ## Interactive Test
  50. if [[ $- == *i* ]]; then
  51. alias ls='ls --color=auto'
  52. alias vi='vim'
  53. alias vnc='vncserver :1 -geometry 1024x700 -depth 24'
  54. fi
  55. __ssh_agent
  56. fi
  57. ### End For pi ### }}}
  58. ### For iOS ### {{{
  59. if [ $OSTYPE == 'darwin9' ]; then
  60. if [[ $- == *i* ]]; then
  61. alias svi='sudo -E vi'
  62. fi
  63. fi
  64. ### End For iOS ### }}}
  65. ### For Debian Including Laptop and Netbook ### {{{
  66. if [[ $MACHTYPE == 'x86_64-pc-linux-gnu' || $MACHTYPE == 'i486-pc-linux-gnu' ]]; then
  67. ## Interactive Test
  68. if [[ $- == *i* ]]; then
  69. alias ls='ls --color=auto'
  70. alias vi='vim'
  71. alias mp='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'
  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. ## Interactive Test
  91. if [[ $- == *i* ]]; then
  92. alias help='/usr/local/bin/help'
  93. alias bb='bboard'
  94. alias cdircd='cd /sys/pkg/etc/unrealircd/'
  95. unalias svi
  96. #alias ls='colorls -G'
  97. fi
  98. if [ $HOSTNAME = "iceland" ]; then
  99. __ssh_agent
  100. fi
  101. fi
  102. ### End For SDF Main Cluster ### }}}
  103. ### For OpenWrt ### {{{
  104. if [ "$MACHTYPE" == "mips-openwrt-linux-gnu" ]; then
  105. alias opkgup="eval \$(opkg list_installed | sed 's/ - .*//' | sed 's/^/opkg upgrade /')"
  106. fi
  107. ### End For OpenWrt ### }}}
  108. ### Testing ### {{{
  109. ### End Testing ### }}}
  110. ### End Settings ### }}}