aboutsummaryrefslogtreecommitdiffstats
path: root/monitor-probe
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-17 14:31:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-17 14:31:55 +0000
commitf4702f7a0ca670b3cc4ac289749d420f85dd34f7 (patch)
tree3e455d4ee48b396e2483edd3f04c7d13b6dd7df0 /monitor-probe
parentef2a6d00cc20aaa72d339329c5e99c8f94130de5 (diff)
downloadmonitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.tar
monitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.tar.gz
monitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.tar.bz2
monitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.tar.xz
monitor-edid-f4702f7a0ca670b3cc4ac289749d420f85dd34f7.zip
add monitor-probe and monitor-probe-using-X
Diffstat (limited to 'monitor-probe')
-rwxr-xr-xmonitor-probe26
1 files changed, 26 insertions, 0 deletions
diff --git a/monitor-probe b/monitor-probe
new file mode 100755
index 0000000..1bd1533
--- /dev/null
+++ b/monitor-probe
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if [ "$1" = -v ]; then
+ opt_v="$1"
+ shift
+fi
+
+if [ -n "$1" ]; then
+ echo "usage: monitor-probe [-v]"
+ exit 1
+fi
+
+if [ $EUID != 0 ]; then
+ echo "you must be root to run this program"
+ exit 1
+fi
+
+[ -n "$opt_v" ] && echo "probing EDID"
+monitor-edid $opt_v && exit 0
+
+[ -n "$opt_v" ] && echo "probing using X"
+monitor-probe-using-X && echo 0
+
+[ -n "$opt_v" ] && echo "probing DMI"
+lspcidrake | sed -n 's/^\(Resolution\|Diagonal_size\):\([^:]*\):.*/\1: \2/p'
+