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

Signed-off-by: Mike Lloyd <mike@reboot3times.org>
This commit is contained in:
Mike Lloyd 2018-06-03 23:20:12 -06:00
commit db29639301
104 changed files with 2344 additions and 280 deletions

BIN
.DS_Store vendored

Binary file not shown.

21
.editorconfig Normal file
View File

@ -0,0 +1,21 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
max_line_length=120
[*.go]
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
[*.html]
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = false
[*.md]
trim_trailing_whitespace = false

20
.github/ISSUE_TEMPLATE/Bug.md vendored Normal file
View File

@ -0,0 +1,20 @@
---
name: Bug Report
about: Something is broken?
---
### Bug Report
#### Summary
<!-- Provide a summary desciribing the problem you are experiencing. -->
##### What is the current behaviour?
<!-- wtf crashes-->
### How to reproduce
##### If the current behaviour is a bug, please provide the steps to reproduce it.
<!-- A great way to do this is to provide screenshots and commands.* -->
##### What do you think the expected behaviour should be?
<!--What do you think should happen?-->

16
.github/ISSUE_TEMPLATE/Feature.md vendored Normal file
View File

@ -0,0 +1,16 @@
---
name: Feature Request
about: You have a neat idea that should be implemented?
---
### Feature Request
<!-- Fill in the relevant information below to help triage your issue. -->
| Q | A
|------------ | ------
| New Feature | yes
| RFC | yes/no
| BC Break | yes/no
#### Summary
<!-- Provide a summary of the feature you would like to see implemented. -->

11
.github/ISSUE_TEMPLATE/Support.md vendored Normal file
View File

@ -0,0 +1,11 @@
---
name: ❓ Support Question
about: Have a problem that you can't figure out?
---
| Q | A
|------------ | -----
| Version | 0.0.4
#### Support Question
<!-- Describe the issue you are facing here. -->

View File

@ -0,0 +1,16 @@
---
name: Improvement
about: You have some improvement to make wtf better?
---
### Improvement
<!-- Fill in the relevant information below to help triage your issue. -->
| Q | A
|------------ | ------
| New Feature | yes
| RFC | yes/no
| BC Break | yes/no
#### Summary
<!-- Provide a summary of the improvement you are submitting. -->

18
.github/PULL_REQUEST_TEMPLATE/Other.md vendored Normal file
View File

@ -0,0 +1,18 @@
---
name: Other
about: You have some other ideas you want to introduce?
---
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
**What kind of change does this PR introduce?**
<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->
**Summary**
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
<!-- Try to link to an open issue for more information. -->
**Does this PR introduce a breaking change?**
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->
**Other information**

19
.gitignore vendored
View File

@ -1,2 +1,21 @@
### Go ###
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, build with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Misc
.DS_Store
gcal/client_secret.json
#intellij idea
.idea/
dist/*

46
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at chriscummer+wtf@me.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@ -6,7 +6,7 @@ dependencies:
go get -v ./...
install:
which wtf | xargs rm
which wtf | xargs rm || true
go install -ldflags="-X main.version=$(shell git describe --always --abbrev=6)_$(BRANCH) -X main.date=$(shell date +%FT%T%z)"
which wtf

View File

@ -17,12 +17,21 @@ displaying infrequently-needed, but very important, daily data.
work with Go versions < 1.7, and only _may_ work on other versions.
```bash
go get github.com/senorprogrammer/wtf
go get -u github.com/senorprogrammer/wtf
cd $GOPATH/src/github.com/senorprogrammer/wtf
make install
make run
```
Or [download the latest binary](https://github.com/senorprogrammer/wtf/releases).
## Support
Chat on Gitter:
[![Join the chat at https://gitter.im/wtfutil/Lobby](https://badges.gitter.im/wtfutil/Lobby.svg)](https://gitter.im/wtfutil/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Documentation
See [https://wtfutil.com](https://wtfutil.com) for the definitive
documentation. Here's some short-cuts:
@ -38,15 +47,19 @@ And a "probably up-to-date" list of currently-implemented modules:
* [Google Calendar](http://wtfutil.com/posts/modules/gcal/)
* [Git](http://wtfutil.com/posts/modules/git/)
* [GitHub](http://wtfutil.com/posts/modules/github/)
* [IPInfo](http://wtfutil.com/posts/modules/ipinfo/)
* [Jira](http://wtfutil.com/posts/modules/jira/)
* [New Relic](http://wtfutil.com/posts/modules/newrelic/)
* [OpsGenie](http://wtfutil.com/posts/modules/opsgenie)
* [Power](http://wtfutil.com/posts/modules/power/)
* [PrettyWeather](http://wtfutil.com/posts/modules/prettyweather/)*
* [Security](http://wtfutil.com/posts/modules/security/)
* [Textfile](http://wtfutil.com/posts/modules/textfile/)
* [Todo List](http://wtfutil.com/posts/modules/todo/)
* [Weather](http://wtfutil.com/posts/modules/weather/)
*experimental
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.
@ -78,3 +91,7 @@ Many thanks to all these developers.
* [openweathermap](https://github.com/briandowns/openweathermap)
* [tcell](https://github.com/gdamore/tcell)
* [tview](https://github.com/rivo/tview)
<p align="center">
<img src="./docs/img/dude_wtf.png?raw=true" title="Dude WTF" width="251" height="201" />
</p>

View File

@ -25,6 +25,7 @@ wtf:
rows: [10, 10, 10, 10, 10, 3, 4]
# The app redraws itself once a second
refreshInterval: 1
term: "xterm-256color"
```
### Attributes
@ -69,3 +70,12 @@ How often, in seconds, the UI refreshes itself. <br />
**Note:** This implementation is probably wrong and buggy and likely to
change. <br />
Values: A positive integer, `0..n`.
`term` <br />
_Optional_. <br />
Sets a custom value for the terminal type this app runs in. Leave this entry out of the config if you simply want to use your terminal's
default setting. <br />
**Note:** If an invalid value is provided for this setting, the app will
crash with a `"terminal entry not found"` error. <br />
Values: Any valid terminal type (ie: vt100, xterm, xterm-256color, ansi,
etc.).

View File

@ -11,7 +11,7 @@ There are two ways to install WTF:
Get this repo and install the dependencies:
```bash
go get github.com/senorprogrammer/wtf
go get -u github.com/senorprogrammer/wtf
cd $GOPATH/src/github.com/senorprogrammer/wtf
make install
make run

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,6 +8,9 @@ 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)
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
```bash

View File

@ -0,0 +1,60 @@
---
title: "Module: IPInfo"
date: 2018-06-01T23:18:48-07:00
draft: false
---
Displays your current IP address information, from ipinfo.io.
<img src="/imgs/modules/ipinfo.png" width="320" height="199" alt="ipinfo screenshot" />
## Source Code
```bash
wtf/ipinfo/
```
## Required ENV Variables
None.
## Keyboard Commands
None.
## Configuration
```yaml
ipinfo:
colors:
name: red
value: white
enabled: true
position:
top: 1
left: 2
height: 1
width: 1
refreshInterval: 15
```
### Attributes
`colors.name` <br />
The default colour for the row names. <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11 color</a> name.
`colors.value` <br />
The default colour for the row values. <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11 color</a> name.
`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

@ -34,6 +34,7 @@ jira:
domain: "https://umbrellacorp.atlassian.net"
email: "chriscummer@me.com"
enabled: true
jql: "issueType = Story"
position:
top: 4
left: 1
@ -68,6 +69,11 @@ Values: A valid email address string.
Determines whether or not this module is executed and if its data displayed onscreen. <br />
Values: `true`, `false`.
`jql` <br />
_Optional_ <br />
Custom JQL to be appended to the search query. <br />
Values: See <a href="https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql">Search Jira like a boss with JQL</a> for details.
`position` <br />
Defines where in the grid this module's widget will be displayed. <br />

View File

@ -0,0 +1,64 @@
---
title: "Prettyweather"
date: 2018-06-02T05:32:04-07:00
draft: false
---
**🔬 Experimental**
Displays weather information as ASCII art from
[Wttr.in](http://wttr.in).
<img src="/imgs/modules/prettyweather.png" width="320" height="191" alt="prettyweather screenshot" />
## Source Code
```bash
wtf/prettyweather/
```
## Required ENV Variables
None.
## Keyboard Commands
None.
## Configuration
```yaml
prettyweather:
enabled: true
city: "tehran"
position:
top: 3
left: 5
height: 1
width: 1
refreshInterval: 300
unit: "c"
```
### Attributes
`city` <br />
_Optional_. It will grab the current location from your IP address if
omitted.<br />
Values: The name of any city supported by [Wttr.in](http://wttr.in).
`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`.
`unit` <br />
_Optional_. It will use metric if you are out of US and imperial for US.<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: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -1,5 +1,5 @@
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="container">
<div class="sidebar-about text-center">
<!--<a href="{{ .Site.BaseURL }}"><h1 class="brand">{{ .Site.Title }}</h1></a>-->
<a href="{{ .Site.BaseURL }}">{{ with .Site.Params.authorimage }} <img src="{{.}}" alt="WFT Logo" class="" width=""> {{ end }}</a>
@ -24,14 +24,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -1,5 +1,4 @@
html,
body
html, body
{
font-family: 'Fira Sans', sans-serif;
font-size: 18px;
@ -7,6 +6,10 @@ body
line-height: 1.5;
}
.clear {
clear: both;
}
.img-circle
{
border-radius: 50%;

View File

@ -34,13 +34,14 @@
html {
font-family: 'Fira Sans', 'Helvetica Neue', 'Arial', sans-serif;
font-weight:300;
}
@media (min-width: 48em) {
html {
font-size: 16px;
}
}
@media (min-width: 58em) {
html {
font-size: 20px;
@ -63,13 +64,14 @@ pre {
padding: 2rem 1rem;
color: rgba(255,255,255,.5);
background-color: #300030;
height: 100%;
float: left;
}
@media (min-width: 48em) {
.sidebar {
position: fixed;
position: relative;
top: 0;
left: 0;
bottom: 0;
width: 18rem;
text-align: left;
}

View File

@ -37,10 +37,9 @@ func (widget *Widget) Refresh() {
)
widget.UpdateRefreshedAt()
widget.View.SetTitle(fmt.Sprintf(" Away (%d) ", len(todayItems)))
widget.View.Clear()
widget.View.SetTitle(fmt.Sprintf("%s(%d)", widget.Name, len(todayItems)))
fmt.Fprintf(widget.View, "%s", widget.contentFrom(todayItems))
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(todayItems)))
}
/* -------------------- Unexported Functions -------------------- */

View File

@ -25,7 +25,11 @@ func (clock *Clock) Date() string {
}
func (clock *Clock) LocalTime() time.Time {
return time.Now().In(clock.Location)
return clock.ToLocal(time.Now())
}
func (clock *Clock) ToLocal(t time.Time) time.Time {
return t.In(clock.Location)
}
func (clock *Clock) Time() string {

View File

@ -2,6 +2,7 @@ package clocks
import (
"sort"
"time"
)
type ClockCollection struct {
@ -28,10 +29,11 @@ func (clocks *ClockCollection) SortedAlphabetically() {
}
func (clocks *ClockCollection) SortedChronologically() {
now := time.Now()
sort.Slice(clocks.Clocks, func(i, j int) bool {
clock := clocks.Clocks[i]
other := clocks.Clocks[j]
return clock.LocalTime().Before(other.LocalTime())
return clock.ToLocal(now).String() < other.ToLocal(now).String()
})
}

View File

@ -23,5 +23,5 @@ func (widget *Widget) display(clocks []Clock) {
)
}
fmt.Fprintf(widget.View, "%s", str)
widget.View.SetText(fmt.Sprintf("%s", str))
}

View File

@ -34,7 +34,6 @@ func (widget *Widget) Refresh() {
}
widget.UpdateRefreshedAt()
widget.View.Clear()
widget.display(widget.clockColl.Sorted())
}

View File

@ -22,7 +22,7 @@ type Widget struct {
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" 🏃 Runner ", "cmdrunner", false),
TextWidget: wtf.NewTextWidget(" CmdRunner ", "cmdrunner", false),
args: wtf.ToStrs(Config.UList("wtf.mods.cmdrunner.args")),
cmd: Config.UString("wtf.mods.cmdrunner.cmd"),
@ -40,10 +40,9 @@ func (widget *Widget) Refresh() {
widget.UpdateRefreshedAt()
widget.execute()
widget.View.Clear()
widget.View.SetTitle(fmt.Sprintf(" %s ", widget))
fmt.Fprintf(widget.View, "%s", widget.result)
widget.View.SetText(fmt.Sprintf("%s", widget.result))
}
func (widget *Widget) String() string {

View File

@ -0,0 +1,28 @@
package cryptolive
type list struct {
items []*fromCurrency
}
type fromCurrency struct {
name string
displayName string
to []*toCurrency
}
type toCurrency struct {
name string
price float32
}
type cResponse map[string]float32
/* -------------------- Unexported Functions -------------------- */
func (l *list) addItem(name string, displayName string, to []*toCurrency) {
l.items = append(l.items, &fromCurrency{
name: name,
displayName: displayName,
to: to,
})
}

View File

@ -0,0 +1,179 @@
package cryptolive
import (
"encoding/json"
"fmt"
"net/http"
"time"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
var started = false
var baseURL = "https://min-api.cryptocompare.com/data/price"
var ok = true
// Widget define wtf widget to register widget later
type Widget struct {
wtf.TextWidget
// time interval for send http request
updateInterval int
*list
}
// NewWidget Make new instance of widget
func NewWidget() *Widget {
started = false
widget := Widget{
TextWidget: wtf.NewTextWidget(" CryptoLive ", "cryptolive", false),
updateInterval: Config.UInt("wtf.mods.cryptolive.updateInterval", 10),
}
widget.setList()
return &widget
}
func (widget *Widget) setList() {
currenciesMap, _ := Config.Map("wtf.mods.cryptolive.currencies")
widget.list = &list{}
for currency := range currenciesMap {
displayName, _ := Config.String("wtf.mods.cryptolive.currencies." + currency + ".displayName")
toList := getToList(currency)
widget.list.addItem(currency, displayName, toList)
}
}
/* -------------------- Exported Functions -------------------- */
// Refresh & update after interval time
func (widget *Widget) Refresh() {
if widget.Disabled() {
return
}
if started == false {
// this code should run once
go func() {
for {
widget.updateCurrencies()
time.Sleep(time.Duration(widget.updateInterval) * time.Second)
}
}()
}
started = true
widget.UpdateRefreshedAt()
widget.View.Clear()
if !ok {
widget.View.SetText(
fmt.Sprint("Please check your internet connection!"),
)
return
}
display(widget)
}
/* -------------------- Unexported Functions -------------------- */
func display(widget *Widget) {
str := ""
var (
fromNameColor = Config.UString("wtf.mods.cryptolive.colors.from.name", "coral")
fromDisplayNameColor = Config.UString("wtf.mods.cryptolive.colors.from.displayName", "grey")
toNameColor = Config.UString("wtf.mods.cryptolive.colors.to.name", "white")
toPriceColor = Config.UString("wtf.mods.cryptolive.colors.to.price", "green")
)
for _, item := range widget.list.items {
str += fmt.Sprintf(" [%s]%s[%s] (%s)\n", fromNameColor, item.displayName, fromDisplayNameColor, item.name)
for _, toItem := range item.to {
str += fmt.Sprintf("\t[%s]%s: [%s]%f\n", toNameColor, toItem.name, toPriceColor, toItem.price)
}
str += "\n"
}
widget.View.SetText(fmt.Sprintf("\n%s", str))
}
func getToList(fromName string) []*toCurrency {
toNames, _ := Config.List("wtf.mods.cryptolive.currencies." + fromName + ".to")
var toList []*toCurrency
for _, to := range toNames {
toList = append(toList, &toCurrency{
name: to.(string),
price: 0,
})
}
return toList
}
func (widget *Widget) updateCurrencies() {
defer func() {
recover()
}()
for _, fromCurrency := range widget.list.items {
var (
client http.Client
jsonResponse cResponse
)
client = http.Client{
Timeout: time.Duration(5 * time.Second),
}
request := makeRequest(fromCurrency)
response, err := client.Do(request)
if err != nil {
ok = false
} else {
ok = true
}
defer response.Body.Close()
_ = json.NewDecoder(response.Body).Decode(&jsonResponse)
setPrices(&jsonResponse, fromCurrency)
}
display(widget)
}
func makeRequest(currency *fromCurrency) *http.Request {
fsym := currency.name
tsyms := ""
for _, to := range currency.to {
tsyms += fmt.Sprintf("%s,", to.name)
}
url := fmt.Sprintf("%s?fsym=%s&tsyms=%s", baseURL, fsym, tsyms)
request, err := http.NewRequest("GET", url, nil)
if err != nil {
}
return request
}
func setPrices(response *cResponse, currencry *fromCurrency) {
for idx, toCurrency := range currencry.to {
currencry.to[idx].price = (*response)[toCurrency.name]
}
}

23
dist/CHANGELOG.md vendored
View File

@ -1,23 +0,0 @@
## Changelog
f23ac85 Fixes bug with default configuration YAML
3e004fd Fix a speling mistake in the documentation
641dce9 Add Configuration and Keyboard Commands to Overview documentation.
ff49ecb Closes #29. wtf.go --help [module name] returns help text if any is available.
9e9ef93 Update the readme
38cf1d5 Security module now displays logged-in users
efaccc8 Added Overview page to documentation
5d66b2a Improve the state of the Makefile a bit
ca4d6f2 Add 'make dependencies' to the Makefile
cd5a796 Fix bug with positioning in which I hard-coded the positions because....?
374832f Update the readme
ca81908 Add dramatic marketing emphasis to site homepage
216a313 Clean up the site sideabar
8bb9115 A very basic start to adding some unit tests
c190a44 Updated the screenshot to show all the modules
e2c27ab Add installation instructions to documentation
ca7d867 h2 styling in the site
0d1c9ca Add documentation for CmdRunner
a62b910 Closes #43. Add CommandRunner module to the app.
c3f1402 WIP
a6dce55 Update the doc site

73
dist/config.yaml vendored
View File

@ -1,73 +0,0 @@
project_name: wtf
release:
github:
owner: senorprogrammer
name: wtf
name_template: '{{.Tag}}'
brew:
name: wtf
commit_author:
name: goreleaserbot
email: goreleaser@carlosbecker.com
install: bin.install "wtf"
scoop:
commit_author:
name: goreleaserbot
email: goreleaser@carlosbecker.com
builds:
- goos:
- darwin
- linux
goarch:
- amd64
goarm:
- "6"
targets:
- darwin_amd64
- linux_amd64
main: .
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
binary: wtf
lang: go
archive:
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
}}v{{ .Arm }}{{ end }}'
format: tar.gz
files:
- licence*
- LICENCE*
- license*
- LICENSE*
- readme*
- README*
- changelog*
- CHANGELOG*
nfpm:
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
}}v{{ .Arm }}{{ end }}'
bindir: /usr/local/bin
snapcraft:
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
}}v{{ .Arm }}{{ end }}'
snapshot:
name_template: SNAPSHOT-{{ .Commit }}
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
dist: dist
sign:
cmd: gpg
args:
- --output
- $signature
- --detach-sig
- $artifact
signature: ${artifact}.sig
artifacts: none
env_files:
github_token: ~/.config/goreleaser/github_token
before:
hooks:
- make install
github_urls:
download: https://github.com

BIN
dist/darwin_amd64/wtf vendored

Binary file not shown.

BIN
dist/linux_amd64/wtf vendored

Binary file not shown.

View File

@ -1,2 +0,0 @@
0167b691f57126d3a5cd6ffb4a6ba6115a9b3c5a48541db370530761400b9a21 wtf_0.0.3_linux_amd64.tar.gz
9905629c87fef6c3483bbdd1f8fcf69f4821da9aa80f05b22a8162a063c7905f wtf_0.0.3_darwin_amd64.tar.gz

Binary file not shown.

Binary file not shown.

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -42,7 +42,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -67,14 +67,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -1,5 +1,4 @@
html,
body
html, body
{
font-family: 'Fira Sans', sans-serif;
font-size: 18px;
@ -7,6 +6,10 @@ body
line-height: 1.5;
}
.clear {
clear: both;
}
.img-circle
{
border-radius: 50%;

View File

@ -34,13 +34,14 @@
html {
font-family: 'Fira Sans', 'Helvetica Neue', 'Arial', sans-serif;
font-weight:300;
}
@media (min-width: 48em) {
html {
font-size: 16px;
}
}
@media (min-width: 58em) {
html {
font-size: 20px;
@ -63,13 +64,14 @@ pre {
padding: 2rem 1rem;
color: rgba(255,255,255,.5);
background-color: #300030;
height: 100%;
float: left;
}
@media (min-width: 48em) {
.sidebar {
position: fixed;
position: relative;
top: 0;
left: 0;
bottom: 0;
width: 18rem;
text-align: left;
}

BIN
docs/img/dude_wtf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -41,7 +41,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -66,14 +66,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -6,11 +6,60 @@
<description>Recent content on WTF - A Terminal Dashboard</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 26 May 2018 19:26:23 -0700</lastBuildDate>
<lastBuildDate>Sun, 03 Jun 2018 20:06:40 -0700</lastBuildDate>
<atom:link href="https://wtfutil.com/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Cryptolive</title>
<link>https://wtfutil.com/posts/modules/cryptocurrencies/cryptolive/</link>
<pubDate>Sun, 03 Jun 2018 20:06:40 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/cryptocurrencies/cryptolive/</guid>
<description>Added in v0.0.5.
Compare crypto currencies using CryptoCompare.
Source Code wtf/cryptocurrencies/cryptolive/ Required ENV Vars None.
Keyboard Commands None.
Configuration cryptolive:colors:from:name:coraldisplayName:greyto:name:whiteprice:greencurrencies:BTC:displayName:Bitcointo:-USD-EUR-ETHETH:displayName:Ethereumto:-USD-EUR-ETHenabled:trueposition:top:5left:2height:1width:2refreshInterval:30updateInterval:15 Attributes colors.from.name Values: Any X11 color name.
colors.from.dispayName Values: Any X11 color name.
colors.to.name Values: Any X11 color name.
colors.to.price Values: Any X11 color name.
currencies enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
position Defines where in the grid this module&amp;rsquo;s widget will be displayed.</description>
</item>
<item>
<title>Prettyweather</title>
<link>https://wtfutil.com/posts/modules/prettyweather/</link>
<pubDate>Sat, 02 Jun 2018 05:32:04 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/prettyweather/</guid>
<description>🔬 Experimental
Displays weather information as ASCII art from Wttr.in.
Source Code wtf/prettyweather/ Required ENV Variables None.
Keyboard Commands None.
Configuration prettyweather:enabled:truecity:&amp;#34;tehran&amp;#34;position:top:3left:5height:1width:1refreshInterval:300unit:&amp;#34;c&amp;#34; Attributes city Optional. It will grab the current location from your IP address if omitted.
Values: The name of any city supported by Wttr.in.
enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
position Defines where in the grid this module&amp;rsquo;s widget will be displayed.</description>
</item>
<item>
<title>Module: IPInfo</title>
<link>https://wtfutil.com/posts/modules/ipinfo/</link>
<pubDate>Fri, 01 Jun 2018 23:18:48 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/ipinfo/</guid>
<description>Displays your current IP address information, from ipinfo.io.
Source Code wtf/ipinfo/ Required ENV Variables None.
Keyboard Commands None.
Configuration ipinfo:colors:name:redvalue:whiteenabled:trueposition:top:1left:2height:1width:1refreshInterval:15 Attributes colors.name The default colour for the row names. Values: Any X11 color name.
colors.value The default colour for the row values. Values: Any X11 color name.
enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
position Defines where in the grid this module&amp;rsquo;s widget will be displayed.</description>
</item>
<item>
<title>Modules: Power</title>
<link>https://wtfutil.com/posts/modules/power/</link>
@ -56,7 +105,7 @@ Quick Start Download the stand-alone, compiled binary. Unzip the downloaded fil
<guid>https://wtfutil.com/posts/installation/</guid>
<description>There are two ways to install WTF:
From Source Get this repo and install the dependencies:
go get github.com/senorprogrammer/wtf cd $GOPATH/src/github.com/senorprogrammer/wtf make install make run and that should probably do it.
go get -u github.com/senorprogrammer/wtf cd $GOPATH/src/github.com/senorprogrammer/wtf make install make run and that should probably do it.
As a Binary Grab the latest version from here:
https://github.com/senorprogrammer/wtf/releases expand it, and cd into the resulting directory. Then run:
./wtf and that should also do it.</description>
@ -82,7 +131,7 @@ cmd The terminal command to be run, withouth the arguments. Ie: ping, whoami, cu
<guid>https://wtfutil.com/posts/configuration/attributes/</guid>
<description>The following top-level attributes are configurable in config.yml. See this example config file for more details.
wtf:colors:background:&amp;#34;red&amp;#34;border:Focusable:&amp;#34;darkslateblue&amp;#34;focused:&amp;#34;orange&amp;#34;normal:&amp;#34;gray&amp;#34;grid:# How _wide_ the columns are, in terminal characters. In this case we have# six columns, each of which are 35 characters widecolumns:[35,35,35,35,35,35]# How _high_ the rows are, in terminal lines. In this case we have five rows# that support ten line of text, one of three lines, and one of fourrows:[10,10,10,10,10,3,4]# The app redraws itself once a secondrefreshInterval:1 Attributes colors.</description>
wtf:colors:background:&amp;#34;red&amp;#34;border:Focusable:&amp;#34;darkslateblue&amp;#34;focused:&amp;#34;orange&amp;#34;normal:&amp;#34;gray&amp;#34;grid:# How _wide_ the columns are, in terminal characters. In this case we have# six columns, each of which are 35 characters widecolumns:[35,35,35,35,35,35]# How _high_ the rows are, in terminal lines. In this case we have five rows# that support ten line of text, one of three lines, and one of fourrows:[10,10,10,10,10,3,4]# The app redraws itself once a secondrefreshInterval:1term:&amp;#34;xterm-256color&amp;#34; Attributes colors.</description>
</item>
<item>
@ -108,7 +157,7 @@ Key: j Action: Select the next item in the list.</description>
<description>Displays all Jira issues assigned to you for the specified project.
Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key.
Keyboard Commands None.
Configuration jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:trueposition:top:4left:1height:1width:2project:&amp;#34;JIRA&amp;#34;refreshInterval:900username:&amp;#34;chris.cummer&amp;#34; Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.
Configuration jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:&amp;#34;JIRA&amp;#34;refreshInterval:900username:&amp;#34;chris.cummer&amp;#34; Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.
colors.rows.odd Define the foreground color for odd-numbered rows. Values: Any X11 color name.
domain Your Jira corporate domain. Values: A valid URI.
email The email address associated with your Jira account.</description>
@ -121,12 +170,10 @@ email The email address associated with your Jira account.</description>
<guid>https://wtfutil.com/posts/modules/gcal/</guid>
<description>Displays your upcoming Google calendar events.
Not: Setting up access to Google Calendars for Go is a bit unobvious. Check out Google&amp;rsquo;s Go Quickstart first and if you have problems, then take a look at this comment by WesleydeSouza which offers a slightly different approach.
Source Code wtf/gcal/ Required ENV Variables Key: WTF_GOOGLE_CAL_CLIENT_ID Value: Your Google API client ID.
Key: WTF_GOOGLE_CAL_CLIENT_SECRET Value: Your Google API client secret.
Keyboard Commands None.
Configuration gcal:colors:title:&amp;#34;red&amp;#34;description:&amp;#34;lightblue&amp;#34;highlights:-[&amp;#39;1on1|1\/11&amp;#39;,&amp;#39;green&amp;#39;]-[&amp;#39;apple|google|aws&amp;#39;,&amp;#39;blue&amp;#39;]-[&amp;#39;interview|meet&amp;#39;,&amp;#39;magenta&amp;#39;]-[&amp;#39;lunch&amp;#39;,&amp;#39;yellow&amp;#39;]past:&amp;#34;gray&amp;#34;conflictIcon:&amp;#34;🚨&amp;#34;currentIcon:&amp;#34;💥&amp;#34;displayResponseStatus:trueemail:&amp;#34;chriscummer@me.com&amp;#34;enabled:trueeventCount:12position:top:0left:0height:4width:1refreshInterval:300secretFile:&amp;#34;~/.wtf/gcal/client_secret.json&amp;#34;withLocation:true Attributes colors.title The default colour for calendar event titles. Values: Any X11 color name.
colors.description The default color for calendar event descriptions. Values: Any X11 color name.
colors.highlights A list of arrays that define a regular expression pattern and a color.</description>
Keyboard Commands None.</description>
</item>
<item>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>
@ -127,7 +130,8 @@ See this <a href="https://github.com/senorprogrammer/wtf/blob/master/_sample_con
</span><span class="w"> </span><span class="c"># that support ten line of text, one of three lines, and one of four</span><span class="w">
</span><span class="w"> </span>rows<span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">10</span><span class="p">,</span><span class="w"> </span><span class="m">3</span><span class="p">,</span><span class="w"> </span><span class="m">4</span><span class="p">]</span><span class="w">
</span><span class="w"> </span><span class="c"># The app redraws itself once a second</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">1</span></code></pre></div>
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>term<span class="p">:</span><span class="w"> </span><span class="s2">&#34;xterm-256color&#34;</span></code></pre></div>
<h3 id="attributes">Attributes</h3>
<p><code>colors.background</code> <br />
@ -171,6 +175,15 @@ How often, in seconds, the UI refreshes itself. <br />
change. <br />
Values: A positive integer, <code>0..n</code>.</p>
<p><code>term</code> <br />
<em>Optional</em>. <br />
Sets a custom value for the terminal type this app runs in. Leave this entry out of the config if you simply want to use your terminal&rsquo;s
default setting. <br />
<strong>Note:</strong> If an invalid value is provided for this setting, the app will
crash with a <code>&quot;terminal entry not found&quot;</code> error. <br />
Values: Any valid terminal type (ie: vt100, xterm, xterm-256color, ansi,
etc.).</p>
</div>
<div class="footer">

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -42,7 +42,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -67,14 +67,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>
@ -95,6 +98,27 @@
<h1 class="title">Posts</h1>
<ul class="posts">
<li>
<span>
<a href="https://wtfutil.com/posts/modules/cryptocurrencies/cryptolive/">Cryptolive</a>
<time class="pull-right post-list">Jun 03, 2018</time>
</span>
</li><li>
<span>
<a href="https://wtfutil.com/posts/modules/prettyweather/">Prettyweather</a>
<time class="pull-right post-list">Jun 02, 2018</time>
</span>
</li><li>
<span>
<a href="https://wtfutil.com/posts/modules/ipinfo/">Module: IPInfo</a>
<time class="pull-right post-list">Jun 01, 2018</time>
</span>
</li><li>
<span>
<a href="https://wtfutil.com/posts/modules/power/">Modules: Power</a>

View File

@ -6,11 +6,60 @@
<description>Recent content in Posts on WTF - A Terminal Dashboard</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 26 May 2018 19:26:23 -0700</lastBuildDate>
<lastBuildDate>Sun, 03 Jun 2018 20:06:40 -0700</lastBuildDate>
<atom:link href="https://wtfutil.com/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Cryptolive</title>
<link>https://wtfutil.com/posts/modules/cryptocurrencies/cryptolive/</link>
<pubDate>Sun, 03 Jun 2018 20:06:40 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/cryptocurrencies/cryptolive/</guid>
<description>Added in v0.0.5.
Compare crypto currencies using CryptoCompare.
Source Code wtf/cryptocurrencies/cryptolive/ Required ENV Vars None.
Keyboard Commands None.
Configuration cryptolive:colors:from:name:coraldisplayName:greyto:name:whiteprice:greencurrencies:BTC:displayName:Bitcointo:-USD-EUR-ETHETH:displayName:Ethereumto:-USD-EUR-ETHenabled:trueposition:top:5left:2height:1width:2refreshInterval:30updateInterval:15 Attributes colors.from.name Values: Any X11 color name.
colors.from.dispayName Values: Any X11 color name.
colors.to.name Values: Any X11 color name.
colors.to.price Values: Any X11 color name.
currencies enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
position Defines where in the grid this module&amp;rsquo;s widget will be displayed.</description>
</item>
<item>
<title>Prettyweather</title>
<link>https://wtfutil.com/posts/modules/prettyweather/</link>
<pubDate>Sat, 02 Jun 2018 05:32:04 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/prettyweather/</guid>
<description>🔬 Experimental
Displays weather information as ASCII art from Wttr.in.
Source Code wtf/prettyweather/ Required ENV Variables None.
Keyboard Commands None.
Configuration prettyweather:enabled:truecity:&amp;#34;tehran&amp;#34;position:top:3left:5height:1width:1refreshInterval:300unit:&amp;#34;c&amp;#34; Attributes city Optional. It will grab the current location from your IP address if omitted.
Values: The name of any city supported by Wttr.in.
enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
position Defines where in the grid this module&amp;rsquo;s widget will be displayed.</description>
</item>
<item>
<title>Module: IPInfo</title>
<link>https://wtfutil.com/posts/modules/ipinfo/</link>
<pubDate>Fri, 01 Jun 2018 23:18:48 -0700</pubDate>
<guid>https://wtfutil.com/posts/modules/ipinfo/</guid>
<description>Displays your current IP address information, from ipinfo.io.
Source Code wtf/ipinfo/ Required ENV Variables None.
Keyboard Commands None.
Configuration ipinfo:colors:name:redvalue:whiteenabled:trueposition:top:1left:2height:1width:1refreshInterval:15 Attributes colors.name The default colour for the row names. Values: Any X11 color name.
colors.value The default colour for the row values. Values: Any X11 color name.
enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false.
position Defines where in the grid this module&amp;rsquo;s widget will be displayed.</description>
</item>
<item>
<title>Modules: Power</title>
<link>https://wtfutil.com/posts/modules/power/</link>
@ -56,7 +105,7 @@ Quick Start Download the stand-alone, compiled binary. Unzip the downloaded fil
<guid>https://wtfutil.com/posts/installation/</guid>
<description>There are two ways to install WTF:
From Source Get this repo and install the dependencies:
go get github.com/senorprogrammer/wtf cd $GOPATH/src/github.com/senorprogrammer/wtf make install make run and that should probably do it.
go get -u github.com/senorprogrammer/wtf cd $GOPATH/src/github.com/senorprogrammer/wtf make install make run and that should probably do it.
As a Binary Grab the latest version from here:
https://github.com/senorprogrammer/wtf/releases expand it, and cd into the resulting directory. Then run:
./wtf and that should also do it.</description>
@ -82,7 +131,7 @@ cmd The terminal command to be run, withouth the arguments. Ie: ping, whoami, cu
<guid>https://wtfutil.com/posts/configuration/attributes/</guid>
<description>The following top-level attributes are configurable in config.yml. See this example config file for more details.
wtf:colors:background:&amp;#34;red&amp;#34;border:Focusable:&amp;#34;darkslateblue&amp;#34;focused:&amp;#34;orange&amp;#34;normal:&amp;#34;gray&amp;#34;grid:# How _wide_ the columns are, in terminal characters. In this case we have# six columns, each of which are 35 characters widecolumns:[35,35,35,35,35,35]# How _high_ the rows are, in terminal lines. In this case we have five rows# that support ten line of text, one of three lines, and one of fourrows:[10,10,10,10,10,3,4]# The app redraws itself once a secondrefreshInterval:1 Attributes colors.</description>
wtf:colors:background:&amp;#34;red&amp;#34;border:Focusable:&amp;#34;darkslateblue&amp;#34;focused:&amp;#34;orange&amp;#34;normal:&amp;#34;gray&amp;#34;grid:# How _wide_ the columns are, in terminal characters. In this case we have# six columns, each of which are 35 characters widecolumns:[35,35,35,35,35,35]# How _high_ the rows are, in terminal lines. In this case we have five rows# that support ten line of text, one of three lines, and one of fourrows:[10,10,10,10,10,3,4]# The app redraws itself once a secondrefreshInterval:1term:&amp;#34;xterm-256color&amp;#34; Attributes colors.</description>
</item>
<item>
@ -108,7 +157,7 @@ Key: j Action: Select the next item in the list.</description>
<description>Displays all Jira issues assigned to you for the specified project.
Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key.
Keyboard Commands None.
Configuration jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:trueposition:top:4left:1height:1width:2project:&amp;#34;JIRA&amp;#34;refreshInterval:900username:&amp;#34;chris.cummer&amp;#34; Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.
Configuration jira:colors:rows:even:&amp;#34;lightblue&amp;#34;odd:&amp;#34;white&amp;#34;domain:&amp;#34;https://umbrellacorp.atlassian.net&amp;#34;email:&amp;#34;chriscummer@me.com&amp;#34;enabled:truejql:&amp;#34;issueType = Story&amp;#34;position:top:4left:1height:1width:2project:&amp;#34;JIRA&amp;#34;refreshInterval:900username:&amp;#34;chris.cummer&amp;#34; Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.
colors.rows.odd Define the foreground color for odd-numbered rows. Values: Any X11 color name.
domain Your Jira corporate domain. Values: A valid URI.
email The email address associated with your Jira account.</description>
@ -121,12 +170,10 @@ email The email address associated with your Jira account.</description>
<guid>https://wtfutil.com/posts/modules/gcal/</guid>
<description>Displays your upcoming Google calendar events.
Not: Setting up access to Google Calendars for Go is a bit unobvious. Check out Google&amp;rsquo;s Go Quickstart first and if you have problems, then take a look at this comment by WesleydeSouza which offers a slightly different approach.
Source Code wtf/gcal/ Required ENV Variables Key: WTF_GOOGLE_CAL_CLIENT_ID Value: Your Google API client ID.
Key: WTF_GOOGLE_CAL_CLIENT_SECRET Value: Your Google API client secret.
Keyboard Commands None.
Configuration gcal:colors:title:&amp;#34;red&amp;#34;description:&amp;#34;lightblue&amp;#34;highlights:-[&amp;#39;1on1|1\/11&amp;#39;,&amp;#39;green&amp;#39;]-[&amp;#39;apple|google|aws&amp;#39;,&amp;#39;blue&amp;#39;]-[&amp;#39;interview|meet&amp;#39;,&amp;#39;magenta&amp;#39;]-[&amp;#39;lunch&amp;#39;,&amp;#39;yellow&amp;#39;]past:&amp;#34;gray&amp;#34;conflictIcon:&amp;#34;🚨&amp;#34;currentIcon:&amp;#34;💥&amp;#34;displayResponseStatus:trueemail:&amp;#34;chriscummer@me.com&amp;#34;enabled:trueeventCount:12position:top:0left:0height:4width:1refreshInterval:300secretFile:&amp;#34;~/.wtf/gcal/client_secret.json&amp;#34;withLocation:true Attributes colors.title The default colour for calendar event titles. Values: Any X11 color name.
colors.description The default color for calendar event descriptions. Values: Any X11 color name.
colors.highlights A list of arrays that define a regular expression pattern and a color.</description>
Keyboard Commands None.</description>
</item>
<item>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>
@ -114,7 +117,7 @@
<h2 id="from-source">From Source</h2>
<p>Get this repo and install the dependencies:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">go get github.com/senorprogrammer/wtf
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">go get -u github.com/senorprogrammer/wtf
<span class="nb">cd</span> <span class="nv">$GOPATH</span>/src/github.com/senorprogrammer/wtf
make install
make run</code></pre></div>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -0,0 +1,201 @@
<!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>Cryptolive | WTF - A Terminal Dashboard</title>
<meta content="Cryptolive - 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>
</head>
<body>
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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/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>
</div>
</div>
<div class="content container">
<div class="post">
<h1>Cryptolive</h1>
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
Jun 03, 2018
<br/>
</span>
</div>
<p>Added in <code>v0.0.5</code>.</p>
<p>Compare crypto currencies using <a href="https://cryptocompare.com">CryptoCompare</a>.</p>
<h2 id="source-code">Source Code</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/cryptocurrencies/cryptolive/</code></pre></div>
<h2 id="required-env-vars">Required ENV Vars</h2>
<p>None.</p>
<h2 id="keyboard-commands">Keyboard Commands</h2>
<p>None.</p>
<h2 id="configuration">Configuration</h2>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">cryptolive<span class="p">:</span><span class="w">
</span><span class="w"> </span>colors<span class="p">:</span><span class="w">
</span><span class="w"> </span>from<span class="p">:</span><span class="w">
</span><span class="w"> </span>name<span class="p">:</span><span class="w"> </span>coral<span class="w">
</span><span class="w"> </span>displayName<span class="p">:</span><span class="w"> </span>grey<span class="w">
</span><span class="w"> </span>to<span class="p">:</span><span class="w">
</span><span class="w"> </span>name<span class="p">:</span><span class="w"> </span>white<span class="w">
</span><span class="w"> </span>price<span class="p">:</span><span class="w"> </span>green<span class="w">
</span><span class="w"> </span>currencies<span class="p">:</span><span class="w">
</span><span class="w"> </span>BTC<span class="p">:</span><span class="w">
</span><span class="w"> </span>displayName<span class="p">:</span><span class="w"> </span>Bitcoin<span class="w">
</span><span class="w"> </span>to<span class="p">:</span><span class="w">
</span><span class="w"> </span>-<span class="w"> </span>USD<span class="w">
</span><span class="w"> </span>-<span class="w"> </span>EUR<span class="w">
</span><span class="w"> </span>-<span class="w"> </span>ETH<span class="w">
</span><span class="w"> </span>ETH<span class="p">:</span><span class="w">
</span><span class="w"> </span>displayName<span class="p">:</span><span class="w"> </span>Ethereum<span class="w">
</span><span class="w"> </span>to<span class="p">:</span><span class="w">
</span><span class="w"> </span>-<span class="w"> </span>USD<span class="w">
</span><span class="w"> </span>-<span class="w"> </span>EUR<span class="w">
</span><span class="w"> </span>-<span class="w"> </span>ETH<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>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">5</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">2</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">2</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">30</span><span class="w">
</span><span class="w"> </span>updateInterval<span class="p">:</span><span class="w"> </span><span class="m">15</span></code></pre></div>
<h3 id="attributes">Attributes</h3>
<p><code>colors.from.name</code> <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.</p>
<p><code>colors.from.dispayName</code> <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.</p>
<p><code>colors.to.name</code> <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.</p>
<p><code>colors.to.price</code> <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11
color name</a>.</p>
<p><code>currencies</code> <br /></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>
</div>
<div class="footer">
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,243 @@
<!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>Module: CryptoLive | WTF - A Terminal Dashboard</title>
<meta content="Module: CryptoLive - 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>
</head>
<body>
<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/clocks/">Clocks</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/cryptolive/">CryptoLive</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/gcal/">Google Calendar</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/jira/">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/power/">Power</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/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>
</div>
</div>
<div class="content container">
<div class="post">
<h1>Module: CryptoLive</h1>
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
Jun 02, 2018
<br/>
</span>
</div>
<p>Compare crypto currencies using cryptocompare.com</p>
<h2 id="source-code">Source Code</h2>
<div class="highlight">
<pre class="chroma"><code class="language-bash" data-lang="bash">wtf/cryptolive/</code></pre>
</div>
<h2 id="required-env-variables">Required ENV Variables</h2>
<p>None.</p>
<h2 id="keyboard-commands">Keyboard Commands</h2>
<p>None.</p>
<h2 id="configuration">Configuration</h2>
<div class="highlight">
<pre class="chroma"><code class="language-yaml" data-lang="yaml">cryptolive<span class="p">:</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>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">1</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">2</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">1</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">15</span><span class="w">
</span><span class="w"> </span>updateInterval<span class="p">:</span><span class="w"> </span><span class="m">15</span><span class="w">
</span><span class="w"> </span>currencies<span class="p">:</span><span class="w"> </span><span class="w">
</span><span class="w"> </span>BTC<span class="p">:</span><span class="w">
</span><span class="w"> </span>displayName<span class="p">:</span><span class="w"> </span><span class="m">Bitcoin</span><span class="w">
</span><span class="w"> </span>to<span class="p">:</span><span class="w"> </span><span class="w">
</span><span class="w"> - </span>USD<span class="p"></span><span class="w">
</span><span class="w"> - </span>EUR<span class="p"></span><span class="w">
</span><span class="w"> - </span>ETH<span class="p"></span><span class="w">
</span><span class="w"> </span>ETH<span class="p"></span>:<span class="w">
</span><span class="w"> </span>displayName<span class="p">: </span>Ethereum<span class="w">
</span><span class="w"> </span>to<span class="p">: </span><span class="w">
</span><span class="w"> - </span>USD<span class="p"></span><span class="w">
</span><span class="w"> - </span>EUR<span class="p"></span><span class="w">
</span><span class="w"> - </span>ETH<span class="p"></span><span class="w">
</span><span class="w"> </span>colors<span class="p"></span>: <span class="w">
</span><span class="w"> </span>from<span class="p"></span>: <span class="w">
</span><span class="w"> </span>name<span class="p"></span>: coral<span class="w">
</span><span class="w"> </span>displayName<span class="p"></span>: grey<span class="w">
</span><span class="w"> </span>to<span class="p"></span>:<span class="w">
</span><span class="w"> </span>name<span class="p"></span>: white<span class="w">
</span><span class="w"> </span>price<span class="p"></span>: green<span class="w">
</span>
</code></pre>
</div>
<h3 id="attributes">Attributes</h3>
<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>updateInterval</code>
<br /> How often, in seconds, this module will update its data.
<br /> Values: A positive integer
<br/> Default Value: 10</p>
<p>
<code>colors</code>
<br /> Sets color of texts.
<br /> Values: A valid color
</p>
</div>
<div class="footer">
</div>
</div>
</body>
</html>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>
@ -113,6 +116,9 @@
<p><img src="/imgs/modules/gcal.png" width="320" height="389" alt="gcal screenshot" /></p>
<p><strong>Not:</strong> Setting up access to Google Calendars for Go is a bit unobvious. Check out Google&rsquo;s <a href="https://developers.google.com/calendar/quickstart/go">Go Quickstart</a>
first and if you have problems, then take a look at this <a href="https://github.com/senorprogrammer/wtf/issues/83#issuecomment-393665229">comment by WesleydeSouza</a> which offers a slightly different approach.</p>
<h2 id="source-code">Source Code</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/gcal/</code></pre></div>
<h2 id="required-env-variables">Required ENV Variables</h2>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -0,0 +1,173 @@
<!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>Module: IPInfo | WTF - A Terminal Dashboard</title>
<meta content="Module: IPInfo - 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>
</head>
<body>
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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/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>
</div>
</div>
<div class="content container">
<div class="post">
<h1>Module: IPInfo</h1>
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
Jun 01, 2018
<br/>
</span>
</div>
<p>Displays your current IP address information, from ipinfo.io.</p>
<p><img src="/imgs/modules/ipinfo.png" width="320" height="199" alt="ipinfo screenshot" /></p>
<h2 id="source-code">Source Code</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/ipinfo/</code></pre></div>
<h2 id="required-env-variables">Required ENV Variables</h2>
<p>None.</p>
<h2 id="keyboard-commands">Keyboard Commands</h2>
<p>None.</p>
<h2 id="configuration">Configuration</h2>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">ipinfo<span class="p">:</span><span class="w">
</span><span class="w"> </span>colors<span class="p">:</span><span class="w">
</span><span class="w"> </span>name<span class="p">:</span><span class="w"> </span>red<span class="w">
</span><span class="w"> </span>value<span class="p">:</span><span class="w"> </span>white<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>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">1</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">2</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">1</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">15</span></code></pre></div>
<h3 id="attributes">Attributes</h3>
<p><code>colors.name</code> <br />
The default colour for the row names. <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11 color</a> name.</p>
<p><code>colors.value</code> <br />
The default colour for the row values. <br />
Values: Any <a href="https://en.wikipedia.org/wiki/X11_color_names">X11 color</a> name.</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>
</div>
<div class="footer">
</div>
</div>
</body>
</html>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>
@ -133,6 +136,7 @@
</span><span class="w"> </span>domain<span class="p">:</span><span class="w"> </span><span class="s2">&#34;https://umbrellacorp.atlassian.net&#34;</span><span class="w">
</span><span class="w"> </span>email<span class="p">:</span><span class="w"> </span><span class="s2">&#34;chriscummer@me.com&#34;</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>jql<span class="p">:</span><span class="w"> </span><span class="s2">&#34;issueType = Story&#34;</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">
@ -165,6 +169,11 @@ Values: A valid email address string.</p>
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>jql</code> <br />
<em>Optional</em> <br />
Custom JQL to be appended to the search query. <br />
Values: See <a href="https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql">Search Jira like a boss with JQL</a> for details.</p>
<p><code>position</code> <br />
Defines where in the grid this module&rsquo;s widget will be displayed. <br /></p>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -0,0 +1,177 @@
<!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>Prettyweather | WTF - A Terminal Dashboard</title>
<meta content="Prettyweather - 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>
</head>
<body>
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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/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>
</div>
</div>
<div class="content container">
<div class="post">
<h1>Prettyweather</h1>
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
Jun 02, 2018
<br/>
</span>
</div>
<p><strong>🔬 Experimental</strong></p>
<p>Displays weather information as ASCII art from
<a href="http://wttr.in">Wttr.in</a>.</p>
<p><img src="/imgs/modules/prettyweather.png" width="320" height="191" alt="prettyweather screenshot" /></p>
<h2 id="source-code">Source Code</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/prettyweather/</code></pre></div>
<h2 id="required-env-variables">Required ENV Variables</h2>
<p>None.</p>
<h2 id="keyboard-commands">Keyboard Commands</h2>
<p>None.</p>
<h2 id="configuration">Configuration</h2>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="w"> </span>prettyweather<span class="p">:</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>city<span class="p">:</span><span class="w"> </span><span class="s2">&#34;tehran&#34;</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">3</span><span class="w">
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">5</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">1</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">300</span><span class="w">
</span><span class="w"> </span>unit<span class="p">:</span><span class="w"> </span><span class="s2">&#34;c&#34;</span></code></pre></div>
<h3 id="attributes">Attributes</h3>
<p><code>city</code> <br />
<em>Optional</em>. It will grab the current location from your IP address if
omitted.<br />
Values: The name of any city supported by <a href="http://wttr.in">Wttr.in</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>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>unit</code> <br />
<em>Optional</em>. It will use metric if you are out of US and imperial for US.<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">
</div>
</div>
</body>
</html>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -40,7 +40,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -65,14 +65,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

View File

@ -2,6 +2,21 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://wtfutil.com/posts/modules/cryptocurrencies/cryptolive/</loc>
<lastmod>2018-06-03T20:06:40-07:00</lastmod>
</url>
<url>
<loc>https://wtfutil.com/posts/modules/prettyweather/</loc>
<lastmod>2018-06-02T05:32:04-07:00</lastmod>
</url>
<url>
<loc>https://wtfutil.com/posts/modules/ipinfo/</loc>
<lastmod>2018-06-01T23:18:48-07:00</lastmod>
</url>
<url>
<loc>https://wtfutil.com/posts/modules/power/</loc>
<lastmod>2018-05-26T19:26:23-07:00</lastmod>
@ -114,7 +129,7 @@
<url>
<loc>https://wtfutil.com/posts/</loc>
<lastmod>2018-05-26T19:26:23-07:00</lastmod>
<lastmod>2018-06-03T20:06:40-07:00</lastmod>
<priority>0</priority>
</url>
@ -125,7 +140,7 @@
<url>
<loc>https://wtfutil.com/</loc>
<lastmod>2018-05-26T19:26:23-07:00</lastmod>
<lastmod>2018-06-03T20:06:40-07:00</lastmod>
<priority>0</priority>
</url>

View File

@ -42,7 +42,7 @@
</head>
<body>
<div class="sidebar">
<div class="container sidebar-sticky">
<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>
@ -67,14 +67,17 @@
<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/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/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/gcal/">Google Calendar</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/jira/">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/power/">Power</a></li>
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather <span title="experimental">🔬</span></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>

BIN
gcal/.DS_Store vendored

Binary file not shown.

View File

@ -20,7 +20,7 @@ type Widget struct {
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" 🍿 Calendar ", "gcal", false),
TextWidget: wtf.NewTextWidget(" Calendar ", "gcal", false),
}
return &widget
@ -36,9 +36,8 @@ func (widget *Widget) Refresh() {
events, _ := Fetch()
widget.UpdateRefreshedAt()
widget.View.Clear()
fmt.Fprintf(widget.View, "%s", widget.contentFrom(events))
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(events)))
}
/* -------------------- Unexported Functions -------------------- */

View File

@ -9,7 +9,6 @@ import (
)
func (widget *Widget) display() {
widget.View.Clear()
repoData := widget.currentData()
if repoData == nil {
@ -18,7 +17,7 @@ func (widget *Widget) display() {
}
title := fmt.Sprintf("[green]%s[white]\n", repoData.Repository)
widget.View.SetTitle(fmt.Sprintf(" Git: %s ", title))
widget.View.SetTitle(fmt.Sprintf("%s- %s", widget.Name, title))
str := wtf.SigilStr(len(widget.Data), widget.Idx, widget.View) + "\n"
str = str + " [red]Branch[white]\n"
@ -28,7 +27,7 @@ func (widget *Widget) display() {
str = str + "\n"
str = str + widget.formatCommits(repoData.Commits)
fmt.Fprintf(widget.View, "%s", str)
widget.View.SetText(fmt.Sprintf("%s", str))
}
func (widget *Widget) formatChanges(data []string) string {

View File

@ -69,6 +69,19 @@ func (repo *GitRepo) repository() string {
return str
}
func (repo *GitRepo) pull() string {
arg := []string{repo.gitDir(), repo.workTree(), "pull"}
cmd := exec.Command("git", arg...)
str := wtf.ExecuteCommand(cmd)
return str
}
func (repo *GitRepo) checkout(branch string) string {
arg := []string{repo.gitDir(), repo.workTree(), "checkout", branch}
cmd := exec.Command("git", arg...)
str := wtf.ExecuteCommand(cmd)
return str
}
func (repo *GitRepo) gitDir() string {
return fmt.Sprintf("--git-dir=%s/.git", repo.Path)

View File

@ -16,6 +16,8 @@ const HelpText = `
/: Show/hide this help window
h: Previous git repository
l: Next git repository
p: Pull current git repository
c: Checkout to branch
arrow left: Previous git repository
arrow right: Next git repository
@ -75,8 +77,72 @@ func (widget *Widget) Prev() {
widget.display()
}
func (widget *Widget) Pull() {
repoToPull := widget.Data[widget.Idx]
repoToPull.pull()
widget.Refresh()
}
func (widget *Widget) Checkout() {
form := widget.modalForm("Branch to checkout:", "")
checkoutFctn := func() {
text := form.GetFormItem(0).(*tview.InputField).GetText()
repoToCheckout := widget.Data[widget.Idx]
repoToCheckout.checkout(text)
widget.pages.RemovePage("modal")
widget.app.SetFocus(widget.View)
widget.display()
widget.Refresh()
}
widget.addButtons(form, checkoutFctn)
widget.modalFocus(form)
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) addCheckoutButton(form *tview.Form, fctn func()) {
form.AddButton("Checkout", fctn)
}
func (widget *Widget) addButtons(form *tview.Form, checkoutFctn func()) {
widget.addCheckoutButton(form, checkoutFctn)
widget.addCancelButton(form)
}
func (widget *Widget) addCancelButton(form *tview.Form) {
cancelFn := func() {
widget.pages.RemovePage("modal")
widget.app.SetFocus(widget.View)
widget.display()
}
form.AddButton("Cancel", cancelFn)
form.SetCancelFunc(cancelFn)
}
func (widget *Widget) modalFocus(form *tview.Form) {
frame := widget.modalFrame(form)
widget.pages.AddPage("modal", frame, false, true)
widget.app.SetFocus(frame)
}
func (widget *Widget) modalForm(lbl, text string) *tview.Form {
form := tview.NewForm().
SetButtonsAlign(tview.AlignCenter).
SetButtonTextColor(tview.Styles.PrimaryTextColor)
form.AddInputField(lbl, text, 60, nil, nil)
return form
}
func (widget *Widget) modalFrame(form *tview.Form) *tview.Frame {
_, _, w, h := widget.View.GetInnerRect()
frame := tview.NewFrame(form).SetBorders(0, 0, 0, 0, 0, 0)
frame.SetBorder(true)
frame.SetRect(w+20, h+2, 80, 7)
return frame
}
func (widget *Widget) currentData() *GitRepo {
if len(widget.Data) == 0 {
@ -112,6 +178,12 @@ func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
case "l":
widget.Next()
return nil
case "p":
widget.Pull()
return nil
case "c":
widget.Checkout()
return nil
}
switch event.Key() {

View File

@ -7,7 +7,6 @@ import (
)
func (widget *Widget) display() {
widget.View.Clear()
repo := widget.currentGithubRepo()
if repo == nil {
@ -15,7 +14,7 @@ func (widget *Widget) display() {
return
}
widget.View.SetTitle(fmt.Sprintf(" Github: %s ", widget.title(repo)))
widget.View.SetTitle(fmt.Sprintf("%s- %s", widget.Name, widget.title(repo)))
str := wtf.SigilStr(len(widget.GithubRepos), widget.Idx, widget.View) + "\n"
str = str + " [red]Stats[white]\n"
@ -27,7 +26,7 @@ func (widget *Widget) display() {
str = str + " [red]My Pull Requests[white]\n"
str = str + widget.displayMyPullRequests(repo, Config.UString("wtf.mods.github.username"))
fmt.Fprintf(widget.View, str)
widget.View.SetText(str)
}
func (widget *Widget) displayMyPullRequests(repo *GithubRepo, username string) string {

129
ipinfo/widget.go Normal file
View File

@ -0,0 +1,129 @@
package ipinfo
import (
"encoding/json"
"fmt"
"net/http"
"text/template"
"bytes"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
result string
colors struct {
name, value string
}
}
type ipinfo struct {
Ip string `json:"ip"`
Hostname string `json:"hostname"`
City string `json:"city"`
Region string `json:"region"`
Country string `json:"country"`
Coordinates string `json:"loc"`
PostalCode string `json:"postal"`
Organization string `json:"org"`
}
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" IPInfo ", "ipinfo", false),
}
widget.View.SetWrap(false)
widget.config()
return &widget
}
func (widget *Widget) Refresh() {
if widget.Disabled() {
return
}
widget.UpdateRefreshedAt()
widget.ipinfo()
widget.View.Clear()
widget.View.SetText(widget.result)
}
//this method reads the config and calls ipinfo for ip information
func (widget *Widget) ipinfo() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://ipinfo.io/", nil)
if err != nil {
widget.result = fmt.Sprintf("%s", err.Error())
return
}
req.Header.Set("User-Agent", "curl")
response, err := client.Do(req)
if err != nil {
widget.result = fmt.Sprintf("%s", err.Error())
return
}
defer response.Body.Close()
if err != nil {
widget.result = fmt.Sprintf("%s", err.Error())
return
}
var info ipinfo
err = json.NewDecoder(response.Body).Decode(&info)
if err != nil {
widget.result = fmt.Sprintf("%s", err.Error())
return
}
widget.setResult(&info)
}
// read module configs
func (widget *Widget) config() {
nameColor, valueColor := Config.UString("wtf.mods.ipinfo.colors.name", "red"), Config.UString("wtf.mods.ipinfo.colors.value", "white")
widget.colors.name = nameColor
widget.colors.value = valueColor
}
func (widget *Widget) setResult(info *ipinfo) {
resultTemplate, _ := template.New("ipinfo_result").Parse(
formatableText("IP Address", "Ip") +
formatableText("Hostname", "Hostname") +
formatableText("City", "City") +
formatableText("Region", "Region") +
formatableText("Country", "Country") +
formatableText("Coordinates", "Coordinates") +
formatableText("Postal Code", "PostalCode") +
formatableText("Organization", "Organization"),
)
resultBuffer := new(bytes.Buffer)
resultTemplate.Execute(resultBuffer, map[string]string{
"nameColor": widget.colors.name,
"valueColor": widget.colors.value,
"Ip": info.Ip,
"Hostname": info.Hostname,
"City": info.City,
"Region": info.Region,
"Country": info.Country,
"Coordinates": info.Coordinates,
"PostalCode": info.PostalCode,
"Organization": info.Organization,
})
widget.result = resultBuffer.String()
}
func formatableText(key, value string) string {
return fmt.Sprintf(" [{{.nameColor}}]%s: [{{.valueColor}}]{{.%s}}\n", key, value)
}

View File

@ -7,11 +7,31 @@ import (
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
"strings"
)
func IssuesFor(username string) (*SearchResult, error) {
url := fmt.Sprintf("/rest/api/2/search?jql=assignee=%s", username)
func IssuesFor(username string, project string, jql string) (*SearchResult, error) {
query := []string{}
if project != "" {
query = append(query, buildJql("project", project))
}
if username != "" {
query = append(query, buildJql("assignee", username))
}
if jql != "" {
query = append(query, jql)
}
v := url.Values{}
v.Set("jql", strings.Join(query, " AND "))
url := fmt.Sprintf("/rest/api/2/search?%s", v.Encode())
resp, err := jiraRequest(url)
if err != nil {
@ -24,6 +44,10 @@ func IssuesFor(username string) (*SearchResult, error) {
return searchResult, nil
}
func buildJql(key string, value string) string {
return fmt.Sprintf("%s = \"%s\"", key, value)
}
/* -------------------- Unexported Functions -------------------- */
func jiraRequest(path string) (*http.Response, error) {

View File

@ -16,7 +16,7 @@ type Widget struct {
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget("JIRA", "jira", false),
TextWidget: wtf.NewTextWidget(" Jira ", "jira", false),
}
return &widget
@ -29,25 +29,24 @@ func (widget *Widget) Refresh() {
return
}
searchResult, err := IssuesFor(Config.UString("wtf.mods.jira.username"))
searchResult, err := IssuesFor(Config.UString("wtf.mods.jira.username"), Config.UString("wtf.mods.jira.project", ""), Config.UString("wtf.mods.jira.jql", ""))
widget.UpdateRefreshedAt()
widget.View.Clear()
if err != nil {
widget.View.SetWrap(true)
widget.View.SetTitle(fmt.Sprintf(" %s ", widget.Name))
widget.View.SetTitle(fmt.Sprintf("%s", widget.Name))
fmt.Fprintf(widget.View, "%v", err)
} else {
widget.View.SetWrap(false)
widget.View.SetTitle(
fmt.Sprintf(
" %s: [green]%s[white] ",
"%s- [green]%s[white]",
widget.Name,
Config.UString("wtf.mods.jira.project"),
),
)
fmt.Fprintf(widget.View, "%s", widget.contentFrom(searchResult))
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(searchResult)))
}
}

View File

@ -39,15 +39,15 @@ func (widget *Widget) Refresh() {
}
widget.UpdateRefreshedAt()
widget.View.SetTitle(fmt.Sprintf(" New Relic: [green]%s[white] ", appName))
widget.View.SetTitle(fmt.Sprintf("%s- [green]%s[white]", widget.Name, appName))
widget.View.Clear()
if depErr != nil {
widget.View.SetWrap(true)
fmt.Fprintf(widget.View, "%s", depErr)
widget.View.SetText(fmt.Sprintf("%s", depErr))
} else {
widget.View.SetWrap(false)
fmt.Fprintf(widget.View, "%s", widget.contentFrom(deploys))
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(deploys)))
}
}
@ -70,7 +70,7 @@ func (widget *Widget) contentFrom(deploys []nr.ApplicationDeployment) string {
var revLen = 8
if revLen > len(deploy.Revision) {
revLen = len(deploy.Revision)
revLen = len(deploy.Revision)
}
str = str + fmt.Sprintf(

View File

@ -17,7 +17,7 @@ type Widget struct {
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" OpsGenie ", "opsgenie", false),
TextWidget: wtf.NewTextWidget(" OpsGenie ", "opsgenie", false),
}
return &widget
@ -33,15 +33,14 @@ func (widget *Widget) Refresh() {
data, err := Fetch()
widget.UpdateRefreshedAt()
widget.View.SetTitle(" ⏰ On Call ")
widget.View.Clear()
widget.View.SetTitle(widget.Name)
if err != nil {
widget.View.SetWrap(true)
fmt.Fprintf(widget.View, "%s", err)
widget.View.SetText(fmt.Sprintf("%s", err))
} else {
widget.View.SetWrap(false)
fmt.Fprintf(widget.View, "%s", widget.contentFrom(data))
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(data)))
}
}

View File

@ -18,7 +18,7 @@ type Widget struct {
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" ⚡️ Power ", "power", false),
TextWidget: wtf.NewTextWidget(" Power ", "power", false),
Battery: NewBattery(),
}
@ -34,12 +34,11 @@ func (widget *Widget) Refresh() {
widget.UpdateRefreshedAt()
widget.Battery.Refresh()
widget.View.Clear()
str := ""
str = str + fmt.Sprintf(" %10s: %s\n", "Source", powerSource())
str = str + "\n"
str = str + widget.Battery.String()
fmt.Fprintf(widget.View, "%s", str)
widget.View.SetText(fmt.Sprintf("%s", str))
}

65
prettyweather/widget.go Normal file
View File

@ -0,0 +1,65 @@
package prettyweather
import (
"fmt"
"io/ioutil"
"net/http"
"strings"
"github.com/olebedev/config"
"github.com/senorprogrammer/wtf/wtf"
)
// Config is a pointer to the global config object
var Config *config.Config
type Widget struct {
wtf.TextWidget
result string
unit string
city string
}
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" Pretty Weather ", "prettyweather", false),
}
return &widget
}
func (widget *Widget) Refresh() {
if widget.Disabled() {
return
}
widget.UpdateRefreshedAt()
widget.prettyWeather()
widget.View.SetText(fmt.Sprintf("%s", widget.result))
}
//this method reads the config and calls wttr.in for pretty weather
func (widget *Widget) prettyWeather() {
client := &http.Client{}
widget.unit, widget.city = Config.UString("wtf.mods.prettyweather.unit", "m"), Config.UString("wtf.mods.prettyweather.city", "")
req, err := http.NewRequest("GET", "https://wttr.in/"+widget.city+"?0"+"?"+widget.unit, nil)
if err != nil {
widget.result = fmt.Sprintf("%s", err.Error())
return
}
req.Header.Set("User-Agent", "curl")
response, err := client.Do(req)
if err != nil {
widget.result = fmt.Sprintf("%s", err.Error())
return
}
defer response.Body.Close()
contents, err := ioutil.ReadAll(response.Body)
if err != nil {
widget.result = fmt.Sprintf("%s", err.Error())
return
}
widget.result = fmt.Sprintf("%s", strings.TrimSpace(string(contents)))
}

View File

@ -2,13 +2,54 @@ package security
import (
"os/exec"
"runtime"
"strings"
"github.com/senorprogrammer/wtf/wtf"
)
const dnsCmd = "networksetup"
/* -------------------- Exported Functions -------------------- */
func DnsServers() string {
cmd := exec.Command(dnsCmd, "-getdnsservers", "Wi-Fi")
return wtf.ExecuteCommand(cmd)
func DnsServers() []string {
switch runtime.GOOS {
case "linux":
return dnsLinux()
case "darwin":
return dnsMacOS()
default:
return []string{runtime.GOOS}
}
}
/* -------------------- Unexported Functions -------------------- */
func dnsLinux() []string {
// This may be very Ubuntu specific
cmd := exec.Command("nmcli", "device", "show")
out := wtf.ExecuteCommand(cmd)
lines := strings.Split(out, "\n")
dns := []string{}
for _, l := range lines {
if strings.HasPrefix(l, "IP4.DNS") {
parts := strings.Split(l, ":")
dns = append(dns, strings.TrimSpace(parts[1]))
}
}
return dns
}
func dnsMacOS() []string {
cmd := exec.Command("networksetup", "-getdnsservers", "Wi-Fi")
out := wtf.ExecuteCommand(cmd)
lines := strings.Split(out, "\n")
if len(lines) > 0 {
return lines
} else {
return []string{}
}
}

View File

@ -2,6 +2,7 @@ package security
import (
"os/exec"
"runtime"
"strings"
"github.com/senorprogrammer/wtf/wtf"
@ -12,27 +13,57 @@ const osxFirewallCmd = "/usr/libexec/ApplicationFirewall/socketfilterfw"
/* -------------------- Exported Functions -------------------- */
func FirewallState() string {
cmd := exec.Command(osxFirewallCmd, "--getglobalstate")
str := wtf.ExecuteCommand(cmd)
return status(str)
switch runtime.GOOS {
case "linux":
return firewallStateLinux()
case "darwin":
return firewallStateMacOS()
default:
return ""
}
}
func FirewallStealthState() string {
cmd := exec.Command(osxFirewallCmd, "--getstealthmode")
str := wtf.ExecuteCommand(cmd)
return status(str)
switch runtime.GOOS {
case "linux":
return firewallStealthStateLinux()
case "darwin":
return firewallStealthStateMacOS()
default:
return ""
}
}
/* -------------------- Unexported Functions -------------------- */
func status(str string) string {
icon := "[red]off[white]"
func firewallStateLinux() string {
return "[red]NA[white]"
}
func firewallStateMacOS() string {
cmd := exec.Command(osxFirewallCmd, "--getglobalstate")
str := wtf.ExecuteCommand(cmd)
return statusLabel(str)
}
func firewallStealthStateLinux() string {
return "[red]NA[white]"
}
func firewallStealthStateMacOS() string {
cmd := exec.Command(osxFirewallCmd, "--getstealthmode")
str := wtf.ExecuteCommand(cmd)
return statusLabel(str)
}
func statusLabel(str string) string {
label := "off"
if strings.Contains(str, "enabled") {
icon = "[green]on[white]"
label = "on"
}
return icon
return label
}

View File

@ -1,11 +1,7 @@
package security
import (
"strings"
)
type SecurityData struct {
Dns string
Dns []string
FirewallEnabled string
FirewallStealth string
LoggedInUsers []string
@ -17,14 +13,11 @@ func NewSecurityData() *SecurityData {
return &SecurityData{}
}
func (data *SecurityData) DnsAt(idx int) string {
records := strings.Split(data.Dns, "\n")
if len(records) > 0 && len(records) > idx {
return records[idx]
} else {
return ""
func (data SecurityData) DnsAt(idx int) string {
if len(data.Dns) > idx {
return data.Dns[idx]
}
return ""
}
func (data *SecurityData) Fetch() {

View File

@ -1,21 +1,30 @@
package security
// http://applehelpwriter.com/2017/05/21/how-to-reveal-hidden-users/
import (
"os/exec"
"runtime"
"strings"
"github.com/senorprogrammer/wtf/wtf"
)
// http://applehelpwriter.com/2017/05/21/how-to-reveal-hidden-users/
/* -------------------- Exported Functions -------------------- */
func LoggedInUsers() []string {
cmd := exec.Command("dscl", []string{".", "-list", "/Users"}...)
users := wtf.ExecuteCommand(cmd)
return cleanUsers(strings.Split(users, "\n"))
switch runtime.GOOS {
case "linux":
return loggedInUsersLinux()
case "darwin":
return loggedInUsersMacOs()
default:
return []string{}
}
}
/* -------------------- Unexported Functions -------------------- */
func cleanUsers(users []string) []string {
rejects := []string{"_", "root", "nobody", "daemon", "Guest"}
cleaned := []string{}
@ -37,3 +46,38 @@ func cleanUsers(users []string) []string {
return cleaned
}
func loggedInUsersLinux() []string {
cmd := exec.Command("who", "-us")
users := wtf.ExecuteCommand(cmd)
cleaned := []string{}
for _, user := range strings.Split(users, "\n") {
clean := true
col := strings.Split(user, " ")
if len(col) > 0 {
for _, cleanedU := range cleaned {
u := strings.TrimSpace(col[0])
if len(u) == 0 || strings.Compare(cleanedU, col[0]) == 0 {
clean = false
}
}
if clean {
cleaned = append(cleaned, col[0])
}
}
}
return cleaned
}
func loggedInUsersMacOs() []string {
cmd := exec.Command("dscl", []string{".", "-list", "/Users"}...)
users := wtf.ExecuteCommand(cmd)
return cleanUsers(strings.Split(users, "\n"))
}

View File

@ -34,9 +34,8 @@ func (widget *Widget) Refresh() {
data.Fetch()
widget.UpdateRefreshedAt()
widget.View.Clear()
fmt.Fprintf(widget.View, "%s", widget.contentFrom(data))
widget.View.SetText(fmt.Sprintf("%s", widget.contentFrom(data)))
}
/* -------------------- Unexported Functions -------------------- */
@ -46,12 +45,23 @@ func (widget *Widget) contentFrom(data *SecurityData) string {
str = str + fmt.Sprintf(" %8s: %s\n", "Network", data.WifiName)
str = str + fmt.Sprintf(" %8s: %s\n", "Crypto", data.WifiEncryption)
str = str + "\n"
str = str + " [red]Firewall[white] [red]DNS[white]\n"
str = str + fmt.Sprintf(" %8s: %4s %12s\n", "Enabled", data.FirewallEnabled, data.DnsAt(0))
str = str + fmt.Sprintf(" %8s: %4s %12s\n", "Stealth", data.FirewallStealth, data.DnsAt(1))
str = str + " [red]Firewall[white] [red]DNS[white]\n"
str = str + fmt.Sprintf(" %8s: [%s]%-3s[white] %-16s\n", "Enabled", widget.labelColor(data.FirewallEnabled), data.FirewallEnabled, data.DnsAt(0))
str = str + fmt.Sprintf(" %8s: [%s]%-3s[white] %-16s\n", "Stealth", widget.labelColor(data.FirewallStealth), data.FirewallStealth, data.DnsAt(1))
str = str + "\n"
str = str + " [red]Users[white]\n"
str = str + fmt.Sprintf(" %s", strings.Join(data.LoggedInUsers, ", "))
return str
}
func (widget *Widget) labelColor(label string) string {
switch label {
case "on":
return "green"
case "off":
return "red"
default:
return "white"
}
}

View File

@ -2,6 +2,7 @@ package security
import (
"os/exec"
"runtime"
"github.com/senorprogrammer/wtf/wtf"
)
@ -13,22 +14,67 @@ const osxWifiArg = "-I"
/* -------------------- Exported Functions -------------------- */
func WifiEncryption() string {
name := wtf.FindMatch(`s*auth: (.+)s*`, wifiInfo())
return matchStr(name)
switch runtime.GOOS {
case "linux":
return wifiEncryptionLinux()
case "darwin":
return wifiEncryptionMacOS()
default:
return ""
}
}
func WifiName() string {
name := wtf.FindMatch(`s*SSID: (.+)s*`, wifiInfo())
return matchStr(name)
switch runtime.GOOS {
case "linux":
return wifiNameLinux()
case "darwin":
return wifiNameMacOS()
default:
return ""
}
}
/* -------------------- Unexported Functions -------------------- */
func wifiEncryptionLinux() string {
cmd := exec.Command("nmcli", "-t", "-f", "active,security", "dev", "wifi")
out := wtf.ExecuteCommand(cmd)
name := wtf.FindMatch(`yes:(.+)`, out)
if len(name) > 0 {
return name[0][1]
}
return ""
}
func wifiEncryptionMacOS() string {
name := wtf.FindMatch(`s*auth: (.+)s*`, wifiInfo())
return matchStr(name)
}
func wifiInfo() string {
cmd := exec.Command(osxWifiCmd, osxWifiArg)
return wtf.ExecuteCommand(cmd)
}
func wifiNameLinux() string {
cmd := exec.Command("nmcli", "-t", "-f", "active,ssid", "dev", "wifi")
out := wtf.ExecuteCommand(cmd)
name := wtf.FindMatch(`yes:(.+)`, out)
if len(name) > 0 {
return name[0][1]
}
return ""
}
func wifiNameMacOS() string {
name := wtf.FindMatch(`s*SSID: (.+)s*`, wifiInfo())
return matchStr(name)
}
func matchStr(data [][]string) string {
if len(data) <= 1 {
return ""

View File

@ -33,12 +33,12 @@ func (widget *Widget) Refresh() {
}
widget.UpdateRefreshedAt()
widget.View.Clear()
fmt.Fprintf(
widget.View,
"\n%s",
widget.animation(),
widget.View.SetText(
fmt.Sprintf(
"\n%s",
widget.animation(),
),
)
}

View File

@ -2,6 +2,7 @@ package system
import (
"os/exec"
"runtime"
"strings"
"github.com/senorprogrammer/wtf/wtf"
@ -18,7 +19,16 @@ func NewSystemInfo() *SystemInfo {
arg := []string{}
cmd := exec.Command("sw_vers", arg...)
var cmd *exec.Cmd
switch runtime.GOOS {
case "linux":
cmd = exec.Command("uname -a", arg...)
case "darwin":
cmd = exec.Command("sw_vers", arg...)
default:
cmd = exec.Command("sw_vers", arg...)
}
raw := wtf.ExecuteCommand(cmd)
for _, row := range strings.Split(raw, "\n") {
@ -31,11 +41,27 @@ func NewSystemInfo() *SystemInfo {
m[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
}
sysInfo := SystemInfo{
ProductName: m["ProductName"],
ProductVersion: m["ProductVersion"],
BuildVersion: m["BuildVersion"],
}
var sysInfo *SystemInfo
switch runtime.GOOS {
case "linux":
sysInfo = &SystemInfo{
ProductName: m["Distributor ID"],
ProductVersion: m["Description"],
BuildVersion: m["Release"],
}
case "darwin":
sysInfo = &SystemInfo{
ProductName: m["ProductName"],
ProductVersion: m["ProductVersion"],
BuildVersion: m["BuildVersion"],
}
default:
sysInfo = &SystemInfo{
ProductName: m["ProductName"],
ProductVersion: m["ProductVersion"],
BuildVersion: m["BuildVersion"],
}
return &sysInfo
}
return sysInfo
}

View File

@ -21,7 +21,7 @@ type Widget struct {
func NewWidget(date, version string) *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" Build ", "system", false),
TextWidget: wtf.NewTextWidget(" System ", "system", false),
Date: date,
Version: version,
@ -38,19 +38,19 @@ func (widget *Widget) Refresh() {
}
widget.UpdateRefreshedAt()
widget.View.Clear()
fmt.Fprintf(
widget.View,
"%8s: %s\n%8s: %s\n\n%8s: %s\n%8s: %s",
"Built",
widget.prettyDate(),
"Vers",
widget.Version,
"OS",
widget.systemInfo.ProductVersion,
"Build",
widget.systemInfo.BuildVersion,
widget.View.SetText(
fmt.Sprintf(
"%8s: %s\n%8s: %s\n\n%8s: %s\n%8s: %s",
"Built",
widget.prettyDate(),
"Vers",
widget.Version,
"OS",
widget.systemInfo.ProductVersion,
"Build",
widget.systemInfo.BuildVersion,
),
)
}

View File

@ -30,7 +30,7 @@ type Widget struct {
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" 📄 Text File ", "textfile", true),
TextWidget: wtf.NewTextWidget(" Text File ", "textfile", true),
app: app,
filePath: Config.UString("wtf.mods.textfile.filePath"),
@ -53,8 +53,7 @@ func (widget *Widget) Refresh() {
}
widget.UpdateRefreshedAt()
widget.View.SetTitle(fmt.Sprintf(" 📄 %s ", widget.filePath))
widget.View.Clear()
widget.View.SetTitle(fmt.Sprintf("%s %s", widget.Name, widget.filePath))
filePath, _ := wtf.ExpandHomeDir(widget.filePath)
@ -64,9 +63,9 @@ func (widget *Widget) Refresh() {
}
if err != nil {
fmt.Fprintf(widget.View, "%s", err)
widget.View.SetText(fmt.Sprintf("%s", err))
} else {
fmt.Fprintf(widget.View, "%s", string(fileData))
widget.View.SetText(fmt.Sprintf("%s", string(fileData)))
}
}

View File

@ -29,7 +29,7 @@ func (widget *Widget) display() {
widget.SetList(&newList)
widget.View.Clear()
fmt.Fprintf(widget.View, "%s", str)
widget.View.SetText(fmt.Sprintf("%s", str))
}
func (widget *Widget) formattedItemLine(item *Item, selectedItem *Item, maxLen int) string {

Some files were not shown because too many files have changed in this diff Show More