-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a28897f
commit 01c7a89
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# pylint: disable=C0111,R0903 | ||
|
||
"""Creates an empty widget that changes width on a timer, | ||
to reduce changes o OLED burn-in from other bumblebee modules | ||
contributed by `TheEdgeOfRage <https://github.com/TheEdgeOfRage>`_ - many thanks! | ||
""" | ||
|
||
import core.module | ||
import core.widget | ||
import core.decorators | ||
|
||
|
||
class Module(core.module.Module): | ||
@core.decorators.every(minutes=1) | ||
def __init__(self, config, theme): | ||
super().__init__(config, theme, core.widget.Widget(self.content)) | ||
self.__offset = 0 | ||
|
||
def content(self, _): | ||
return self.__offset * " " | ||
|
||
def update(self): | ||
self.__offset = (self.__offset + 1) % 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import pytest | ||
|
||
def test_load_module(): | ||
__import__("modules.contrib.oled_offset") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -742,5 +742,8 @@ | |
}, | ||
"power-profile": { | ||
"prefix": "\uF2C1" | ||
}, | ||
"oled_offset": { | ||
"padding": "" | ||
} | ||
} |