when I close the lid, the computer suspend and lock the screen. If I changed the keyboard layout before I locked it, I can't change it back and unlock the screen.
When I press the shortcut for lock screen, it shows me different lock screen, in this lock screen I can change the keyboard layout.
I want that when I close the lid, the computer will press automatically on the lock screen shortcut, so I won't have to check the keyboard layout before I lock the screen. is that possible?
Edit: I found that I need to write a script that indicates when the lid close and when it does- simulate super + L keys press. The problem is that I don't know how to write this kind of script. I found the link below which has the "OnLidClose" event, but I dont know exactly how to use it. I put the code at the link in /etc/acpi/events/lm_lid and I tried to put the "OdLidClose" code in /etc/acpi/lid.sh, but it copied "$?" as "0".