added readme, license, and settingsmeta
This commit is contained in:
parent
43b2e35602
commit
a22162568c
|
@ -0,0 +1,11 @@
|
|||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
|
@ -0,0 +1,31 @@
|
|||
# mycroft-meeting-mode
|
||||
|
||||
A [Mycroft.ai](https://mycroft.ai) skill to display a DO NOT DISTURB message on the GUI.
|
||||
|
||||
## Install
|
||||
|
||||
This skill isn't in the official marketplace (for now) so the best way to install it is via the command line:
|
||||
|
||||
```
|
||||
mycroft-msm install https://code.sitosis.com/rudism/mycroft-meeting-mode
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
After installing the skill configure the `dnd_image` either in the settings json or on Mycroft Home. The default is `do-not-disturb.png` which displays a built-in image stating Do Not Disturb in white text on a red background, but you can replace this with the url to any image you want.
|
||||
|
||||
## Usage Examples
|
||||
|
||||
```
|
||||
Hey Mycroft, meeting mode.
|
||||
Hey Mycroft, do not disturb.
|
||||
```
|
||||
|
||||
This will display the Do Not Disturb image on the GUI full-screen.
|
||||
|
||||
```
|
||||
Hey Mycroft, cancel meeting mode.
|
||||
Hey Mycroft, cancel do not disturb.
|
||||
```
|
||||
|
||||
This will clear the image and return Mycroft to the default idle screen.
|
|
@ -11,7 +11,12 @@ class MeetingModeSkill(MycroftSkill):
|
|||
|
||||
def __init__(self):
|
||||
super().__init__("MeetingModeSkill")
|
||||
self.dnd_image = None
|
||||
self.html_resources = "file://" + dirname(__file__) + '/res/'
|
||||
self.on_settings_changed()
|
||||
|
||||
def on_settings_changed(self):
|
||||
self.dnd_image = self.settings.get('dnd_image', 'do-not-disturb.png')
|
||||
|
||||
def initialize(self):
|
||||
self.gui.register_handler('MeetingModeSkill.doNotDisturb',
|
||||
|
@ -30,7 +35,7 @@ class MeetingModeSkill(MycroftSkill):
|
|||
<title>DO NOT DISTURB</title>
|
||||
<style>
|
||||
html {
|
||||
background: url('do-not-disturb.png') no-repeat center center fixed;
|
||||
background: url('%') no-repeat center center fixed;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
||||
|
@ -38,7 +43,7 @@ class MeetingModeSkill(MycroftSkill):
|
|||
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
""" % self.dnd_image
|
||||
self.gui.show_html(html, resource_url=self.html_resources, override_idle=True)
|
||||
|
||||
@intent_handler(IntentBuilder('handle_cancel_do_not_disturb_intent').require('cancel-do-not-disturb'))
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"skillMetadata": {
|
||||
"sections": [{
|
||||
"name": "Do Not Disturb Image",
|
||||
"fields": [{
|
||||
"name": "dnd_image",
|
||||
"type": "text",
|
||||
"label": "Location (file name or url) of the Do Not Disturb image to show.",
|
||||
"value": "do-not-disturb.png"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue