Skip to content

Commit

Permalink
Merge pull request #36 from OpenVoiceOS/release-1.0.0a1
Browse files Browse the repository at this point in the history
Release 1.0.0a1
  • Loading branch information
JarbasAl authored Sep 18, 2024
2 parents 2c19374 + 87c5365 commit c5c1fe5
Show file tree
Hide file tree
Showing 14 changed files with 450 additions and 505 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/unit_tests.yml

This file was deleted.

70 changes: 9 additions & 61 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,22 @@
# Changelog

## [0.0.1a7](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/tree/0.0.1a7) (2024-09-11)
## [1.0.0a1](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/tree/1.0.0a1) (2024-09-18)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/compare/0.0.1a6...0.0.1a7)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/compare/0.0.1...1.0.0a1)

**Fixed bugs:**

- drop .config/OvosDisplay.conf [\#30](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/issues/30)

**Closed issues:**

- Neon.yaml being over-written [\#29](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/issues/29)
**Breaking changes:**

**Merged pull requests:**

- semver [\#33](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/pull/33) ([JarbasAl](https://github.com/JarbasAl))

## [0.0.1a6](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/tree/0.0.1a6) (2024-06-13)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/compare/0.0.1a5...0.0.1a6)
- fix!:trigger build [\#35](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/pull/35) ([JarbasAl](https://github.com/JarbasAl))
- bug/fix everything around brightness/nightmode... [\#31](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/pull/31) ([JarbasAl](https://github.com/JarbasAl))

**Fixed bugs:**

- \[BUG\] Wallpaper\(s\) are not being rotated through [\#27](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/issues/27)
- Update wallpaper rotation to handle changes from GUI [\#25](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/pull/25) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.0.1a5](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/tree/0.0.1a5) (2024-01-31)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/compare/0.0.1a4...0.0.1a5)

**Fixed bugs:**

- fix/version\_string [\#20](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/pull/20) ([JarbasAl](https://github.com/JarbasAl))

## [0.0.1a4](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/tree/0.0.1a4) (2024-01-03)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/compare/0.0.1a3...0.0.1a4)

**Merged pull requests:**

- Remove unused methods apparently leftover from a previous implementation [\#18](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/pull/18) ([NeonDaniel](https://github.com/NeonDaniel))
- get rid of OvosDisplay.conf [\#26](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/issues/26)

## [0.0.1a3](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/tree/0.0.1a3) (2024-01-03)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/compare/0.0.1a2...0.0.1a3)

**Fixed bugs:**

- Resolve vcgencmd path errors [\#17](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/pull/17) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.0.1a2](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/tree/0.0.1a2) (2024-01-03)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/compare/0.0.1a1...0.0.1a2)

**Fixed bugs:**

- vcgencmd binary not in previous location [\#12](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/issues/12)

**Merged pull requests:**

- check if vcgencmd and ddcutil exists [\#14](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/pull/14) ([denics](https://github.com/denics))

## [0.0.1a1](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/tree/0.0.1a1) (2023-12-30)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/compare/0.0.0...0.0.1a1)

**Fixed bugs:**
**Closed issues:**

- notification gui model - weird things [\#15](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/issues/15)
- filter notification data [\#16](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/pull/16) ([emphasize](https://github.com/emphasize))
- Source from PyPI not installable because of missing requirements.txt file [\#28](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/issues/28)
- Missing vcgencmd or ddcutil [\#23](https://github.com/OpenVoiceOS/ovos-gui-plugin-shell-companion/issues/23)



Expand Down
56 changes: 49 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,61 @@
# OVOS Shell companion

provides various bus APIs that integrate with ovos-shell
provides various bus APIs that integrate with [ovos-shell](https://github.com/OpenVoiceOS/ovos-shell)

- color scheme manager
- notifications widgets
- configuration provider (settings UI)
- brightness control (night mode etc)


these used to be several individual plugins but they all are ovos-shell specific integrations and ovos-shell requires all of them, so they have been unified
## Features

```json
{
"gui": {
"ovos-gui-plugin-shell-companion": {
"sunrise_time": "auto",
"sunset_time": "auto",
"default_brightness": 100,
"night_default_brightness": 70,
"low_brightness": 20,
"auto_dim_seconds": 60,
"auto_dim": false,
"auto_nightmode": false
}
}
}
```


### Night mode

night mode will perform actions based on sunset/sunrise times

- the homescreen changes to a simple clock with white text on a black background.
- default brightness is reduced.
- auto-dim is enabled

`sunrise_time` and `sunset_time` will be automatically calculated based on location if set to `"auto"`, specific times can be explicitly set with the format `"HH:MM"`, eg. if you are an early riser you may want `"sunrise_time": "05:30"`

brightness level during nighttime can be set via `"night_default_brightness"`

### Auto Dim

auto-dim will lower the screen brightness after 60 seconds of inactivity, until the user interacts with the GUI or talks to the OVOS device

brightness level when idle can be set via `"low_brightness"`

auto-dim can be enabled at all times by setting `"auto_dim": true` in your config


## DEPRECATION WARNING

> in **ovos-core version 0.0.7** the bus apis provided by this repo used to be several individual PHAL plugins
the following packages have been deprecated in favor of this repo:
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-dashboard <- DEPRECATED, community maintained, no official replacement, [removed from ovos-shell](https://github.com/OpenVoiceOS/ovos-gui/pull/10)
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-configuration-provider
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-notification-widgets
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-brightness-control-rpi
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-color-scheme-manager
- [ovos-PHAL-plugin-dashboard](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-dashboard) <- DEPRECATED, community maintained, no official replacement, [removed from ovos-shell](https://github.com/OpenVoiceOS/ovos-gui/pull/10)
- [ovos-PHAL-plugin-configuration-provider](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-configuration-provider) <- now part of this repo
- [ovos-PHAL-plugin-notification-widgets](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-notification-widgets) <- now part of this repo
- [ovos-PHAL-plugin-brightness-control-rpi](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-brightness-control-rpi) <- now part of this repo
- [ovos-PHAL-plugin-color-scheme-manager](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-color-scheme-manager) <- now part of this repo
38 changes: 19 additions & 19 deletions ovos_gui_plugin_shell_companion/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import platform

from os.path import join, dirname
from ovos_bus_client.client import MessageBusClient

from ovos_bus_client import Message
from ovos_utils import network_utils
from ovos_bus_client.apis.gui import GUIInterface
from ovos_utils.log import LOG
from ovos_bus_client.client import MessageBusClient
from ovos_config.config import Configuration
from ovos_plugin_manager.templates.gui import GUIExtension
from ovos_utils import network_utils
from ovos_utils.log import LOG

from ovos_gui_plugin_shell_companion.brightness import BrightnessManager
from ovos_gui_plugin_shell_companion.color_manager import ColorManager
from ovos_gui_plugin_shell_companion.config import get_ovos_shell_config
from ovos_gui_plugin_shell_companion.cui import ConfigUIManager
from ovos_gui_plugin_shell_companion.helpers import ConfigUIManager
from ovos_gui_plugin_shell_companion.wigets import WidgetManager
from ovos_plugin_manager.templates.gui import GUIExtension


class OVOSShellCompanionExtension(GUIExtension):
Expand Down Expand Up @@ -44,13 +43,12 @@ def __init__(self, config: dict, bus: MessageBusClient = None,
LOG.info("OVOS Shell: Initializing")
super().__init__(config=config, bus=bus, gui=gui,
preload_gui=preload_gui, permanent=permanent)
self.local_display_config = get_ovos_shell_config()
self.about_page_data = []
self.build_initial_about_page_data()

self.color_manager = ColorManager(self.bus)
self.widgets = WidgetManager(self.bus)
self.bright = BrightnessManager(self.bus)
self.bright = BrightnessManager(self.bus, self.config)
self.cui = ConfigUIManager(self.bus)

def register_bus_events(self):
Expand Down Expand Up @@ -81,7 +79,7 @@ def register_bus_events(self):
self.handle_display_auto_nightmode_config_set)

def handle_remove_namespace(self, message):
LOG.info("Got Clear Namespace Event In Skill")
LOG.debug("Clearing namespace (mycroft.gui.screen.close)")
get_skill_namespace = message.data.get("skill_id", "")
if get_skill_namespace:
self.bus.emit(Message("gui.clear.namespace",
Expand Down Expand Up @@ -139,11 +137,11 @@ def handle_device_display_factory(self, message):
self.gui.show_page("SYSTEM_AdditionalSettings.qml", override_idle=True)

def handle_device_display_settings(self, message):
LOG.debug(f"Display settings: {self.local_display_config}")
LOG.debug(f"Display settings: {self.config}")
self.gui['state'] = 'settings/display_settings'
# wallpaper_rotation data is determined via Messagebus in Qt directly
self.gui['display_auto_dim'] = self.local_display_config.get("auto_dim", False)
self.gui['display_auto_nightmode'] = self.local_display_config.get("auto_nightmode", False)
self.gui['display_auto_dim'] = self.config.get("auto_dim", False)
self.gui['display_auto_nightmode'] = self.config.get("auto_nightmode", False)
self.gui.show_page("SYSTEM_AdditionalSettings.qml", override_idle=True)

def handle_device_about_page(self, message):
Expand All @@ -156,15 +154,17 @@ def handle_device_about_page(self, message):

def handle_display_auto_dim_config_set(self, message):
auto_dim = message.data.get("auto_dim", False)
self.local_display_config["auto_dim"] = auto_dim
self.local_display_config.store()
self.bus.emit(Message("speaker.extension.display.auto.dim.changed"))
if auto_dim:
self.bright.start_auto_dim()
else:
self.bright.stop_auto_dim()

def handle_display_auto_nightmode_config_set(self, message):
auto_nightmode = message.data.get("auto_nightmode", False)
self.local_display_config["auto_nightmode"] = auto_nightmode
self.local_display_config.store()
self.bus.emit(Message("speaker.extension.display.auto.nightmode.changed"))
if auto_nightmode:
self.bright.start_auto_night_mode()
else:
self.bright.stop_auto_night_mode()

def display_advanced_config_for_group(self, message=None):
group_meta = message.data.get("settingsMetaData")
Expand Down
Loading

0 comments on commit c5c1fe5

Please sign in to comment.