BangleApps/apps/lightswitch
stweedo 2780575376
Change color back to black
2023-06-13 06:05:44 -05:00
..
images lightswitch: Correct misspelling in filename 2022-01-21 19:46:58 +01:00
ChangeLog lightswitch: handle and intercept swipe event 2023-05-23 21:07:02 +02:00
README.md lightswitch: tap-to-lock setting 2023-01-29 22:49:40 +00:00
boot.js lightswitch: Create boot.js 2022-01-20 10:44:12 +01:00
images.json lightswitch: Update images.json 2022-01-20 12:46:13 +01:00
lib.js lightswitch: Create lib.js 2022-01-20 10:56:11 +01:00
metadata.json lightswitch: handle and intercept swipe event 2023-05-23 21:07:02 +02:00
settings.js Fix typo, formatting, and titles not showing 2023-06-10 00:41:44 -05:00
settings.json lightswitch: masking (espruino/Espruino#2151) + oversize 2022-04-06 22:29:13 +02:00
widget.js Change color back to black 2023-06-13 06:05:44 -05:00

README.md

Light Switch Widget

With 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.

All touch and drag inputs related to this widget are cached/masked to prevent actions in the active app. (See espruino/Espruino#2151 for more information.)


Control


  • On / off Single touch the widget to en-/disable the backlight.
  • Change brightness (can be disabled) First touch the widget, then quickly touch the screen again 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 tap on that side.

Settings


Widget - Change the apperance of the widget:

  • Bulb col 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 default / 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 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
  • Oversize 0px / 1px / ... / 20px / ... / 50px To make it easier to hit the widget, this value extends the touch area of the widget in all directions.
  • Drag Delay off / 50ms / 100ms / ... / 500ms / ... / 1000ms Change the maximum delay between first touch and re-touch/drag to change the brightness or disable changing the brightness completely.
  • Min Value 1% / 2% / ... / 10% / ... / 100% Set the minimal level of brightness you can change to.
  • Tap to lock Tapping the widget locks the screen, rather than toggling brightness.

Unlock - Set double tap side to unlock:

  • TapSide off / left / right / top / bottom / front / back

Flash - Change if and how to flash the backlight:

  • TapSide off / left / right / top / bottom / front / back Set double tap side to flash the backlight or disable completely.
  • Tap on locked / on unlocked / always on Select when a double tap is recognised.
  • Timeout 0.5s / 1s / ... / 2s / ... / 10s Change how long the backlight will be activated on a flash.
  • Min Value 1% / 2% / ... / 20% / ... / 100% Set the minimal level of brightness for the backlight on a flash.

Images


Lightbulb Default lock icon
( full / dimmed / off ) ( on / off )

Examples in default light and dark theme.

Lock Heart Invader JS Smiley Skull Storm

This images are stored in a seperate file (lightswitch.images.json).


Worth Mentioning


To do list

  • 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 and all the motivated developers.

Creator

Storm64 (Mail, github)

License

MIT License