PGM Nexus is a great kernel module (or an app, if you prefer it in simple terms), designed for rooted Galaxy Nexus phones which allows you to turn your screen on or off using just swipe gestures. For example, on my Nexus I just swipe from left to right across the screen, and it powers on. If I do the same thing but on the other direction at the bottom of the screen (where the navigation buttons are located), screen just turns of. It takes a bit of time to get used to it, but after you start enjoying it, it'll be the exclusive mode you turn the screen on and off.
If your power button fails and you are afraid of that, this is exactly what you need. I still can't figure out how it actually works (the screen is off, it doesn't use any power but it still recognizes the swipes), but it's a great idea which is well implemented. It's really great, but because of the kernel thing, it will automatically turn off (if set to start on boot) when a kernel is flashed, but selecting that option again seems to stick through reboots afterwards.
Only drawback: it's $3. There's a free version available, but people complain that it completely stops working after a week. So you decide on which way to go.
If your power button fails and you are afraid of that, this is exactly what you need. I still can't figure out how it actually works (the screen is off, it doesn't use any power but it still recognizes the swipes), but it's a great idea which is well implemented. It's really great, but because of the kernel thing, it will automatically turn off (if set to start on boot) when a kernel is flashed, but selecting that option again seems to stick through reboots afterwards.
Only drawback: it's $3. There's a free version available, but people complain that it completely stops working after a week. So you decide on which way to go.