diff --git a/docs/modules/lunarphase.md b/docs/modules/lunarphase.md index bcc678f6..2ab0fa0b 100644 --- a/docs/modules/lunarphase.md +++ b/docs/modules/lunarphase.md @@ -1,19 +1,43 @@ # Lunar Phase -Displays the phase of the Moon as ASCII art from [Wttr.in](http://wttr.in). The width of the column in which the lunar phase is displayed needs to be large enough for the ASCII graphic to fit or multiple columns must be allocated. +Displays the phase of the Moon as ASCII art from [Wttr.in](http://wttr.in). ## Configuration ```yaml lunarphase: enabled: true + language: 'en' position: top: 3 left: 5 height: 2 width: 2 - language: 'en' - refreshInterval: 5h + title: 'Phase of the Moon' + timeout: 30 +``` + +The width of the column in which the lunar phase is displayed needs to be +large enough for the ASCII graphic to fit or multiple columns must be allocated. +For example: + +```yaml +grid: + columns: [74, 12] + rows: [14, 14] +``` + +The default `wtf` settings for opening a URL in a browser on Linux is +to open the URL with `xdg-open`. However, `xdg-open` depends on the KDE +`konqueror` web browser on many systems. An alternate configuration on Linux +systems where `xdg-open` fails or is unavailable may be necessary. One such +configuration uses the Gnome `gio` utility. To use `gio` to open URLs, add +the following to your `wtf` YAML configuration: + +```yaml +openUrlUtil: + - 'gio' + - 'open' ``` ## Screenshots @@ -23,5 +47,73 @@ lunarphase: lunarphase french screenshot

+## Keyboard + +To use module keyboard controls, first press the number of the module +displayed in the title of the module widget to give focus to that module. +To leave module keyboard control mode, press `Esc`. + +When using keyboard controls to change the lunar phase day, the +`lunarphase` module widget title will be updated to reflect the currently +configured lunar phase day but the module widget will not automatically refresh. +After selecting the desired day using keyboard controls, refresh the module +widget by pressing `r`. For example, to display next week's lunar phase, +press `Up Arrow` or `N` then press `r`. To view the lunar phase 2 days +previous to the current day, press `Left Arrow` or `p` twice then press `r`. + +The following keyboard controls are supported in the `lunarphase` module: + + + {% include "keyboard/table_header.md" %} + + + {% include "keyboard/foreslash.md" %} + + {% set return="Open selected day lunar phase at nineplanets.org in the browser" %} + {% include "keyboard/return.md" %} + + {% include "keyboard/spacer.md" %} + + {% set n="Display next day lunar phase" %} + {% include "keyboard/n.md" %} + + {% set p="Display previous day lunar phase" %} + {% include "keyboard/p.md" %} + + {% set t="Display today's lunar phase" %} + {% include "keyboard/t.md" %} + + {% set N="Display next week lunar phase" %} + {% include "keyboard/N.md" %} + + {% set P="Display previous week lunar phase" %} + {% include "keyboard/P.md" %} + + {% set o="Open selected day lunar phase at nineplanets.org in the browser" %} + {% include "keyboard/o.md" %} + + {% include "keyboard/r.md" %} + + {% include "keyboard/spacer.md" %} + + {% set arrowBack="Show the previous day lunar phase" %} + {% include "keyboard/arrowBack.md" %} + + {% set arrowFore="Show the next day lunar phase" %} + {% include "keyboard/arrowFore.md" %} + + {% set customArrowDown="Show previous week lunar phase" %} + {% include "keyboard/customArrowDown.md" %} + + {% set customArrowUp="Show next week lunar phase" %} + {% include "keyboard/customArrowUp.md" %} + + {% include "keyboard/spacer.md" %} + + {% set customCtrlD="Toggle disable/enable widget display" %} + {% include "keyboard/customCtrlD.md" %} + +
+ {% set src="lunarphase" %} {% include "src_path.md" %} diff --git a/docs/overrides/assets/modules/lunarphase-fr.png b/docs/overrides/assets/modules/lunarphase-fr.png index ced81ac9..a9d429e8 100644 Binary files a/docs/overrides/assets/modules/lunarphase-fr.png and b/docs/overrides/assets/modules/lunarphase-fr.png differ diff --git a/docs/overrides/assets/modules/lunarphase.png b/docs/overrides/assets/modules/lunarphase.png index 3a64f3ab..0a6c33d6 100644 Binary files a/docs/overrides/assets/modules/lunarphase.png and b/docs/overrides/assets/modules/lunarphase.png differ diff --git a/snippets/keyboard/N.md b/snippets/keyboard/N.md new file mode 100644 index 00000000..6a9e2afc --- /dev/null +++ b/snippets/keyboard/N.md @@ -0,0 +1,4 @@ + + N + {{ N }} + diff --git a/snippets/keyboard/P.md b/snippets/keyboard/P.md new file mode 100644 index 00000000..cea8bd6c --- /dev/null +++ b/snippets/keyboard/P.md @@ -0,0 +1,4 @@ + + P + {{ P }} + diff --git a/snippets/keyboard/arrowBack.md b/snippets/keyboard/arrowBack.md index 3d1b3888..80d8108d 100644 --- a/snippets/keyboard/arrowBack.md +++ b/snippets/keyboard/arrowBack.md @@ -1,6 +1,6 @@ - - - - {{ arrowback }}{{ arrowBack }} - \ No newline at end of file + + + + {{ arrowBack }} + diff --git a/snippets/keyboard/arrowFore.md b/snippets/keyboard/arrowFore.md index 7311ea8a..29d1e16d 100644 --- a/snippets/keyboard/arrowFore.md +++ b/snippets/keyboard/arrowFore.md @@ -1,6 +1,6 @@ - - - - {{ arrowfore }}{{ arrowFore }} - \ No newline at end of file + + + + {{ arrowFore }} + diff --git a/snippets/keyboard/customArrowDown.md b/snippets/keyboard/customArrowDown.md new file mode 100644 index 00000000..89be02d2 --- /dev/null +++ b/snippets/keyboard/customArrowDown.md @@ -0,0 +1,4 @@ + + + {{ customArrowDown }} + diff --git a/snippets/keyboard/customArrowUp.md b/snippets/keyboard/customArrowUp.md new file mode 100644 index 00000000..42b485ca --- /dev/null +++ b/snippets/keyboard/customArrowUp.md @@ -0,0 +1,4 @@ + + + {{ customArrowUp }} + diff --git a/snippets/keyboard/customCtrlD.md b/snippets/keyboard/customCtrlD.md new file mode 100644 index 00000000..00fac15d --- /dev/null +++ b/snippets/keyboard/customCtrlD.md @@ -0,0 +1,4 @@ + + Ctrl-d + {{ customCtrlD }} +