X-Git-Url: https://git.madduck.net/etc/xsession.git/blobdiff_plain/c377f0c278d6840c4fbfab14cca8eecf2ccc67ee..00d3aaa4438509e32247d91b7becb5d30d72bf08:/.bin/xconfig diff --git a/.bin/xconfig b/.bin/xconfig new file mode 100755 index 0000000..6d09d4a --- /dev/null +++ b/.bin/xconfig @@ -0,0 +1,40 @@ +#!/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."