#!/bin/sh set -eu config_xkb() { echo -n >&2 " xkb" local XKBDIR; XKBDIR="$HOME/.xkb" local XKBMAPFILE; XKBMAPFILE="$XKBDIR/keymap/$(hostname --fqdn)" [ -r "$XKBMAPFILE" ] || XKBMAPFILE="${XKBMAPFILE%/*}/default" xkbcomp -w3 -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}" } config_xset() { echo -n >&2 " xset-basics" # i hate this bell!!! xset b 0 # power saving mode of the screen xset dpms 300 300 300 # typematic repeat rate xset r rate 255 47 } config_xsetroot() { echo -n >&2 " xroot" xsetroot -default } load_xresources() { echo -n >&2 " Xresources" xrdb -load ~/.Xresources } echo -n >&2 "Configuring X [" [ -n "${SKIP_XKB:-}" ] || config_xkb [ -n "${SKIP_XSET:-}" ] || config_xset [ -n "${SKIP_XSETROOT:-}" ] || config_xsetroot [ -n "${SKIP_XRESOURCES:-}" ] || load_xresources echo >&2 " ] done."