]> git.madduck.net Git - etc/xsession.git/blob - .bin/xconfig

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

switch xsetup to autorandr-based
[etc/xsession.git] / .bin / xconfig
1 #!/bin/sh
2 set -eu
3
4 config_xkb() {
5   echo -n >&2 " xkb"
6   local XKBDIR; XKBDIR="$HOME/.xkb"
7   local XKBMAPFILE; XKBMAPFILE="$XKBDIR/keymap/$(hostname --fqdn)"
8   [ -r "$XKBMAPFILE" ] || XKBMAPFILE="${XKBMAPFILE%/*}/default"
9
10   xkbcomp -w3 -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}"
11 }
12
13 config_xset() {
14   echo -n >&2 " xset-basics"
15   # i hate this bell!!!
16   xset b 0
17
18   # power saving mode of the screen
19   xset dpms 300 300 300
20
21   # typematic repeat rate
22   xset r rate 255 47
23 }
24
25 config_xsetroot() {
26   echo -n >&2 " xroot"
27   xsetroot -default
28 }
29
30 load_xresources() {
31   echo -n >&2 " Xresources"
32   xrdb -load ~/.Xresources
33 }
34
35 echo -n >&2 "Configuring X ["
36 [ -n "${SKIP_XKB:-}" ] || config_xkb
37 [ -n "${SKIP_XSET:-}" ] || config_xset
38 [ -n "${SKIP_XSETROOT:-}" ] || config_xsetroot
39 [ -n "${SKIP_XRESOURCES:-}" ] || load_xresources
40 echo >&2 " ] done."