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

Merge branch 'master' into bittrex

This commit is contained in:
jeangovil
2018-06-04 21:00:28 +04:30
committed by GitHub
57 changed files with 483 additions and 36 deletions

View File

@@ -4,6 +4,12 @@ date: 2018-04-15T21:17:16-07:00
draft: false
---
## Index
* [Configuration Files](#configuration-files)
* [Environment (ENV) Variables](#environment-env-variables)
* [Grid Layout](#grid-layout)
## Configuration Files
By default WTF looks in a `~/.wtf/` directory for a YAML file called
@@ -51,3 +57,30 @@ 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/opsgenie/">OpsGenie</a> for an example.
## Grid Layout
WTF uses the `Grid` layout system from [tview](https://github.com/rivo/tview/blob/master/grid.go) to position widgets
onscreen. It's not immediately obvious how this works, so here's an
explanation:
Think of your terminal screen as a matrix of letter positions, say `100` chrs wide and `58` chrs tall.
Columns breaks up the width of the screen into chunks, each chunk a specified number of characters wide. use
`[10, 10, 10, 10, 10, 10, 10, 10, 10, 10]`
Ten columns that are ten characters wide
Rows break up the height of the screen into chunks, each chunk a specified number of characters tall. If we wanted to have five rows:
`[10, 10, 10, 10, 18]`
The co-ordinate system starts at top-left and defines how wide and tall a widget is. If we wanted to put a 2-col, 2-row widget in the bottom of the screen, we'd position it at:
```
top: 4 // top starts in the 4th row
left: 9 // left starts in the 9th column
height: 2 // span down rows 4 & 5 (18 characters in size, total)
width: 2 // span across cols 9 & 10 (20 characters in size, total)
```

View File

@@ -0,0 +1,88 @@
---
title: "Cryptolive"
date: 2018-06-03T20:06:40-07:00
draft: false
---
Added in `v0.0.5`.
Compare crypto currencies using [CryptoCompare](https://cryptocompare.com).
## Source Code
```bash
wtf/cryptocurrencies/cryptolive/
```
## Required ENV Vars
None.
## Keyboard Commands
None.
## Configuration
```yaml
cryptolive:
colors:
from:
name: coral
displayName: grey
to:
name: white
price: green
currencies:
BTC:
displayName: Bitcoin
to:
- USD
- EUR
- ETH
ETH:
displayName: Ethereum
to:
- USD
- EUR
- ETH
enabled: true
position:
top: 5
left: 2
height: 1
width: 2
refreshInterval: 30
updateInterval: 15
```
### Attributes
`colors.from.name` <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.
`colors.from.dispayName` <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.
`colors.to.name` <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.
`colors.to.price` <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.
`currencies` <br />
`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`.

View File

@@ -8,7 +8,7 @@ Displays your upcoming Google calendar events.
<img src="/imgs/modules/gcal.png" width="320" height="389" alt="gcal screenshot" />
**Not:** Setting up access to Google Calendars for Go is a bit unobvious. Check out Google's [Go Quickstart](https://developers.google.com/calendar/quickstart/go)
**Not:** Setting up access to Google Calendars for Go is a bit unobvious. Check out Google's [Go Quickstart](https://developers.google.com/calendar/quickstart/go)
first and if you have problems, then take a look at this [comment by WesleydeSouza](https://github.com/senorprogrammer/wtf/issues/83#issuecomment-393665229) which offers a slightly different approach.
## Source Code