#!/bin/bash
# "Tablet mode" handler for fujitsu tilt&rotate LCD panel
# Activated by acpid on tablet-mode on/off, as well as following the
# orientation change in 'rotate' button handler

case $1 in
	-e|--enable)
		# Invoked by /etc/acpi/tablet-mode after LCD panel tilt into "tablet" mode
		# video/tabletmode:TBLT:*:00000001
		fujitsu-rotate-screen --tablet;;
	-d|--disable)
		# Invoked by /etc/acpi/tablet-mode after LCD panel tilt into "laptop" mode
		# video/tabletmode:TBLT:*:00000000
		fujitsu-rotate-screen --untablet;;
	*)
		echo "$0: bad args '$*'" >&2; exit 2;;
esac
