#!/usr/bin/env bash
|
|
|
|
prepend_to_path() {
|
|
local dir="$1"
|
|
|
|
if [[ -d "${dir}" ]]; then
|
|
if [[ ":$PATH:" != *"${dir}"* ]]; then
|
|
export PATH="${dir}:${PATH}"
|
|
fi
|
|
fi
|
|
}
|
|
|
|
has?() {
|
|
command -v "$1" > /dev/null 2>&1
|
|
}
|
|
|
|
echo `date` > "/home/brennen/xinitrc_called"
|
|
|
|
# Make sure "$HOME/bin" is in path
|
|
prepend_to_path "$HOME/bin"
|
|
prepend_to_path "$HOME/firefox"
|
|
prepend_to_path "$HOME/notes/bin"
|
|
prepend_to_path "$HOME/.xmonad"
|
|
|
|
# Local Hacks {{{
|
|
XRDB_OPTIONS=''
|
|
[ -r "$HOME/.hacksrc" ] && . "$HOME/.hacksrc"
|
|
# }}}
|
|
|
|
# Load X Configuration
|
|
test -f "$HOME/.Xresources" && xrdb $XRDB_OPTIONS -merge "$HOME/.Xresources"
|
|
# test -f "$HOME/.xmodmap" && xmodmap "$HOME/.xmodmap"
|
|
|
|
# Keyboard stuffs
|
|
# ---
|
|
# * use right-alt as Alt-Gr key ($ → £)
|
|
# * use right ctrl key as compose (ctrl 1 2 → ½)
|
|
# * use ctrl+alt+bksp to restart `X`
|
|
# * Capslock → Ctrl
|
|
# * Alt-Gr + Space = nbsp/Alt-Gr + Shift + Space = shy nbsp
|
|
setxkbmap \
|
|
-layout us \
|
|
-variant altgr-intl \
|
|
-option compose:rctrl \
|
|
-option terminate:ctrl_alt_bksp \
|
|
-option ctrl:nocaps
|
|
|
|
xset -b # Stop beeping at me (A.K.A turn off PC speaker)
|