Magellan Linux

Diff of /trunk/hwinfo/emulate-ddcxinfo-knoppix.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1646 by niro, Fri Feb 17 10:09:35 2012 UTC revision 1750 by niro, Tue Apr 24 14:11:07 2012 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3  case $1 in  case $1 in
4   -vsync) hwinfo --monitor | grep "Vert. Sync" | sed 's:.*Vert.*Sync\ Range\:\ \(.*\)\ Hz:\1:' ;;   -vsync)
5   -hsync) hwinfo --monitor | grep "Hor. Sync" | sed 's:.*Hor.*Sync\ Range\:\ \(.*\)\ kHz:\1:' ;;   vsync=$(hwinfo --monitor | grep "Vert. Sync" | sed 's:.*Vert.*Sync\ Range\:\ \(.*\)\ Hz:\1:')
6     if [[ -z ${vsync} ]]
7     then
8     echo "0-0"
9     else
10     echo "${vsync}"
11     fi
12     ;;
13    
14     -hsync)
15     hsync=$(hwinfo --monitor | grep "Hor. Sync" | sed 's:.*Hor.*Sync\ Range\:\ \(.*\)\ kHz:\1:')
16     if [[ -z ${hsync} ]]
17     then
18     echo "0-0"
19     else
20     echo "${hsync}"
21     fi
22     ;;
23  esac  esac

Legend:
Removed from v.1646  
changed lines
  Added in v.1750