I don't work in an office anymore either, but when I did (years ago), I would get constantly interrupted by people walking up to my desk and talking to me. I like talking to people but I also need uninterrupted focus time.
I made something similar with a blink USB light: https://blink1.thingm.com/ . I had a little sign that said "when it's red, I'm busy". And a keyboard shortcut to toggle it from red to green (it just ran a little bash script that invoked the blink CLI). It was duct-taped to my monitor so you could see it from far away.
It worked very well to prevent interruptions from other people walking up to my desk and chatting with me.