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