haimgel / display-switch

Turn a $30 USB switch into a full-featured multi-monitor KVM switch
https://haim.dev/posts/2020-07-28-dual-monitor-kvm/
MIT License
2.82k stars 110 forks source link

Adjust the order of execution of external commands #97

Open fcwoknhenuxdfiyv opened 2 years ago

fcwoknhenuxdfiyv commented 2 years ago

Thanks for this really useful project!

I have configured external commands to save window positions and restore them upon switching away and back (yeah, KDE Plasma!). The switch function seems to call the command always after the monitor switch. It would be great to call the on_usb_disconnect_execute before switching the screen to make sure I save the window positions at the current resolution - right now with my (persnickety) monitor, I sometimes get the windows saved at the laptop screen resolution.

Also (sorry), it would be great to have a delay +/- for each script/command.