Dotfiles, utilities, and other apparatus.
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.

48 lines
1.1 KiB

  1. #!/usr/bin/env bash
  2. prepend_to_path() {
  3. local dir="$1"
  4. if [[ -d "${dir}" ]]; then
  5. if [[ ":$PATH:" != *"${dir}"* ]]; then
  6. export PATH="${dir}:${PATH}"
  7. fi
  8. fi
  9. }
  10. has?() {
  11. command -v "$1" > /dev/null 2>&1
  12. }
  13. echo `date` > "/home/brennen/xinitrc_called"
  14. # Make sure "$HOME/bin" is in path
  15. prepend_to_path "$HOME/bin"
  16. prepend_to_path "$HOME/firefox"
  17. prepend_to_path "$HOME/notes/bin"
  18. prepend_to_path "$HOME/.xmonad"
  19. # Local Hacks {{{
  20. XRDB_OPTIONS=''
  21. [ -r "$HOME/.hacksrc" ] && . "$HOME/.hacksrc"
  22. # }}}
  23. # Load X Configuration
  24. test -f "$HOME/.Xresources" && xrdb $XRDB_OPTIONS -merge "$HOME/.Xresources"
  25. # test -f "$HOME/.xmodmap" && xmodmap "$HOME/.xmodmap"
  26. # Keyboard stuffs
  27. # ---
  28. # * use right-alt as Alt-Gr key ($ → £)
  29. # * use right ctrl key as compose (ctrl 1 2 → ½)
  30. # * use ctrl+alt+bksp to restart `X`
  31. # * Capslock → Ctrl
  32. # * Alt-Gr + Space = nbsp/Alt-Gr + Shift + Space = shy nbsp
  33. setxkbmap \
  34. -layout us \
  35. -variant altgr-intl \
  36. -option compose:rctrl \
  37. -option terminate:ctrl_alt_bksp \
  38. -option ctrl:nocaps
  39. xset -b # Stop beeping at me (A.K.A turn off PC speaker)