2022-01-20 19:14:17 +00:00
# Light Switch Widget
2022-01-21 18:28:29 +00:00
Whis this widget I wanted to create a solution to quickly en-/disable the LCD backlight and even change the brightness.
In addition it shows the lock status with the option to personalize the lock icon with a tiny image.
2022-01-20 19:14:17 +00:00
2022-01-22 10:13:04 +00:00
---
2022-01-22 10:20:09 +00:00
### Control
---
2022-01-21 18:28:29 +00:00
* __On / off__
Single touch the widget to en-/disable the backlight.
* __Change brightness__ _(can be disabled)_
First touch the widget and then retouch the screen and drag up/down until you reach your wished brigthness.
* __Double tap to flash backlight__ _(can be disabled)_
By defaut you can double tap on the right side of your bangle to flash the backlight for a short duration.
(While the backlight is active your bangle will be unlocked.)
* __Double tap to unlock__ _(disabled by default)_
If a side is defined in the app settings, your bangle will be unlocked if you double tab on that side.
2022-01-20 19:14:17 +00:00
2022-01-22 10:13:04 +00:00
---
2022-01-22 10:20:09 +00:00
### Settings
---
#### Widget - Change the apperance of the widget:
2022-01-21 18:28:29 +00:00
* __Bulb col__
2022-01-21 19:20:53 +00:00
_red_ / _yellow_ / _green_ / __cyan__ / _blue_ / _magenta_
2022-01-20 19:14:17 +00:00
Define the color used for the lightbulbs inner circle.
2022-01-21 18:28:29 +00:00
The selected color will be dimmed depending on the actual brightness value.
* __Image__
2022-01-21 19:20:53 +00:00
__defaut__ / _random_ / _..._
2022-01-20 19:14:17 +00:00
Set your favourite lock icon image. (If no image file is found _no image_ will be displayed.)
* _random_ -> Select a random image on each time the widget is drawn.
2022-01-22 10:20:09 +00:00
#### Control - Change when and how to use the widget:
2022-01-21 18:28:29 +00:00
* __Touch__
2022-01-21 19:20:53 +00:00
_on def clk_ / _on all clk_ / _clk+setting_ / _clk+launch_ / _except apps_ / __always on__
2022-01-21 18:28:29 +00:00
Select when touching the widget is active to en-/disable the backlight.
2022-01-20 19:14:17 +00:00
* _on def clk_ -> only on your selected main clock face
* _on all clk_ -> on all apps of the type _clock_
2022-01-21 18:28:29 +00:00
* _clk+setting_ -> on all apps of the type _clock_ and in the settings
* _clk+launch_ -> on all apps of the types _clock_ and _launch_
* _except apps_ -> on all apps of the types _clock_ and _launch_ and in the settings
* _always on_ -> always enabled when the widget is displayed
* __Drag Delay__
2022-01-21 19:20:53 +00:00
_off_ / _50ms_ / _100ms_ / _..._ / __500ms__ / _..._ / _1000ms_
2022-01-21 18:28:29 +00:00
Change the maximum delay between first touch and retouch/drag to change the brightness or disable changing the brightness completely.
* __Min Value__
2022-01-21 19:20:53 +00:00
_1%_ / _2%_ / _..._ / __10%__ / _..._ / _100%_
2022-01-21 18:28:29 +00:00
Set the minimal level of brightness you can change to.
2022-01-22 10:20:09 +00:00
#### Unlock - Set double tap side to unlock:
2022-01-21 18:28:29 +00:00
* __TapSide__
2022-01-21 19:20:53 +00:00
__off__ / _left_ / _right_ / _top_ / _bottom_ / _front_ / _back_
2022-01-21 18:28:29 +00:00
2022-01-22 10:20:09 +00:00
#### Flash - Change if and how to flash the backlight:
2022-01-21 18:28:29 +00:00
* __TapSide__
2022-01-21 19:20:53 +00:00
_off_ / _left_ / __right__ / _top_ / _bottom_ / _front_ / _back_
2022-01-21 18:28:29 +00:00
Set the side to double tap on to flash the backlight or disable completely.
* __Tap__
2022-01-21 19:20:53 +00:00
_on locked_ / _on unlocked_ / __always on__
2022-01-21 18:28:29 +00:00
Select when a double tap is recognised.
* __Timeout__
2022-01-21 19:20:53 +00:00
_0.5s_ / _1s_ / _..._ / __2s__ / _..._ / _10s_
2022-01-21 18:28:29 +00:00
Change how long the backlight will be activated on a flash.
* __Min Value__
2022-01-21 19:20:53 +00:00
_1%_ / _2%_ / _..._ / __20%__ / _..._ / _100%_
2022-01-21 18:28:29 +00:00
Set the minimal level of brightness for the backlight on a flash.
2022-01-22 10:13:04 +00:00
---
2022-01-22 10:20:09 +00:00
### Images
---
Examples in default light and dark theme.
2022-01-21 18:28:29 +00:00
2022-01-22 10:11:54 +00:00
| - Lightbulb (full/dimmed/off) - | - Default lock icon (on/off) - |
2022-01-21 19:03:10 +00:00
|:---------------------------:|:--------------------------:|
|  |  |
2022-01-21 18:28:29 +00:00
2022-01-22 10:20:09 +00:00
The following images are stored in a seperate file _(lightswitch.images.json)_ :
2022-01-22 10:11:54 +00:00
| - Lock (on/off) - | - Heart - | - Invader - | - JS - | - Smiley - | - Skull - | - Storm - |
2022-01-21 19:03:10 +00:00
|:-------------:|:-----:|:-------:|:--:|:------:|:-----:|:-----:|
|  |  |  |  |  |  |  |
2022-01-21 18:28:29 +00:00
2022-01-22 10:13:04 +00:00
---
2022-01-22 10:20:09 +00:00
### Worth Mentioning
---
#### To do list
2022-01-22 10:11:54 +00:00
* Catch the touch and draw input related to this widget to prevent actions in the active app.
_(For now I have no idea how to achieve this, help is appreciated)_
2022-01-21 18:28:29 +00:00
* Manage images for the lock icon through a _Customize and Upload App_ page.
2022-01-22 10:20:09 +00:00
#### Requests, Bugs and Feedback
2022-01-21 18:28:29 +00:00
Please leave requests and bug reports by raising an issue at [github.com/storm64/BangleApps ](https://github.com/storm64/BangleApps ) or send me a [mail ](mailto:banglejs@storm64.de ).
2022-01-22 10:20:09 +00:00
#### Thanks
2022-01-22 10:11:54 +00:00
Huge thanks to Gordon Williams and all the motivated developers.
2022-01-21 18:28:29 +00:00
2022-01-22 10:20:09 +00:00
#### Creator
2022-01-21 18:28:29 +00:00
Storm64 ([Mail](mailto:banglejs@storm64.de), [github ](https://github.com/storm64 ))
2022-01-22 10:20:09 +00:00
#### License
2022-01-21 18:28:29 +00:00
[MIT License ](LICENSE )