.xinitrc
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 20 Oct 2015 21:22:47 +0300
changeset 757 70dae9e483aa
parent 756 6bf12d0f0be9
permissions -rw-r--r--
Better color for background to differ xinit lock terminal from other. Also add noticeable title.

#!/bin/bash

if [[ -f ~/.env ]]; then
  . ~/.env
fi
# Load custom settings (user editable).
if [[ -f ~/.env.local ]]; then
  . ~/.env.local
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 -mod 2 2 -fg gray70 -bg gray60 &
  # To debug FvwmM4 add "-debug" after "FvwmM4".
  fvwm -cmd "Module FvwmM4 -m4-prefix -m4-prefix-defines $HOME/.fvwm/config" &
  emacs --name emacs-main &
  goldendict &
  firefox &
  notfy_daemon_cmd=/usr/lib/notification-daemon/notification-daemon
  if [[ -x $notfy_daemon_cmd ]]; then
    $notfy_daemon_cmd &
  fi
fi

if command -v xscreensaver; then
  xscreensaver -nosplash &
fi

# Disable beeping.
if command -v xset; then
  xset -b &
fi

# Last command.
exec xterm -geometry 80x42 -name "xinitrc" -title "*** xinitrc ***" -bg bisque -e bash -i