Comment 5 for bug 163877

Revision history for this message
zexpe (rosscollins-uk) wrote :

I've written a script that upon successive executions gives me the behaviour that Fn-F5 used to provide. It can be triggered by a desktop global shortcut key to allow it to work like Fn-F5 used to work.

Apologies for my poor understanding of script language, but it works for me:

if toshset -q video | grep -q "internal: LCD"; then
  xrandr --output VGA --mode 1024x768
  toshset -video both
else
  if toshset -q video | grep -q "internal and external monitor"; then
    xrandr --output LVDS --off
    sudo toshset -video ext
  else
    if toshset -q video | grep -q "Video out: external monitor"; then
      xrandr --output LVDS --mode 1024x768
      sudo toshset -video int
      xrandr --output VGA --off
    else
      echo "Error: Unknown state"
    fi
  fi
fi