Repository navigation
Initial Add of Night Mode for a133p devices - #1898
michstmatt wants to merge 7 commits into
Conversation
chrisj951
left a comment
There was a problem hiding this comment.
This PR mainly looks good for me but i'd like an option in the menu to toggle between night mode on/off instead of physical toggle only.
Otherwise this setting will show up but only work on devices with physical switches unless I am misunderstanding.
| ) | ||
| ) | ||
|
|
||
| option_list.append( |
There was a problem hiding this comment.
Actually to keep it simple just wrap this in
if Device.get_device().supports_night_mode_settings()
And set it to false in devicecommon and true into the a133p devices. We can expand from there
|
Thanks! I noticed that silent mode and quiet mode don’t have the ability either to be enabled from the UI. I could see a couple options: 1 it could be its own setting for night mode (on / off) or 2 a mode selector (Quiet Mode, Silent Mode, Night Mode). Eventually there could be user defined modes |
Yeah for now add the simple if i posted and we can expand from there. That way the pr doesnt get too large |
|
updated to enable on a133p devices |
|
The magicx devices don't have a switch, can you leave them not implementing an override please |
|
Sure I’ll update that. One thing will be an issue which is the current display and backlight controls, most device providers update the display directly. This causes 2 issues 1 is with night mode on, the current display settings reflect night mode because it reads directly from the device and allows you to update the device. Issue 2 is resume from sleep. I think the right solution is to keep both display values for normal and night mode in the config. Updating the UI settings updates the config. This would be more desired state config so we’d just need to reconcile this state but I think we can handle that. Specifically the display settings would only update the display if the device is in normal mode, similarly with night mode. On boot/UI reload we should update the devices display setting so it’s consistent with what’s in the config json |
|
I went ahead and made night mode a UI first experience. It supports all devices by defining two sets of display parameters, basically day and night mode. Each sub display entity is only updated if the system supports it. For the hardware toggle, I put it behind the device feature flag. Not sure if this is controversial but I felt like it was weird to have only backlight on the main settings screen, so I promoted display settings to where backlight was, and added the night mode switch and settings there. |
Only backlight is there because it's the main one people will change regularly. The others are tweaked once, if at all, by most users so they're left further back in the settings to keep the main page as a quicker access point, with less used ones in deeper menus |
Inspired by NextUI, this adds a Night Mode action for the TrimUI Brick. Toggling it sets the display settings to pre configured values. These values are updated via a new extra settings menu option. When the toggle is o
n it saves current display settings to a temp location where they will be restored back when the toggle is off.
Screen Shots