#!/bin/bash

###############################################
## x session for instantOS, use with lightdm ##
###############################################

# used for shutdown
touch ~/.instantosrunning

# loop so crashing instantwm doesn't end the x session
while test -e ~/.instantosrunning; do
    # Log stderror or stdout to a file
    if ! [ -e ~/.instantdebug ]; then
        instantwm 2>~/.instantos.log
    else
        instantwm &>~/.instantos.log
    fi
done
