summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-04-14 17:30:03 +0200
committerPatrick Simianer <p@simianer.de>2016-04-14 17:30:03 +0200
commit2c01777eb98ac7649d24e1a60a94393892b7e7af (patch)
tree9924785d7ec84ff052ef69e2c0503e16258ad3e8
parente48cf80816801552e818fedbd336777319aafced (diff)
new fnf7
-rwxr-xr-xfnf720
1 files changed, 20 insertions, 0 deletions
diff --git a/fnf7 b/fnf7
new file mode 100755
index 0000000..7a7e21c
--- /dev/null
+++ b/fnf7
@@ -0,0 +1,20 @@
+#!/usr/bin/env ruby
+
+xrandrq = `xrandr -q`
+
+`touch /tmp/qqqaaa`
+
+if xrandrq.match /VGA1 connected/
+ if File.exists? '/tmp/__vga_connected'
+ `xrandr --output VGA1 --off`
+ `xrandr --output LVDS1 --mode 1024x768`
+ `rm /tmp/__vga_connected`
+ else
+ if xrandrq.match /1680x1050\s+\d+\.\d+\s++/
+ `xrandr --output VGA1 --mode 1680x1050 --rate 60 --rotate left`
+ `xrandr --output LVDS1 --off`
+ `touch /tmp/__vga_connected`
+ end
+ end
+end
+