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

Additional data into documentation

This commit is contained in:
Chris Cummer 2018-05-09 17:06:19 -07:00
parent 25430c228d
commit a757a01963
33 changed files with 465 additions and 47 deletions

View File

@ -45,4 +45,4 @@ wouldn't want to have laying about in the config files.
For modules that require them, the name of the required environment
variable(s) can be found in that module's "Required ENV Variables"
section of the documentation. See <a href="/posts/modules/opgenie/">OpsGenie</a> for an example.
section of the documentation. See <a href="/posts/modules/opsgenie/">OpsGenie</a> for an example.

View File

@ -22,7 +22,7 @@ Available modules:
<ul class="list-bare">
<li><a href="/posts/modules/bamboohr">BambooHR</a>
<li><a href="/posts/modules/clocks">Clocks</a>
<li><a href="/posts/modules/git" class="disabled">Git</a>
<li><a href="/posts/modules/git">Git</a>
<li><a href="/posts/modules/github" class="disabled">Github</a>
<li><a href="/posts/modules/gcal" class="disabled">Google Calendar</a>
<li><a href="/posts/modules/jira" class="disabled">Jira</a>

View File

@ -50,4 +50,4 @@ Defines where in the grid this module's widget will be displayed. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: Any positive integer, `0...n`.
Values: Any positive integer, `0..n`.

View File

@ -77,7 +77,7 @@ Defines where in the grid this module's widget will be displayed.
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: Any positive integer, `0...n`.
Values: A positive integer, `0..n`.
`sort` <br />
Defines the display order of the clocks in the widget. <br />

View File

@ -0,0 +1,89 @@
---
title: "Git"
date: 2018-05-09T14:20:48-07:00
draft: false
---
## Description
Displays information about local git repositories: branch, changed
files, and recent commits.
#### Branch
Displays the of the currently-active git branch.
#### Changed Files
Displays a list of all the files that have changed since the last
commit, and their status.
#### Recent Commits
Displays a list of `n` recent commits, who committed it, and when.
## Source Code
```bash
wtf/git/
```
## Required ENV Variables
None.
## 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 git repository.
<span class="caption">Key:</span> `l` <br />
<span class="caption">Action:</span> Show the next git repository.
<span class="caption">Key:</span> `←` <br />
<span class="caption">Action:</span> Show the previous git repository.
<span class="caption">Key:</span> `→` <br />
<span class="caption">Action:</span> Show the next git repository.
## Configuration
```yaml
git:
commitCount: 5
enabled: true
position:
top: 0
left: 3
height: 2
width: 2
refreshInterval: 8
repositories:
- "/Users/chris/go/src/github.com/senorprogrammer/wtf"
- "/Users/chris/Documents/Lendesk/core-api"
```
### Attributes
`commitCount` <br />
The number of past commits to display. <br />
Values: A positive integer, `0..n`.
`enabled` <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: `true`, `false`.
`position` <br />
Defines where in the grid this module's widget will be displayed. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, `0..n`.
`repositories` <br />
Defines which git repositories to watch. <br />
Values: A list of zero or more local file paths pointing to valid git repositories.

View File

@ -47,11 +47,11 @@ newrelic:
`applicationId` <br />
The integer ID of the New Relic application you wish to report on. <br
/>
Values: A positive integer, `0...n`.
Values: A positive integer, `0..n`.
`deployCount` <br />
The number of past deploys to display on screen. <br />
Values: A positive integer, `0...n`.
Values: A positive integer, `0..n`.
`enabled` <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
@ -62,4 +62,4 @@ Defines where in the grid this module's widget will be displayed. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, `0...n`.
Values: A positive integer, `0..n`.

View File

@ -51,4 +51,4 @@ Defines where in the grid this module's widget will be displayed. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, `0...n`.
Values: A positive integer, `0..n`.

View File

@ -69,4 +69,4 @@ Defines where in the grid this module's widget will be displayed. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: Any positive integer, `0...n`.
Values: A positive integer, `0..n`.

View File

@ -58,4 +58,4 @@ Defines where in the grid this module's widget will be displayed. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, `0...n`.
Values: A positive integer, `0..n`.

View File

@ -6,6 +6,11 @@ draft: false
## Description
Displays a configurable list of current weather report, including
current temperature, sunrise time, and sunset time.
<img src="/imgs/modules/weather.png" width="320" height="187" alt="weather screenshot" />
## Source Code
```bash
@ -38,6 +43,7 @@ wtf/weather/
```yaml
weather:
# From http://openweathermap.org/help/city_list.txt
cityids:
- 6173331
- 3128760
@ -57,3 +63,33 @@ weather:
```
### Attributes
`cityids` <br />
A list of the <a
href="http://openweathermap.org/help/city_list.txt">OpenWeatherMap city
IDs</a> for the cities you want to view. <br />
Values: A list of positive integers, `0..n`
`colors.current` <br />
The color to highlight the current temperature in. <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.
`enabled` <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: `true`, `false`.
`language` <br />
The human language in which to present the weather data. <br />
Values: Any <a href="https://openweathermap.org/current">language identifier</a> specified by OpenWeatherMap.
`position` <br />
Defines where in the grid this module's widget will be displayed. <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, `0..n`.
`tempUnit` <br />
The temperature scale in which to display temperature values. <br />
Values: `F` for Fahrenheit, `C` for Celcius.

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -19,7 +19,7 @@
<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/git/">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>

View File

@ -59,7 +59,7 @@
<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/git/">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>

View File

@ -61,7 +61,7 @@
<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/git/">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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -60,7 +60,7 @@
<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/git/">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>

View File

@ -6,24 +6,38 @@
<description>Recent content on WTF</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 09 May 2018 11:44:13 -0700</lastBuildDate>
<lastBuildDate>Wed, 09 May 2018 14:20:48 -0700</lastBuildDate>
<atom:link href="http://wtfutil.com/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Git</title>
<link>http://wtfutil.com/posts/modules/git/</link>
<pubDate>Wed, 09 May 2018 14:20:48 -0700</pubDate>
<guid>http://wtfutil.com/posts/modules/git/</guid>
<description>Description Displays information about local git repositories: branch, changed files, and recent commits.
Branch Displays the of the currently-active git branch.
Changed Files Displays a list of all the files that have changed since the last commit, and their status.
Recent Commits Displays a list of n recent commits, who committed it, and when.
Source Code wtf/git/ Required ENV Variables None.
Keyboard Commands Key: / Action: Open/close the widget&amp;rsquo;s help window.</description>
</item>
<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.
<description>Description Displays a configurable list of current weather report, including current temperature, sunrise time, and sunset time.
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>
Key: → Action: Show the next weather location.</description>
</item>
<item>

View File

@ -59,7 +59,7 @@
<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/git/">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>
@ -143,7 +143,7 @@ wouldn&rsquo;t want to have laying about in the config files.</p>
<p>For modules that require them, the name of the required environment
variable(s) can be found in that module&rsquo;s &ldquo;Required ENV Variables&rdquo;
section of the documentation. See <a href="/posts/modules/opgenie/">OpsGenie</a> for an example.</p>
section of the documentation. See <a href="/posts/modules/opsgenie/">OpsGenie</a> for an example.</p>
</div>
<div class="footer">

View File

@ -59,7 +59,7 @@
<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/git/">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>

View File

@ -61,7 +61,7 @@
<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/git/">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>
@ -89,6 +89,13 @@
<h1 class="title">Posts</h1>
<ul class="posts">
<li>
<span>
<a href="http://wtfutil.com/posts/modules/git/">Git</a>
<time class="pull-right post-list">May 09, 2018</time>
</span>
</li><li>
<span>
<a href="http://wtfutil.com/posts/modules/weather/">Weather</a>

View File

@ -6,24 +6,38 @@
<description>Recent content in Posts on WTF</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 09 May 2018 11:44:13 -0700</lastBuildDate>
<lastBuildDate>Wed, 09 May 2018 14:20:48 -0700</lastBuildDate>
<atom:link href="http://wtfutil.com/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Git</title>
<link>http://wtfutil.com/posts/modules/git/</link>
<pubDate>Wed, 09 May 2018 14:20:48 -0700</pubDate>
<guid>http://wtfutil.com/posts/modules/git/</guid>
<description>Description Displays information about local git repositories: branch, changed files, and recent commits.
Branch Displays the of the currently-active git branch.
Changed Files Displays a list of all the files that have changed since the last commit, and their status.
Recent Commits Displays a list of n recent commits, who committed it, and when.
Source Code wtf/git/ Required ENV Variables None.
Keyboard Commands Key: / Action: Open/close the widget&amp;rsquo;s help window.</description>
</item>
<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.
<description>Description Displays a configurable list of current weather report, including current temperature, sunrise time, and sunset time.
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>
Key: → Action: Show the next weather location.</description>
</item>
<item>

View File

@ -59,7 +59,7 @@
<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/git/">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>
@ -147,7 +147,7 @@ Defines where in the grid this module&rsquo;s widget will be displayed. <br /></
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: Any positive integer, <code>0...n</code>.</p>
Values: Any positive integer, <code>0..n</code>.</p>
</div>
<div class="footer">

View File

@ -59,7 +59,7 @@
<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/git/">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>
@ -175,7 +175,7 @@ Defines where in the grid this module&rsquo;s widget will be displayed.</p>
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: Any positive integer, <code>0...n</code>.</p>
Values: A positive integer, <code>0..n</code>.</p>
<p><code>sort</code> <br />
Defines the display order of the clocks in the widget. <br />

View File

@ -0,0 +1,197 @@
<!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>Git | WTF</title>
<meta content="Git - 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/">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>Git</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>
<p>Displays information about local git repositories: branch, changed
files, and recent commits.</p>
<h4 id="branch">Branch</h4>
<p>Displays the of the currently-active git branch.</p>
<h4 id="changed-files">Changed Files</h4>
<p>Displays a list of all the files that have changed since the last
commit, and their status.</p>
<h4 id="recent-commits">Recent Commits</h4>
<p>Displays a list of <code>n</code> recent commits, who committed it, and when.</p>
<h2 id="source-code">Source Code</h2>
<pre><code class="language-bash">wtf/git/
</code></pre>
<h2 id="required-env-variables">Required ENV Variables</h2>
<p>None.</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 git repository.</p>
<p><span class="caption">Key:</span> <code>l</code> <br />
<span class="caption">Action:</span> Show the next git repository.</p>
<p><span class="caption">Key:</span> <code></code> <br />
<span class="caption">Action:</span> Show the previous git repository.</p>
<p><span class="caption">Key:</span> <code></code> <br />
<span class="caption">Action:</span> Show the next git repository.</p>
<h2 id="configuration">Configuration</h2>
<pre><code class="language-yaml">git:
commitCount: 5
enabled: true
position:
top: 0
left: 3
height: 2
width: 2
refreshInterval: 8
repositories:
- &quot;/Users/chris/go/src/github.com/senorprogrammer/wtf&quot;
- &quot;/Users/chris/Documents/Lendesk/core-api&quot;
</code></pre>
<h3 id="attributes">Attributes</h3>
<p><code>commitCount</code> <br />
The number of past commits to display. <br />
Values: A positive integer, <code>0..n</code>.</p>
<p><code>enabled</code> <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: <code>true</code>, <code>false</code>.</p>
<p><code>position</code> <br />
Defines where in the grid this module&rsquo;s widget will be displayed. <br /></p>
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, <code>0..n</code>.</p>
<p><code>repositories</code> <br />
Defines which git repositories to watch. <br />
Values: A list of zero or more local file paths pointing to valid git repositories.</p>
</div>
<div class="footer">
</div>
</div>
</body>
</html>

View File

@ -59,7 +59,7 @@
<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/git/">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>
@ -119,7 +119,7 @@ display in the &ldquo;Clocks&rdquo; widget.</p>
<ul class="list-bare">
<li><a href="/posts/modules/bamboohr">BambooHR</a>
<li><a href="/posts/modules/clocks">Clocks</a>
<li><a href="/posts/modules/git" class="disabled">Git</a>
<li><a href="/posts/modules/git">Git</a>
<li><a href="/posts/modules/github" class="disabled">Github</a>
<li><a href="/posts/modules/gcal" class="disabled">Google Calendar</a>
<li><a href="/posts/modules/jira" class="disabled">Jira</a>

View File

@ -59,7 +59,7 @@
<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/git/">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>
@ -144,11 +144,11 @@ token.</p>
<p><code>applicationId</code> <br />
The integer ID of the New Relic application you wish to report on. <br
/>
Values: A positive integer, <code>0...n</code>.</p>
Values: A positive integer, <code>0..n</code>.</p>
<p><code>deployCount</code> <br />
The number of past deploys to display on screen. <br />
Values: A positive integer, <code>0...n</code>.</p>
Values: A positive integer, <code>0..n</code>.</p>
<p><code>enabled</code> <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
@ -159,7 +159,7 @@ Defines where in the grid this module&rsquo;s widget will be displayed. <br /></
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, <code>0...n</code>.</p>
Values: A positive integer, <code>0..n</code>.</p>
</div>
<div class="footer">

View File

@ -59,7 +59,7 @@
<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/git/">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>
@ -148,7 +148,7 @@ Defines where in the grid this module&rsquo;s widget will be displayed. <br /></
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, <code>0...n</code>.</p>
Values: A positive integer, <code>0..n</code>.</p>
</div>
<div class="footer">

View File

@ -59,7 +59,7 @@
<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/git/">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>
@ -166,7 +166,7 @@ Defines where in the grid this module&rsquo;s widget will be displayed. <br /></
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: Any positive integer, <code>0...n</code>.</p>
Values: A positive integer, <code>0..n</code>.</p>
</div>
<div class="footer">

View File

@ -59,7 +59,7 @@
<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/git/">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>
@ -155,7 +155,7 @@ Defines where in the grid this module&rsquo;s widget will be displayed. <br /></
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, <code>0...n</code>.</p>
Values: A positive integer, <code>0..n</code>.</p>
</div>
<div class="footer">

View File

@ -59,7 +59,7 @@
<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/git/">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>
@ -97,7 +97,7 @@
<br/>
<i class="fas fa-clock"></i> 1 min read
<i class="fas fa-clock"></i> 2 min read
</span>
</div>
@ -105,6 +105,11 @@
<h2 id="description">Description</h2>
<p>Displays a configurable list of current weather report, including
current temperature, sunrise time, and sunset time.</p>
<p><img src="/imgs/modules/weather.png" width="320" height="187" alt="weather screenshot" /></p>
<h2 id="source-code">Source Code</h2>
<pre><code class="language-bash">wtf/weather/
@ -135,6 +140,7 @@
<h2 id="configuration">Configuration</h2>
<pre><code class="language-yaml">weather:
# From http://openweathermap.org/help/city_list.txt
cityids:
- 6173331
- 3128760
@ -155,6 +161,36 @@
<h3 id="attributes">Attributes</h3>
<p><code>cityids</code> <br />
A list of the <a
href="http://openweathermap.org/help/city_list.txt">OpenWeatherMap city
IDs</a> for the cities you want to view. <br />
Values: A list of positive integers, <code>0..n</code></p>
<p><code>colors.current</code> <br />
The color to highlight the current temperature in. <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.</p>
<p><code>enabled</code> <br />
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: <code>true</code>, <code>false</code>.</p>
<p><code>language</code> <br />
The human language in which to present the weather data. <br />
Values: Any <a href="https://openweathermap.org/current">language identifier</a> specified by OpenWeatherMap.</p>
<p><code>position</code> <br />
Defines where in the grid this module&rsquo;s widget will be displayed. <br /></p>
<p><code>refreshInterval</code> <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, <code>0..n</code>.</p>
<p><code>tempUnit</code> <br />
The temperature scale in which to display temperature values. <br />
Values: <code>F</code> for Fahrenheit, <code>C</code> for Celcius.</p>
</div>
<div class="footer">

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/git/</loc>
<lastmod>2018-05-09T14:20:48-07:00</lastmod>
</url>
<url>
<loc>http://wtfutil.com/posts/modules/weather/</loc>
<lastmod>2018-05-09T11:44:13-07:00</lastmod>
@ -59,7 +64,7 @@
<url>
<loc>http://wtfutil.com/posts/</loc>
<lastmod>2018-05-09T11:44:13-07:00</lastmod>
<lastmod>2018-05-09T14:20:48-07:00</lastmod>
<priority>0</priority>
</url>
@ -70,7 +75,7 @@
<url>
<loc>http://wtfutil.com/</loc>
<lastmod>2018-05-09T11:44:13-07:00</lastmod>
<lastmod>2018-05-09T14:20:48-07:00</lastmod>
<priority>0</priority>
</url>

View File

@ -61,7 +61,7 @@
<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/git/">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>

View File

@ -11,6 +11,17 @@ import (
// Config is a pointer to the global config object
var Config *config.Config
const helpText = `
Keyboard commands for Git:
/: Show/hide this help window
h: Previous weather location
l: Next weather location
arrow left: Previous weather location
arrow right: Next weather location
`
type Widget struct {
wtf.TextWidget
@ -87,6 +98,15 @@ func (widget *Widget) gitRepos(repoPaths []string) []*GitRepo {
}
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
switch string(event.Rune()) {
case "h":
widget.Prev()
return nil
case "l":
widget.Next()
return nil
}
switch event.Key() {
case tcell.KeyLeft:
widget.Prev()