summaryrefslogtreecommitdiff
path: root/dot/xinitrc
blob: 4b44c5aae98afb5efc75ad596bd9bb498e1b136d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -x
USING_GNOME=1
if [ -r "$XAUTHORITY" -a ! "$XAUTHORITY" -ef "$HOME"/.Xauthority ]; then
  ln -sf "$XAUTHORITY" "$HOME"/.Xauthority
  XAUTHORITY="$HOME"/.Xauthority
fi
warn() { xmessage ".xinitrc: Warning: $*" & }
xrdb -merge ~/.Xresources || warn "xrdb returned $?"

# if [ "$USING_GNOME" ]; then
#   xrdb -merge - <<'END' || warn "xrdb returned $?"
# ! apparently gnome is setting the bg/fg color of xterm using other things...
#    xterm*reverseVideo: false
# END
# fi

# no gnome:
setxkbmap -option terminate:ctrl_alt_bksp -option caps:super
# gnome:
gsettings set org.gnome.libgnomekbd.keyboard options "['terminate\tterminate:ctrl_alt_bksp', 'caps\tcaps:super']"

(
  cd $HOME/src/samizdat;
  screen -d -m -S samizdat;
  exec xterm -geometry 160x64+0+0 -e screen -xRR samizdat
) &
# xcompmgr -c &
if [ "$USING_GNOME" ]; then
  exec gnome-session-xmonad
else
  (exec xmonad || exec fluxbox) &
fi
exec perl -MPOSIX -e pause
xterm # if exec fails