Turn off One M8 screen without using power-button

Will show two different ways in doing this, one stock HTC and one with an app.

With lock screen on
On active lock screen you can double-tap the screen to turn it off. 

But! I want to do it from my regular screen! There isn’t stock tools for this, but you’ve got various apps on Play Store for this. I prefer Lock pro (for the moment) myself. With Lock Pro installed, you simply add it’s widget to the screen you want. And just tap it to turn screen off. It’s that simple. There is floating “toggles” in Lock Pro and other apps as well, so you don’t have to add an icon/widget that way. Lock screen got a better floating toggle, so it might be worth a try.