#!/bin/bash
# .ttyconfig: interactive session settings for TheoX

# display settings

if [[ $- == *i* ]]; then
  sys=`uname -s`
  b_tty=`tty|grep tty`
  
  if [[ "$sys" == "Linux" ]]; then
    if [[ "$b_tty" == "" ]]; then
      TERM=xterm-256color	# for mouse drag in ncurses
    else
      TERM=linux
      fi

    b_txwm=1				# use txwm service

    if [[ "$USER" == "system" ]]; then
      if [[ "$TXSERVER" == "" || "$TXSERVER" == "0000-0000-0000-0000-0000" ]]; then
	   echo "Single user maintenance mode"
        b_txwm=0			# don't use txwm service
      fi
    fi
  else
    TERM=xterm
  fi

  b_tty=`tty`			# tty number to pass to txwm service, displayed by attach
  b_pid=`/home/system/disks/s/theox/os/txpid`
fi
