don't set page size by default
[tridge/junkcode.git] / switch_monitor.sh
1 #!/bin/sh
2
3 export PATH=$HOME/bin:$PATH
4
5 SWITCH=$HOME/.switch_monitor
6 STATE=0
7
8 if [ -r $SWITCH ]; then
9     STATE=`cat $SWITCH`
10 fi
11
12 case "$STATE" in
13     BOTH)
14         STATE=LCD
15         radeontool dac off
16         radeontool light on
17         ;;
18     LCD)
19         STATE=CRT
20         radeontool dac on
21         radeontool light off
22         ;;
23     CRT)
24         STATE=BOTH
25         radeontool dac on
26         radeontool light on
27         ;;
28 esac
29
30 echo $STATE > $SWITCH
31 echo $STATE
32 export DISPLAY=:0
33 echo $STATE | osd_cat -f '-*-*-*-*-*-*-*-400-*-*-*-*-*-*' -d2 -pmiddle -Acenter