.xserverrc
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 30 Dec 2018 12:26:48 +0200
changeset 915 691db6af02e4
parent 277 38c4ac60b6fb
permissions -rw-r--r--
Change rules size only on SIGWINCH. $COLUMNS isn't updated on SIGWINCH yet so "tput" is used. For better performance ruler is calculated by substring. Moving ruler handler to trap cleans console from garbage when "set -x" is set in interactive session. It is useful during debugging of bash completion.

#!/bin/sh

# http://tldp.org/HOWTO/XWindow-User-HOWTO/runningx.html

if [ -n "$WINDIR" -o "$TERM" = cygwin ]; then
  # Probably under Cygwin.
  exec XWin -multiwindow -clipboard -silent-dup-error -xkblayout "us,ru" -xkboptions "grp:caps_toggle" "$@"
elif [ -f /etc/debian_version ]; then
  exec /usr/bin/X -nolisten tcp "$@"
else
  exec X -nolisten tcp "$@"
fi