#!/bin/sh

#
# Copyright (c) 2000 Lars Bernhardsson, see README for licence details
#
# sample.xsession - Login script for larswm
#
# This is an example of how to run a session with a program in the background
# feeding the status bar of larswm. It takes care of killing the background
# job when larswm exits.
#

# Load keymap mods if you need them. I use this on Solaris8 to change
# the keypad to produce the same keysyms as XFree86.
# The file sample.xmodmaprc contains my keyboard remapping.
[ -f $HOME/.xmodmaprc ] && xmodmap $HOME/.xmodmaprc

# Set background and mouse cursor
xsetroot -solid darkgrey -cursor_name top_left_arrow

# Set background and mouse cursor on second monitor
# xsetroot -display :0.1 -solid darkgrey -cursor_name top_left_arrow

# Start a couple of tools
xbiff -geometry 64x64-0-0 &
xload -geometry 64x64-70-0 &

# Start a background job that feeds date/time to larswm
# and remember the pid so we can kill it later.
# See the file sample.barinfo for a more elaborate example
# that shows stock quotes in addition to date and time.
larsclock &
BGPID=$!

# Start larswm.
larswm

# When larswm exits, kill the background job
kill $BGPID

# All done
exit 0
