Sleep reform automatically while closing the screen

Hi there
Looking for a solution to have automatically suspend my Reform when I close the laptop I am implementing the next:

  1. Under sway I configured F1+F12 to execute systemctl suspend
  2. I glued two pads to the screen (see photo)
  3. When I close the screen F1 and F12 are activated simultaneously and, halas! My Reform sleep.

I used a white soft pad that I have around, for aesthetic I will change with black ones

Enjoy!

12 Likes

Hahahahaha! This is brilliant! What an awesome mod! You really are thinking outside the box. I love it! :heart:

4 Likes

Initialy I was thinking the hard way:
Use a reed switch activated with a magnet and connected to the expansion port and implementing proper service in Debian to handle the full thing…sometimes is better to understand what do you want vs thinking in technology.

3 Likes

The only thing that worries me with this is the keys are constantly depressed while the lid is closed. Is this not going cause any problems?

1 Like

Might another solution just to have it auto-sleep after a period of idle time?

Or, as mentioned, use the GPIO, but have a simple Python script running (as a service) to check when it’s activated… I’d probably be lazy and have a momentary switch mounted on the outside, although a reed switch would be neater (albeit less flexible re alternative uses).

I removed some wool of the pad to maintain the pressure at minimum.

Probably after some closing cycles (approx 10 m :slight_smile: ) the two keys will fail, then you have to change it, nice time to practice with solder staff.

In the meanwhile I am designing the hi tech solution with magnets and no physical contact at all, but will take some time

Vini

1 Like

Really looking forward to seeing that!