- Create a new Profile and name it "Toggle Brightness."
- Create an Event context and go to Sensor. Pick the Shake event. For Axis, I recommend Left-Right as this is a pretty natural way to shake the device. For Sensitivity, I recommend Very Low so you don't accidentally toggle the brightness. You can also leave it at Low in case you think you're having to shake it to hard to get it to work, however. For the Duration, I would pick Medium. You can experiment with these settings until you're comfortable.
- Exit and create a task. No need to name it since it's unlikely you'll use this task elsewhere.
- Task --> If. Set it to %BRIGHT ~ 255. This will check if the device brightness is already at maximum.
- Display --> Display Brightness. Set the Level to %Bright. This will be the saved brightness that will be restored when you shake the device again.
- OPTIONAL: Display --> Display Timeout. Set the display timeout to restore to what you normally use.
- Task --> Else.
- Variables --> Variable Set. Set %Bright to %BRIGHT. You're storing the current brightness level to a variable to restore on next shake.
- Display --> Display Brightness. Level 255. You're setting the brightness to maximum.
- OPTIONAL: Display --> Display Timeout. Set this to a higher display timeout in case that's what you want.
- Task --> End If.
That's it! Now when you shake your phone, your brightness will toggle between maximum and whatever it is you had before you switched to the maximum.