3 ms·
I have a strange problem with my monitor that I solved with a program. Basically, I use a USB switch to switch my mouse, keyboard, and webcam between my person
by Sohcahtoa82 5y ago
I have a strange problem with my monitor that I solved with a program.
Basically, I use a USB switch to switch my mouse, keyboard, and webcam between my personal desktop computer and the MacBook I use for work. I tried a full KVM switch at first, but every time I'd switch it to my MacBook, Windows on my PC would flip its shit. With the primary monitor disconnected, it would move everything to the secondary monitor, which was fine, except that when I moved the KVM switch back to my PC, it would move everything back to my primary display, whether or not it was originally on my primary or secondary. Additionally, since my two monitors are different resolutions, all my window sizing was wrong.
I tried to get around this by plugging my PC into my monitor's Display Port and plugging the MacBook into an HDMI port and just telling my monitor to switch inputs, and for the most part it works, but at 1 PM every day, if my monitor is set to HDMI, it drops the DP connection, making Windows think it lost the monitor, putting me back at square one.
So I wrote a simple program in Python that sits in my notification tray. I can tell it to save or restore all my window positions. So if Windows loses the monitor, after it comes back, I can restore everything to where it was.
As a bonus, I also added a "Easy Copy/Paste" menu to quickly copy emojis like ¯\_(ツ)_/¯ and ಠ_ಠ to my clipboard.