mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
wtf.Position into its own file
This commit is contained in:
parent
b216005385
commit
01aab4cc53
12
config.yml
12
config.yml
@ -1,7 +1,7 @@
|
||||
wtf:
|
||||
refreshInterval: 1
|
||||
bamboohr:
|
||||
enabled: true
|
||||
enabled: false
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
@ -11,7 +11,7 @@ wtf:
|
||||
url: "https://api.bamboohr.com/api/gateway.php"
|
||||
gcal:
|
||||
currentIcon: "💥"
|
||||
enabled: true
|
||||
enabled: false
|
||||
eventCount: 10
|
||||
position:
|
||||
top: 2
|
||||
@ -31,7 +31,7 @@ wtf:
|
||||
refreshInterval: 8
|
||||
repository: "/Users/chris/go/src/github.com/senorprogrammer/wtf"
|
||||
github:
|
||||
enabled: true
|
||||
enabled: false
|
||||
organization: "BetterOfficeApps"
|
||||
position:
|
||||
top: 2
|
||||
@ -42,7 +42,7 @@ wtf:
|
||||
repo: "core-api"
|
||||
username: "senorprogrammer"
|
||||
jira:
|
||||
enabled: true
|
||||
enabled: false
|
||||
position:
|
||||
top: 1
|
||||
left: 1
|
||||
@ -60,7 +60,7 @@ wtf:
|
||||
width: 3
|
||||
refreshInterval: 900
|
||||
opsgenie:
|
||||
enabled: true
|
||||
enabled: false
|
||||
position:
|
||||
top: 2
|
||||
left: 0
|
||||
@ -85,7 +85,7 @@ wtf:
|
||||
refreshInterval: 1
|
||||
weather:
|
||||
cityId: 6173331
|
||||
enabled: true
|
||||
enabled: false
|
||||
language: "EN"
|
||||
position:
|
||||
top: 0
|
||||
|
@ -2,7 +2,6 @@ package github
|
||||
|
||||
import (
|
||||
"context"
|
||||
//"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
@ -32,8 +31,6 @@ func (client *Client) PullRequests(orgName string, repoName string) ([]*ghb.Pull
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
//fmt.Printf("Problem in getting pull request information %v\n", err)
|
||||
//os.Exit(1)
|
||||
}
|
||||
|
||||
return prs, nil
|
||||
@ -47,8 +44,6 @@ func (client *Client) Repository(orgName string, repoName string) (*ghb.Reposito
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
//fmt.Printf("Problem in getting repository information %v\n", err)
|
||||
//os.Exit(1)
|
||||
}
|
||||
|
||||
return repo, nil
|
||||
|
@ -59,7 +59,10 @@ func (widget *Widget) addView() {
|
||||
}
|
||||
|
||||
func (widget *Widget) contentFrom(deploys []nr.ApplicationDeployment) string {
|
||||
str := " [red]Latest Deploys[white]\n"
|
||||
str := fmt.Sprintf(
|
||||
" %s\n",
|
||||
"[red]Latest Deploys[white]",
|
||||
)
|
||||
|
||||
revisions := []string{}
|
||||
|
||||
|
26
wtf/position.go
Normal file
26
wtf/position.go
Normal file
@ -0,0 +1,26 @@
|
||||
package wtf
|
||||
|
||||
import ()
|
||||
|
||||
type Position struct {
|
||||
top int
|
||||
left int
|
||||
width int
|
||||
height int
|
||||
}
|
||||
|
||||
func (pos *Position) Top() int {
|
||||
return pos.top
|
||||
}
|
||||
|
||||
func (pos *Position) Left() int {
|
||||
return pos.left
|
||||
}
|
||||
|
||||
func (pos *Position) Width() int {
|
||||
return pos.width
|
||||
}
|
||||
|
||||
func (pos *Position) Height() int {
|
||||
return pos.height
|
||||
}
|
@ -10,31 +10,6 @@ import (
|
||||
|
||||
var Config *config.Config
|
||||
|
||||
type Position struct {
|
||||
top int
|
||||
left int
|
||||
width int
|
||||
height int
|
||||
}
|
||||
|
||||
func (pos *Position) Top() int {
|
||||
return pos.top
|
||||
}
|
||||
|
||||
func (pos *Position) Left() int {
|
||||
return pos.left
|
||||
}
|
||||
|
||||
func (pos *Position) Width() int {
|
||||
return pos.width
|
||||
}
|
||||
|
||||
func (pos *Position) Height() int {
|
||||
return pos.height
|
||||
}
|
||||
|
||||
/* -------------------- TextWidget -------------------- */
|
||||
|
||||
type TextWidget struct {
|
||||
enabled bool
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user