On the 737 - Take a bulldog clip to work and clip it somewhere and take it off when you have cabin secure. Or clip your tie to the yoke checklist. Or use the height adjustment handle on upper window frame either up or down. Or as the Irish do - the INOP No Smoking sign works wonders. Halfway for secure then fulldown for seated for departure
Horgy