def snap_left(window, width=None):
    """Snaps window to left of desktop.
    Arguments:
      window -- a QWidget
      width=None -- window width, in case you want to change it (if not passed, not changed)
    """
    if not width:
        width = window.width()
    rect = QApplication.desktop().screenGeometry()
    window.setGeometry(_DESKTOP_OFFSET_LEFT, _DESKTOP_OFFSET_TOP, width, rect.height())