.xinitrc
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 08 Jul 2012 19:23:11 +0300
changeset 484 cf2e6576575c
parent 480 4d0ff0dfdeb9
child 544 ee6112ed88da
permissions -rw-r--r--
Use FvwmM4 module to avoid creating env vars. Use -m4-prefix -m4-prefix-defines options to avoid name conflict and prevent from substitution of built-in defines (like FVWM_USERDIR).

#!/bin/bash

if [[ -f ~/.bashenv ]]; then
  . ~/.bashenv
fi
# Load custom settings (user editable).
if [[ -f ~/.bash_custom ]]; then
  . ~/.bash_custom
fi

if [[ -f ~/.Xdefaults ]]; then
  xrdb -merge ~/.Xdefaults
  # xrdb -load ~/.Xdefaults
fi

# Under Cygwin I prefer '-multiwindow' option, so it needn't to setup WM.
if [[ -z $COMSPEC ]]; then
  setxkbmap us,ru,ua
  kbdd &
  if [[ -f ~/.xmodmaprc ]]; then
    xmodmap ~/.xmodmaprc
  fi
  xsetroot -gray
  # To debug FvwmM4 add "-debug" after "FvwmM4".
  fvwm -cmd "Module FvwmM4 -m4-prefix -m4-prefix-defines $HOME/.fvwm/config" &
fi

# Last command.
exec xterm -geometry 80x42 -e bash -i