diff options
-rw-r--r-- | os-plugins/plugins/xserver/XX_xserver.sh | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/os-plugins/plugins/xserver/XX_xserver.sh b/os-plugins/plugins/xserver/XX_xserver.sh index 7019c324..4bd33610 100644 --- a/os-plugins/plugins/xserver/XX_xserver.sh +++ b/os-plugins/plugins/xserver/XX_xserver.sh @@ -107,6 +107,10 @@ EndSection Section "Monitor" Identifier "Generic Display" Option "DPMS" +# Horizsync could be enabled via xserver::ddcinfo attribute +# Vertrefresh ... +# DisplaySize ... +# Model ... EndSection Section "Screen" Identifier "Default Screen" @@ -153,19 +157,31 @@ Section "InputDevice"\ Option "SendCoreEvents" "true" }' -e '/Device "Generic Mouse"/ { a\ \ InputDevice\ \ "Synaptics TP"\ \ \ \ \ \ "SendCoreEvents" -}' -i $xfc +}' -i $xfc fi [ $DEBUGLEVEL -gt 0 ] && echo "done with 'xserver' os-plugin ..."; # run distro specific generated stage3 script [ -e /mnt/opt/openslx/plugin-repo/xserver/xserver.sh ] && \ . /mnt/opt/openslx/plugin-repo/xserver/xserver.sh if [ $xserver_ddcinfo -ne 0 ] ; then - # read /etc/hwinfo.monitor started at "runinithook '00-started'" + # read /etc/hwinfo.display started at "runinithook '00-started'" # and add - # Horizsync 28.0-65.0?? - # Vertrefresh 57.0-63.0?? - # in Monitor section - : + # Horizsync M-N + # Vertrefresh O-P in Monitor section + vert=$(grep -m 1 "Vert.*Range:" /etc/hwinfo.display | \ + sed 's|.*Range:\ ||;s|\ Hz||') + horz=$(grep -m 1 "Hor.*Range:" /etc/hwinfo.display | \ + sed 's|.*Range:\ ||;s|\ kHz||') + modl=$(grep -m 1 " Model: " /etc/hwinfo.display | \ + sed 's|.*Model:\ ||;s|"||g') + size="0 0" + size="$(grep -m 1 " Size: " /etc/hwinfo.display | \ + sed 's|.*ize:\ ||;s|\ mm||;s|x|\ |')" + [ -n "$vert" -a -n "$horz" ] && \ + sed -e "s|# Horizsync.*| Horizsync $horz|;\ + s|# Vertrefre.*| Vertrefresh $vert|;\ + s|# DisplaySi.*| DisplaySize $size|;\ + s|# Modelname.*| Modelname \"$modl\"|" -i $xfc fi fi fi |