mirror of https://github.com/espruino/BangleApps
4.5 KiB
4.5 KiB
Light Switch Widget
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.
Control
- 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.
Settings
Widget - Change the apperance of the widget:
- Bulb col
Available values: red / yellow / green / cyan / blue / magenta
Define the color used for the lightbulbs inner circle.
The selected color will be dimmed depending on the actual brightness value. - Image
Available values: defaut / random / ...
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.
Control - Change when and how to use the widget:
- Touch
Available values: on def clk / on all clk / clk+setting / clk+launch / except apps / always on
Select when touching the widget is active to en-/disable the backlight.- on def clk -> only on your selected main clock face
- on all clk -> on all apps of the type clock
- 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
Available values: off / 50ms / 100ms / ... / 500ms / ... / 1000ms
Change the maximum delay between first touch and retouch/drag to change the brightness or disable changing the brightness completely. - Min Value
Available values: 1% / 2% / ... / 10% / ... / 100%
Set the minimal level of brightness you can change to.
Unlock - Set double tap side to unlock:
- TapSide
Available values: off / left / right / top / bottom / front / back
Flash - Change if and how to flash the backlight:
- TapSide
Available values: off / left / right / top / bottom / front / back
Set the side to double tap on to flash the backlight or disable completely. - Tap
Available values: on locked / on unlocked / always on
Select when a double tap is recognised. - Timeout
Available values: 0.5s / 1s / ... / 2s / ... / 10s
Change how long the backlight will be activated on a flash. - Min Value
Available values: 1% / 2% / ... / 20% / ... / 100%
Set the minimal level of brightness for the backlight on a flash.
Images
Examples in default light and dark theme.
Lightbulb (full/dimmed/off) | Default lock icon (on/off) |
---|---|
![]() |
![]() |
The following images are stored in a seperate file (lightswitch.images.json):
Lock (on/off) | Heart | Invader | JS | Smiley | Skull | Storm |
---|---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Worth Mentioning
To do list
- Catch the touch and draw input related to this widget to prevent actions in the active app.
- Manage images for the lock icon through a Customize and Upload App page.
Requests, Bugs and Feedback
Please leave requests and bug reports by raising an issue at github.com/storm64/BangleApps or send me a mail.
Thanks
Huge thanks to Gordon Williams for this genius device.