1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Adds the Weather module to the documentation

This commit is contained in:
Chris Cummer 2018-05-09 11:56:27 -07:00
parent decc8cd5e5
commit 25430c228d
28 changed files with 314 additions and 39 deletions

View File

@ -31,5 +31,5 @@ Available modules:
<li><a href="/posts/modules/security">Security</a>
<li><a href="/posts/modules/textfile">Text File</a>
<li><a href="/posts/modules/todo" class="disabled">Todo</a>
<li><a href="/posts/modules/weather" class="disabled">Weather</a>
<li><a href="/posts/modules/weather">Weather</a>
</ul>

View File

@ -22,12 +22,11 @@ None.
## Keyboard Commands
<span class="caption">Key:</span> `h` <br />
<span class="caption">Key:</span> `/` <br />
<span class="caption">Action:</span> Open/close the widget's help window.
<span class="caption">Key:</span> `o` <br />
<span class="caption">Action:</span> Opens the text file in whichever
text editor is associated with that file type.
<span class="caption">Action:</span> Opens the text file in whichever text editor is associated with that file type.
## Configuration

View File

@ -0,0 +1,59 @@
---
title: "Weather"
date: 2018-05-09T11:44:13-07:00
draft: false
---
## Description
## Source Code
```bash
wtf/weather/
```
## Required ENV Variables
<span class="caption">Key:</span> `WTF_OWM_API_KEY` <br />
<span class="caption">Action:</span> Your <a href="https://openweathermap.org/appid">OpenWeatherMap API</a> key.
## Keyboard Commands
<span class="caption">Key:</span> `/` <br />
<span class="caption">Action:</span> Open/close the widget's help window.
<span class="caption">Key:</span> `h` <br />
<span class="caption">Action:</span> Show the previous weather location.
<span class="caption">Key:</span> `l` <br />
<span class="caption">Action:</span> Show the next weather location.
<span class="caption">Key:</span> `←` <br />
<span class="caption">Action:</span> Show the previous weather location.
<span class="caption">Key:</span> `→` <br />
<span class="caption">Action:</span> Show the next weather location.
## Configuration
```yaml
weather:
cityids:
- 6173331
- 3128760
- 6167865
- 6176823
colors:
current: "lightblue"
enabled: true
language: "EN"
position:
top: 0
left: 2
height: 1
width: 1
refreshInterval: 900
tempUnit: "C"
```
### Attributes

View File

@ -28,7 +28,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -18,7 +18,7 @@ span.caption {
display: inline-block;
font-weight: bold;
margin-right: 4px;
min-width: 50px;
min-width: 58px;
text-align: right;
}

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -70,7 +70,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -18,7 +18,7 @@ span.caption {
display: inline-block;
font-weight: bold;
margin-right: 4px;
min-width: 50px;
min-width: 58px;
text-align: right;
}

View File

@ -69,7 +69,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -6,11 +6,26 @@
<description>Recent content on WTF</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 09 May 2018 11:13:11 -0700</lastBuildDate>
<lastBuildDate>Wed, 09 May 2018 11:44:13 -0700</lastBuildDate>
<atom:link href="http://wtfutil.com/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Weather</title>
<link>http://wtfutil.com/posts/modules/weather/</link>
<pubDate>Wed, 09 May 2018 11:44:13 -0700</pubDate>
<guid>http://wtfutil.com/posts/modules/weather/</guid>
<description> Description Source Code wtf/weather/ Required ENV Variables Key: WTF_OWM_API_KEY Action: Your OpenWeatherMap API key.
Keyboard Commands Key: / Action: Open/close the widget&amp;rsquo;s help window.
Key: h Action: Show the previous weather location.
Key: l Action: Show the next weather location.
Key: ← Action: Show the previous weather location.
Key: → Action: Show the next weather location.
Configuration weather: cityids: - 6173331 - 3128760 - 6167865 - 6176823 colors: current: &amp;quot;lightblue&amp;quot; enabled: true language: &amp;quot;EN&amp;quot; position: top: 0 left: 2 height: 1 width: 1 refreshInterval: 900 tempUnit: &amp;quot;C&amp;quot; Attributes </description>
</item>
<item>
<title>Textfile</title>
<link>http://wtfutil.com/posts/modules/textfile/</link>
@ -19,7 +34,7 @@
<guid>http://wtfutil.com/posts/modules/textfile/</guid>
<description>Description Displays the contents of the specified text file in the widget.
Source Code wtf/textfile/ Required ENV Variables None.
Keyboard Commands Key: h Action: Open/close the widget&amp;rsquo;s help window.
Keyboard Commands Key: / Action: Open/close the widget&amp;rsquo;s help window.
Key: o Action: Opens the text file in whichever text editor is associated with that file type.
Configuration textfile: enabled: true filename: &amp;quot;notes.md&amp;quot; position: top: 5 left: 4 height: 2 width: 1 refreshInterval: 15 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen.</description>
</item>

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -70,7 +70,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
@ -89,6 +89,13 @@
<h1 class="title">Posts</h1>
<ul class="posts">
<li>
<span>
<a href="http://wtfutil.com/posts/modules/weather/">Weather</a>
<time class="pull-right post-list">May 09, 2018</time>
</span>
</li><li>
<span>
<a href="http://wtfutil.com/posts/modules/textfile/">Textfile</a>

View File

@ -6,11 +6,26 @@
<description>Recent content in Posts on WTF</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 09 May 2018 11:13:11 -0700</lastBuildDate>
<lastBuildDate>Wed, 09 May 2018 11:44:13 -0700</lastBuildDate>
<atom:link href="http://wtfutil.com/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Weather</title>
<link>http://wtfutil.com/posts/modules/weather/</link>
<pubDate>Wed, 09 May 2018 11:44:13 -0700</pubDate>
<guid>http://wtfutil.com/posts/modules/weather/</guid>
<description> Description Source Code wtf/weather/ Required ENV Variables Key: WTF_OWM_API_KEY Action: Your OpenWeatherMap API key.
Keyboard Commands Key: / Action: Open/close the widget&amp;rsquo;s help window.
Key: h Action: Show the previous weather location.
Key: l Action: Show the next weather location.
Key: ← Action: Show the previous weather location.
Key: → Action: Show the next weather location.
Configuration weather: cityids: - 6173331 - 3128760 - 6167865 - 6176823 colors: current: &amp;quot;lightblue&amp;quot; enabled: true language: &amp;quot;EN&amp;quot; position: top: 0 left: 2 height: 1 width: 1 refreshInterval: 900 tempUnit: &amp;quot;C&amp;quot; Attributes </description>
</item>
<item>
<title>Textfile</title>
<link>http://wtfutil.com/posts/modules/textfile/</link>
@ -19,7 +34,7 @@
<guid>http://wtfutil.com/posts/modules/textfile/</guid>
<description>Description Displays the contents of the specified text file in the widget.
Source Code wtf/textfile/ Required ENV Variables None.
Keyboard Commands Key: h Action: Open/close the widget&amp;rsquo;s help window.
Keyboard Commands Key: / Action: Open/close the widget&amp;rsquo;s help window.
Key: o Action: Opens the text file in whichever text editor is associated with that file type.
Configuration textfile: enabled: true filename: &amp;quot;notes.md&amp;quot; position: top: 5 left: 4 height: 2 width: 1 refreshInterval: 15 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen.</description>
</item>

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
@ -128,7 +128,7 @@ display in the &ldquo;Clocks&rdquo; widget.</p>
<li><a href="/posts/modules/security">Security</a>
<li><a href="/posts/modules/textfile">Text File</a>
<li><a href="/posts/modules/todo" class="disabled">Todo</a>
<li><a href="/posts/modules/weather" class="disabled">Weather</a>
<li><a href="/posts/modules/weather">Weather</a>
</ul>
</div>

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -68,7 +68,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
@ -120,12 +120,11 @@
<h2 id="keyboard-commands">Keyboard Commands</h2>
<p><span class="caption">Key:</span> <code>h</code> <br />
<p><span class="caption">Key:</span> <code>/</code> <br />
<span class="caption">Action:</span> Open/close the widget&rsquo;s help window.</p>
<p><span class="caption">Key:</span> <code>o</code> <br />
<span class="caption">Action:</span> Opens the text file in whichever
text editor is associated with that file type.</p>
<span class="caption">Action:</span> Opens the text file in whichever text editor is associated with that file type.</p>
<h2 id="configuration">Configuration</h2>

View File

@ -0,0 +1,168 @@
<!DOCTYPE html>
<html lang="en-us" class="wf-firasans-n4-active wf-active">
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Enable responsiveness on mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<meta name="generator" content="Hugo 0.38.2" />
<title>Weather | WTF</title>
<meta content="Weather - WTF" property="og:title">
<meta content=" - " property="og:description">
<!-- CSS -->
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i|Roboto+Mono:300,300i,400,400i" rel="stylesheet">
<link rel="stylesheet" href="http://wtfutil.com/css/print.css" media="print">
<link rel="stylesheet" href="http://wtfutil.com/css/poole.css">
<link rel="stylesheet" href="http://wtfutil.com/css/hyde.css">
<link rel="stylesheet" href="http://wtfutil.com/css/wtf.css">
<!-- Font-Awesome -->
<script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js" integrity="sha384-8iPTk2s/jMVj81dnzb/iFR2sdA7u06vHJyyLlAd4snFpCl/SnyUjRrbdJsw1pGIl" crossorigin="anonymous"></script>
<!-- Customised CSS -->
<link rel="stylesheet" href="http://wtfutil.com/css/custom.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.png">
<script async defer src="https://buttons.github.io/buttons.js"></script>
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about text-center">
<a href="http://wtfutil.com/"> <img src="/img/wtf.png" alt="WFT Logo" class="" width=""> </a>
<p class="lead">
</p>
</div>
<div>
<h3 style="color: white;">Content</h3>
<ul style="list-style-type: none;">
<li class="sidebar-list-item-1"><a href="/posts/installation/" class="disabled">Installation</a></li>
<li class="sidebar-list-item-1"><a href="/posts/configuration/">Configuration</a></li>
</ul>
<ul style="list-style-type: none;">
<li class="sidebar-list-item-1"><a href="/posts/modules/">Modules</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/git/" class="disabled">Git</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/github/" class="disabled">Github</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/" class="disabled">Google Calendar</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/" class="disabled">Jira</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>
<p class="copyright">
&copy; 2018 Chris Cummer.
<br />
<a href="https://creativecommons.org/licenses/by/4.0">Some Rights Reserved</a>.
</p>
<p class="copyright">
Built with <a href="https://gohugo.io/">Hugo</a> &amp; <a href="https://github.com/htr3n/hyde-hyde">hyde-hyde</a>.
</p>
</div>
</div>
<div class="content container">
<div class="post">
<h1>Weather</h1>
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
<i class="fas fa-calendar-alt"></i> May 09, 2018
<br/>
<i class="fas fa-clock"></i> 1 min read
</span>
</div>
<h2 id="description">Description</h2>
<h2 id="source-code">Source Code</h2>
<pre><code class="language-bash">wtf/weather/
</code></pre>
<h2 id="required-env-variables">Required ENV Variables</h2>
<p><span class="caption">Key:</span> <code>WTF_OWM_API_KEY</code> <br />
<span class="caption">Action:</span> Your <a href="https://openweathermap.org/appid">OpenWeatherMap API</a> key.</p>
<h2 id="keyboard-commands">Keyboard Commands</h2>
<p><span class="caption">Key:</span> <code>/</code> <br />
<span class="caption">Action:</span> Open/close the widget&rsquo;s help window.</p>
<p><span class="caption">Key:</span> <code>h</code> <br />
<span class="caption">Action:</span> Show the previous weather location.</p>
<p><span class="caption">Key:</span> <code>l</code> <br />
<span class="caption">Action:</span> Show the next weather location.</p>
<p><span class="caption">Key:</span> <code></code> <br />
<span class="caption">Action:</span> Show the previous weather location.</p>
<p><span class="caption">Key:</span> <code></code> <br />
<span class="caption">Action:</span> Show the next weather location.</p>
<h2 id="configuration">Configuration</h2>
<pre><code class="language-yaml">weather:
cityids:
- 6173331
- 3128760
- 6167865
- 6176823
colors:
current: &quot;lightblue&quot;
enabled: true
language: &quot;EN&quot;
position:
top: 0
left: 2
height: 1
width: 1
refreshInterval: 900
tempUnit: &quot;C&quot;
</code></pre>
<h3 id="attributes">Attributes</h3>
</div>
<div class="footer">
</div>
</div>
</body>
</html>

View File

@ -2,6 +2,11 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>http://wtfutil.com/posts/modules/weather/</loc>
<lastmod>2018-05-09T11:44:13-07:00</lastmod>
</url>
<url>
<loc>http://wtfutil.com/posts/modules/textfile/</loc>
<lastmod>2018-05-09T11:13:11-07:00</lastmod>
@ -54,7 +59,7 @@
<url>
<loc>http://wtfutil.com/posts/</loc>
<lastmod>2018-05-09T11:13:11-07:00</lastmod>
<lastmod>2018-05-09T11:44:13-07:00</lastmod>
<priority>0</priority>
</url>
@ -65,7 +70,7 @@
<url>
<loc>http://wtfutil.com/</loc>
<lastmod>2018-05-09T11:13:11-07:00</lastmod>
<lastmod>2018-05-09T11:44:13-07:00</lastmod>
<priority>0</priority>
</url>

View File

@ -70,7 +70,7 @@
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/" class="disabled">Todo</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/" class="disabled">Weather</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
</ul>
</div>

View File

@ -16,7 +16,7 @@ var Config *config.Config
const helpText = `
Keyboard commands for Textfile:
h: Show/hide this help window
/: Show/hide this help window
o: Open the text file in the operating system
`
@ -70,7 +70,7 @@ func (widget *Widget) Refresh() {
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
switch string(event.Rune()) {
case "h":
case "/":
widget.showHelp()
return nil
case "o":

View File

@ -18,7 +18,7 @@ var Config *config.Config
const helpText = `
Keyboard commands for Todo:
h: Show/hide this help window
/: Show/hide this help window
j: Select the next item in the list
k: Select the previous item in the list
n: Create a new list item
@ -110,7 +110,7 @@ func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
widget.persist()
widget.display()
return nil
case "h":
case "/":
widget.showHelp()
return nil
case "j":

View File

@ -17,10 +17,12 @@ var Config *config.Config
const helpText = `
Keyboard commands for Weather:
h: Show/hide this help window
/: Show/hide this help window
h: Previous weather location
l: Next weather location
arrow right: Next weather location
arrow left: Previous weather location
arrow right: Next weather location
`
// Widget is the container for weather data.
@ -214,9 +216,15 @@ func (widget *Widget) icon(data *owm.CurrentWeatherData) string {
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
switch string(event.Rune()) {
case "h":
case "/":
widget.showHelp()
return nil
case "h":
widget.Prev()
return nil
case "l":
widget.Next()
return nil
}
switch event.Key() {

View File

@ -12,7 +12,7 @@ const modalHeight = 22
func NewBillboardModal(text string, closeFunc func()) *tview.Frame {
keyboardIntercept := func(event *tcell.EventKey) *tcell.EventKey {
switch string(event.Rune()) {
case "h":
case "/":
closeFunc()
return nil
}