#
# Copyright (c) 2013 Stefan Tomanek <stefan.tomanek@wertarbyte.de>
#
-#
-#
-# THE FOLLOWING LICENCE AGREEMENT IS PRELIMINARY AND INVALID UNTIL ISSUE #7 AT
-# https://github.com/phillipberndt/autorandr/issues/7
-# HAS BEEN RESOLVED!
-#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
DEFAULT_PROFILE=""
SAVE_PROFILE=""
-FP_METHODS="setup_fp_sysfs_edid setup_fp_xrandr_edid"
+FP_METHODS="setup_fp_xrandr_edid setup_fp_sysfs_edid"
CURRENT_CFG_METHOD="current_cfg_xrandr"
LOAD_METHOD="load_cfg_xrandr"
$XRANDR -q | awk -v primary_setup="${PRIMARY_SETUP}" '
# display is connected and has a mode
/^[^ ]+ connected [^(]/ {
+ output=$1
print "output "$1;
if ($3 == "primary") {
print $3
}
next;
}
+ / [0-9]+x[0-9]+ .+/ {
+ if (output) {
+ for (n=1; n<10; n++) {
+ if($n ~ /[0-9]+\.[0-9]+\*/) {
+ print "rate " gensub(/(+|\*)/, "", "g", $n);
+ }
+ }
+ }
+ }
# disconnected or disabled displays
/^[^ ]+ (dis)?connected / ||
/^[^ ]+ unknown connection / {
+ output=""
print "output "$1;
print "off";
next;