mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add Gitter module
This commit is contained in:
parent
63e9c58830
commit
30447f2918
75
_site/content/posts/modules/gitter.md
Normal file
75
_site/content/posts/modules/gitter.md
Normal file
@ -0,0 +1,75 @@
|
||||
---
|
||||
title: "Gitter"
|
||||
date: 2018-08-02T12:36:08-04:00
|
||||
draft: false
|
||||
---
|
||||
|
||||
Added in `v0.2.1`.
|
||||
|
||||
Displays chat messages from Gitter.
|
||||
|
||||
<img src="/imgs/modules/gitter.png" width="847" height="160" alt="gitter screenshot" />
|
||||
|
||||
## Source Code
|
||||
|
||||
```bash
|
||||
wtf/gitter/
|
||||
```
|
||||
|
||||
## Keyboard Commands
|
||||
|
||||
<span class="caption">Key:</span> `j` <br />
|
||||
<span class="caption">Action:</span> Select the next message in the list.
|
||||
|
||||
<span class="caption">Key:</span> `k` <br />
|
||||
<span class="caption">Action:</span> Select the previous message in the list.
|
||||
|
||||
<span class="caption">Key:</span> `r` <br />
|
||||
<span class="caption">Action:</span> Refresh the data.
|
||||
|
||||
<span class="caption">Key:</span> `↓` <br />
|
||||
<span class="caption">Action:</span> Select the next message in the list.
|
||||
|
||||
<span class="caption">Key:</span> `↑` <br />
|
||||
<span class="caption">Action:</span> Select the previous message in the list.
|
||||
|
||||
## Configuration
|
||||
|
||||
```yaml
|
||||
gitter:
|
||||
apiToken: "ab345546asdfasb465234fgjgh068f39a35c3e4139ee383f7"
|
||||
enabled: true
|
||||
numberOfMessages: 10
|
||||
position:
|
||||
top: 4
|
||||
left: 1
|
||||
height: 1
|
||||
width: 4
|
||||
roomUri: wtfutil/Lobby
|
||||
refreshInterval: 300
|
||||
```
|
||||
|
||||
### Attributes
|
||||
|
||||
`apiToken` <br />
|
||||
Value: Your <a href="https://developer.gitter.im/apps">Gitter</a>Personal Access Token.
|
||||
|
||||
`enabled` <br />
|
||||
Determines whether or not this module is executed and if its data displayed onscreen. <br />
|
||||
Values: `true`, `false`.
|
||||
|
||||
`numberOfMessages` <br />
|
||||
_Optional_ <br />
|
||||
Maximum number of _(newest)_ messages to be displayed. Default is `10`<br />
|
||||
|
||||
`position` <br />
|
||||
Defines where in the grid this module's widget will be displayed. <br />
|
||||
|
||||
`roomUri` <br />
|
||||
_Optional_ <br /
|
||||
URI of the room you would like to see the chat messages from. Default is `wtfutil/Lobby`<br />
|
||||
Values: `new`, `top`, `job`, `ask`
|
||||
|
||||
`refreshInterval` <br />
|
||||
How often, in seconds, this module will update its data. <br />
|
||||
Values: A positive integer, `0..n`.
|
BIN
_site/static/imgs/modules/gitter.png
Normal file
BIN
_site/static/imgs/modules/gitter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
@ -34,6 +34,7 @@
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
|
||||
|
||||
<meta name="generator" content="Hugo 0.38.2" />
|
||||
<meta name="generator" content="`Hugo 0.38.2" />
|
||||
|
||||
<title>Categories | WTF - A Terminal Dashboard</title>
|
||||
<meta content="Categories - WTF - A Terminal Dashboard" property="og:title">
|
||||
@ -89,6 +89,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
BIN
docs/imgs/modules/gitter.png
Normal file
BIN
docs/imgs/modules/gitter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
@ -88,6 +88,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -27,6 +27,23 @@ Key: ↓ Action: Select the next story in the list.
|
||||
Key: ↑ Action: Select the previous story in the list.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Gitter</title>
|
||||
<link>https://wtfutil.com/posts/modules/gitter/</link>
|
||||
<pubDate>Thu, 02 Aug 2018 12:36:08 -0400</pubDate>
|
||||
|
||||
<guid>https://wtfutil.com/posts/modules/gitter/</guid>
|
||||
<description>Added in v0.2.1.
|
||||
Displays chat messages from Gitter.
|
||||
Source Code wtf/gitter/ Keyboard Commands Key: j Action: Select the next message in the list.
|
||||
Key: k Action: Select the previous message in the list.
|
||||
Key: r Action: Refresh the data.
|
||||
Key: ↓ Action: Select the next message in the list.
|
||||
Key: ↑ Action: Select the previous message in the list.
|
||||
Configuration gitter:apiToken:&#34;ab345546asdfasb465234fgjgh068f39a35c3e4139ee383f7&#34;enabled:truenumberOfMessages:10position:top:4left:1height:1width:4roomUri:wtfutil/LobbyrefreshInterval:300 Attributes apiToken Value: Your GitterPersonal Access Token.
|
||||
enabled Determines whether or not this module is executed and if its data displayed onscreen.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Twitter</title>
|
||||
<link>https://wtfutil.com/posts/modules/twitter/</link>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -89,6 +89,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
@ -129,6 +130,13 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
|
||||
<time class="pull-right post-list">Aug 02, 2018</time>
|
||||
|
||||
</span>
|
||||
</li><li>
|
||||
<span>
|
||||
<a href="https://wtfutil.com/posts/modules/gitter/">Gitter</a>
|
||||
|
||||
<time class="pull-right post-list">Aug 02, 2018</time>
|
||||
|
||||
</span>
|
||||
</li><li>
|
||||
<span>
|
||||
|
@ -27,6 +27,23 @@ Key: ↓ Action: Select the next story in the list.
|
||||
Key: ↑ Action: Select the previous story in the list.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Gitter</title>
|
||||
<link>https://wtfutil.com/posts/modules/gitter/</link>
|
||||
<pubDate>Thu, 02 Aug 2018 12:36:08 -0400</pubDate>
|
||||
|
||||
<guid>https://wtfutil.com/posts/modules/gitter/</guid>
|
||||
<description>Added in v0.2.1.
|
||||
Displays chat messages from Gitter.
|
||||
Source Code wtf/gitter/ Keyboard Commands Key: j Action: Select the next message in the list.
|
||||
Key: k Action: Select the previous message in the list.
|
||||
Key: r Action: Refresh the data.
|
||||
Key: ↓ Action: Select the next message in the list.
|
||||
Key: ↑ Action: Select the previous message in the list.
|
||||
Configuration gitter:apiToken:&#34;ab345546asdfasb465234fgjgh068f39a35c3e4139ee383f7&#34;enabled:truenumberOfMessages:10position:top:4left:1height:1width:4roomUri:wtfutil/LobbyrefreshInterval:300 Attributes apiToken Value: Your GitterPersonal Access Token.
|
||||
enabled Determines whether or not this module is executed and if its data displayed onscreen.</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Twitter</title>
|
||||
<link>https://wtfutil.com/posts/modules/twitter/</link>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
215
docs/posts/modules/gitter/index.html
Normal file
215
docs/posts/modules/gitter/index.html
Normal file
@ -0,0 +1,215 @@
|
||||
<!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>Gitter | WTF - A Terminal Dashboard</title>
|
||||
<meta content="Gitter - WTF - A Terminal Dashboard" 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="https://wtfutil.com/css/print.css" media="print">
|
||||
<link rel="stylesheet" href="https://wtfutil.com/css/poole.css">
|
||||
<link rel="stylesheet" href="https://wtfutil.com/css/hyde.css">
|
||||
<link rel="stylesheet" href="https://wtfutil.com/css/syntax.css">
|
||||
<link rel="stylesheet" href="https://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="https://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>
|
||||
|
||||
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-532RMQJ');</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-532RMQJ"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
|
||||
<div class="sidebar">
|
||||
<div class="container">
|
||||
<div class="sidebar-about text-center">
|
||||
|
||||
<a href="https://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/overview/">Overview</a></li>
|
||||
<li class="sidebar-list-item-1"><a href="/posts/installation/">Installation</a></li>
|
||||
<li class="sidebar-list-item-1"><a href="/posts/configuration/">Configuration</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/configuration/attributes/">Attributes</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/configuration/iterm2/">iTerm2</a></li>
|
||||
<li class="sidebar-list-item-1"><a href="https://github.com/senorprogrammer/wtf/releases">Releases</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/cryptocurrencies/bittrex/">Bittrex</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/blockfolio/">Blockfolio</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/circleci/">CircleCI</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/cryptocurrencies/cryptolive/">CryptoLive</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/cmdrunner/">CmdRunner</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/hackernews/">Hacker News</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gerrit/">Gerrit</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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</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/power/">Power</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather</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/">Todo</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/todoist/">Todoist</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/travisci/">Travis CI</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/zendesk/">Zendesk</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p class="copyright">
|
||||
© 2018 Chris Cummer.
|
||||
<br />
|
||||
<a href="https://creativecommons.org/licenses/by/4.0">Some Rights Reserved</a>.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content container">
|
||||
<div class="post">
|
||||
<h1>Gitter</h1>
|
||||
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<span class="text-left post-date meta">
|
||||
|
||||
|
||||
Aug 02, 2018
|
||||
|
||||
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p>Added in <code>v0.2.1</code>.</p>
|
||||
|
||||
<p>Displays chat messages from Gitter.</p>
|
||||
|
||||
<p><img src="/imgs/modules/gitter.png" width="565" height="107" alt="gitter screenshot" /></p>
|
||||
|
||||
<h2 id="source-code">Source Code</h2>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/gitter/</code></pre></div>
|
||||
<h2 id="keyboard-commands">Keyboard Commands</h2>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>j</code> <br />
|
||||
<span class="caption">Action:</span> Select the next message in the list.</p>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>k</code> <br />
|
||||
<span class="caption">Action:</span> Select the previous message in the list.</p>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>r</code> <br />
|
||||
<span class="caption">Action:</span> Refresh the data.</p>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>↓</code> <br />
|
||||
<span class="caption">Action:</span> Select the next message in the list.</p>
|
||||
|
||||
<p><span class="caption">Key:</span> <code>↑</code> <br />
|
||||
<span class="caption">Action:</span> Select the previous message in the list.</p>
|
||||
|
||||
<h2 id="configuration">Configuration</h2>
|
||||
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">gitter<span class="p">:</span><span class="w">
|
||||
</span><span class="w"> </span>apiToken<span class="p">:</span><span class="w"> </span><span class="s2">"ab345546asdfasb465234fgjgh068f39a35c3e4139ee383f7"</span><span class="w">
|
||||
</span><span class="w"> </span>enabled<span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
|
||||
</span><span class="w"> </span>numberOfMessages<span class="p">:</span><span class="w"> </span><span class="m">10</span><span class="w">
|
||||
</span><span class="w"> </span>position<span class="p">:</span><span class="w">
|
||||
</span><span class="w"> </span>top<span class="p">:</span><span class="w"> </span><span class="m">4</span><span class="w">
|
||||
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
|
||||
</span><span class="w"> </span>height<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
|
||||
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">4</span><span class="w">
|
||||
</span><span class="w"> </span>roomUri<span class="p">:</span><span class="w"> </span>wtfutil/Lobby<span class="w">
|
||||
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">300</span></code></pre></div>
|
||||
<h3 id="attributes">Attributes</h3>
|
||||
|
||||
<p><code>apiToken</code> <br />
|
||||
Value: Your <a href="https://developer.gitter.im/apps">Gitter</a>Personal Access Token.</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>numberOfMessages</code> <br />
|
||||
<em>Optional</em> <br />
|
||||
Maximum number of (newest) messages to be displayed. Default is <code>10</code><br /></p>
|
||||
|
||||
<p><code>position</code> <br />
|
||||
Defines where in the grid this module’s widget will be displayed. <br /></p>
|
||||
|
||||
<p><code>roomUri</code> <br />
|
||||
<em>Optional</em> <br /
|
||||
URI of the room you would like to see the chat messages from. Default is `wtfutil/Lobby`<br />
|
||||
Values: <code>new</code>, <code>top</code>, <code>job</code>, <code>ask</code></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>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -87,6 +87,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
@ -7,6 +7,11 @@
|
||||
<lastmod>2018-08-02T16:36:08-04:00</lastmod>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://wtfutil.com/posts/modules/gitter/</loc>
|
||||
<lastmod>2018-08-02T12:36:08-04:00</lastmod>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://wtfutil.com/posts/modules/twitter/</loc>
|
||||
<lastmod>2018-07-31T20:21:37-07:00</lastmod>
|
||||
|
@ -89,6 +89,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<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/">GitHub</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">GitLab</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gitter/">Gitter</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
||||
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
||||
|
95
gitter/client.go
Normal file
95
gitter/client.go
Normal file
@ -0,0 +1,95 @@
|
||||
package gitter
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/senorprogrammer/wtf/logger"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func GetMessages(roomId string, numberOfMessages int) ([]Message, error) {
|
||||
var messages []Message
|
||||
|
||||
resp, err := apiRequest("rooms/" + roomId + "/chatMessages?limit=" + strconv.Itoa(numberOfMessages))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
parseJson(&messages, resp.Body)
|
||||
|
||||
return messages, nil
|
||||
}
|
||||
|
||||
func GetRoom(roomUri string) (*Room, error) {
|
||||
var rooms Rooms
|
||||
|
||||
resp, err := apiRequest("rooms?q=" + roomUri)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
parseJson(&rooms, resp.Body)
|
||||
|
||||
for _, room := range rooms.Results {
|
||||
logger.Log(fmt.Sprintf("room: %s", room))
|
||||
if room.URI == roomUri {
|
||||
return &room, nil
|
||||
}
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
var (
|
||||
apiBaseURL = "https://api.gitter.im/v1/"
|
||||
)
|
||||
|
||||
func apiRequest(path string) (*http.Response, error) {
|
||||
req, err := http.NewRequest("GET", apiBaseURL+path, nil)
|
||||
bearer := fmt.Sprintf("Bearer %s", apiToken())
|
||||
req.Header.Add("Authorization", bearer)
|
||||
|
||||
httpClient := &http.Client{}
|
||||
resp, err := httpClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||
return nil, fmt.Errorf(resp.Status)
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func parseJson(obj interface{}, text io.Reader) {
|
||||
jsonStream, err := ioutil.ReadAll(text)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
decoder := json.NewDecoder(bytes.NewReader(jsonStream))
|
||||
|
||||
for {
|
||||
if err := decoder.Decode(obj); err == io.EOF {
|
||||
break
|
||||
} else if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func apiToken() string {
|
||||
return wtf.Config.UString(
|
||||
"wtf.mods.gitter.apiToken",
|
||||
os.Getenv("WTF_GITTER_API_TOKEN"),
|
||||
)
|
||||
}
|
28
gitter/gitter.go
Normal file
28
gitter/gitter.go
Normal file
@ -0,0 +1,28 @@
|
||||
package gitter
|
||||
|
||||
import "time"
|
||||
|
||||
type Rooms struct {
|
||||
Results []Room `json:"results"`
|
||||
}
|
||||
|
||||
type Room struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
URI string `json:"uri"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID string `json:"id"`
|
||||
Username string `json:"username"`
|
||||
DisplayName string `json:"displayName"`
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
ID string `json:"id"`
|
||||
Text string `json:"text"`
|
||||
HTML string `json:"html"`
|
||||
Sent time.Time `json:"sent"`
|
||||
From User `json:"fromUser"`
|
||||
Unread bool `json:"unread"`
|
||||
}
|
182
gitter/widget.go
Normal file
182
gitter/widget.go
Normal file
@ -0,0 +1,182 @@
|
||||
package gitter
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/senorprogrammer/wtf/wtf"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const HelpText = `
|
||||
Keyboard commands for Gitter:
|
||||
|
||||
/: Show/hide this help window
|
||||
j: Select the next message in the list
|
||||
k: Select the previous message in the list
|
||||
r: Refresh the data
|
||||
|
||||
arrow down: Select the next message in the list
|
||||
arrow up: Select the previous message in the list
|
||||
`
|
||||
|
||||
type Widget struct {
|
||||
wtf.HelpfulWidget
|
||||
wtf.TextWidget
|
||||
|
||||
messages []Message
|
||||
selected int
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
widget := Widget{
|
||||
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
|
||||
TextWidget: wtf.NewTextWidget("Gitter", "gitter", true),
|
||||
}
|
||||
|
||||
widget.HelpfulWidget.SetView(widget.View)
|
||||
widget.unselect()
|
||||
|
||||
widget.View.SetScrollable(true)
|
||||
widget.View.SetRegions(true)
|
||||
widget.View.SetInputCapture(widget.keyboardIntercept)
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
if widget.Disabled() {
|
||||
return
|
||||
}
|
||||
|
||||
room, err := GetRoom(wtf.Config.UString("wtf.mods.gitter.roomUri", "wtfutil/Lobby"))
|
||||
if err != nil {
|
||||
widget.View.SetWrap(true)
|
||||
widget.View.SetTitle(widget.Name)
|
||||
widget.View.SetText(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if room == nil {
|
||||
return
|
||||
}
|
||||
|
||||
messages, err := GetMessages(room.ID, wtf.Config.UInt("wtf.mods.gitter.numberOfMessages", 10))
|
||||
widget.UpdateRefreshedAt()
|
||||
|
||||
if err != nil {
|
||||
widget.View.SetWrap(true)
|
||||
widget.View.SetTitle(widget.Name)
|
||||
widget.View.SetText(err.Error())
|
||||
} else {
|
||||
widget.messages = messages
|
||||
}
|
||||
|
||||
widget.display()
|
||||
widget.View.ScrollToEnd()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) display() {
|
||||
if widget.messages == nil {
|
||||
return
|
||||
}
|
||||
|
||||
widget.View.SetWrap(true)
|
||||
widget.View.Clear()
|
||||
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %s", widget.Name, wtf.Config.UString("wtf.mods.gitter.roomUri", "wtfutil/Lobby"))))
|
||||
widget.View.SetText(widget.contentFrom(widget.messages))
|
||||
widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight()
|
||||
}
|
||||
|
||||
func (widget *Widget) contentFrom(messages []Message) string {
|
||||
var str string
|
||||
for idx, message := range messages {
|
||||
str = str + fmt.Sprintf(
|
||||
`["%d"][""][%s] [blue]%s [lightslategray]%s: [%s]%s [aqua]%s`,
|
||||
idx,
|
||||
widget.rowColor(idx),
|
||||
message.From.DisplayName,
|
||||
message.From.Username,
|
||||
widget.rowColor(idx),
|
||||
message.Text,
|
||||
message.Sent.Format("Jan 02, 15:04 MST"),
|
||||
)
|
||||
|
||||
str = str + "\n"
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) rowColor(idx int) string {
|
||||
if widget.View.HasFocus() && (idx == widget.selected) {
|
||||
return wtf.DefaultFocussedRowColor()
|
||||
}
|
||||
|
||||
return wtf.RowColor("gitter", idx)
|
||||
}
|
||||
|
||||
func (widget *Widget) next() {
|
||||
widget.selected++
|
||||
if widget.messages != nil && widget.selected >= len(widget.messages) {
|
||||
widget.selected = 0
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) prev() {
|
||||
widget.selected--
|
||||
if widget.selected < 0 && widget.messages != nil {
|
||||
widget.selected = len(widget.messages) - 1
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) openMessage() {
|
||||
sel := widget.selected
|
||||
if sel >= 0 && widget.messages != nil && sel < len(widget.messages) {
|
||||
message := &widget.messages[widget.selected]
|
||||
wtf.OpenFile(message.Text)
|
||||
}
|
||||
}
|
||||
|
||||
func (widget *Widget) unselect() {
|
||||
widget.selected = -1
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
switch string(event.Rune()) {
|
||||
case "/":
|
||||
widget.ShowHelp()
|
||||
case "j":
|
||||
widget.next()
|
||||
return nil
|
||||
case "k":
|
||||
widget.prev()
|
||||
return nil
|
||||
case "r":
|
||||
widget.Refresh()
|
||||
return nil
|
||||
}
|
||||
|
||||
switch event.Key() {
|
||||
case tcell.KeyDown:
|
||||
widget.next()
|
||||
return nil
|
||||
case tcell.KeyEsc:
|
||||
widget.unselect()
|
||||
return event
|
||||
case tcell.KeyUp:
|
||||
widget.prev()
|
||||
return nil
|
||||
default:
|
||||
return event
|
||||
}
|
||||
}
|
3
main.go
3
main.go
@ -26,6 +26,7 @@ import (
|
||||
"github.com/senorprogrammer/wtf/git"
|
||||
"github.com/senorprogrammer/wtf/github"
|
||||
"github.com/senorprogrammer/wtf/gitlab"
|
||||
"github.com/senorprogrammer/wtf/gitter"
|
||||
"github.com/senorprogrammer/wtf/gspreadsheets"
|
||||
"github.com/senorprogrammer/wtf/hackernews"
|
||||
"github.com/senorprogrammer/wtf/ipaddresses/ipapi"
|
||||
@ -203,6 +204,8 @@ func addWidget(app *tview.Application, pages *tview.Pages, widgetName string) {
|
||||
widgets = append(widgets, github.NewWidget(app, pages))
|
||||
case "gitlab":
|
||||
widgets = append(widgets, gitlab.NewWidget(app, pages))
|
||||
case "gitter":
|
||||
widgets = append(widgets, gitter.NewWidget(app, pages))
|
||||
case "gspreadsheets":
|
||||
widgets = append(widgets, gspreadsheets.NewWidget())
|
||||
case "hackernews":
|
||||
|
Loading…
x
Reference in New Issue
Block a user