Documentation ¶
Index ¶
- Constants
- Variables
- type Bookmarks
- type Calendar
- type DurationField
- type HSLColorField
- type HackerNews
- type IFrame
- type Monitor
- type OptionalEnvString
- type RSS
- type Reddit
- type Releases
- type Repository
- type Stocks
- type TwitchChannels
- type TwitchGames
- type Videos
- type Weather
- type Widget
- type Widgets
Constants ¶
View Source
const ( HSLHueMax = 360 HSLSaturationMax = 100 HSLLightnessMax = 100 )
Variables ¶
View Source
var DurationPattern = regexp.MustCompile(`^(\d+)(s|m|h|d)$`)
View Source
var EnvFieldPattern = regexp.MustCompile(`^\${([A-Z_]+)}$`)
View Source
var HSLColorPattern = regexp.MustCompile(`^(?:hsla?\()?(\d{1,3})(?: |,)+(\d{1,3})%?(?: |,)+(\d{1,3})%?\)?$`)
Functions ¶
This section is empty.
Types ¶
type Bookmarks ¶
type Bookmarks struct { Groups []struct { Title string `yaml:"title"` Color *HSLColorField `yaml:"color"` Links []struct { Title string `yaml:"title"` URL string `yaml:"url"` Icon string `yaml:"icon"` IsSimpleIcon bool `yaml:"-"` SameTab bool `yaml:"same-tab"` HideArrow bool `yaml:"hide-arrow"` } `yaml:"links"` } `yaml:"groups"` Style string `yaml:"style"` // contains filtered or unexported fields }
func (*Bookmarks) Initialize ¶
func (*Bookmarks) RequiresUpdate ¶
type DurationField ¶
func (*DurationField) UnmarshalYAML ¶
func (d *DurationField) UnmarshalYAML(node *yaml.Node) error
type HSLColorField ¶
func (*HSLColorField) AsCSSValue ¶
func (c *HSLColorField) AsCSSValue() template.CSS
func (*HSLColorField) String ¶
func (c *HSLColorField) String() string
func (*HSLColorField) UnmarshalYAML ¶
func (c *HSLColorField) UnmarshalYAML(node *yaml.Node) error
type HackerNews ¶
type HackerNews struct { Posts feed.ForumPosts `yaml:"-"` Limit int `yaml:"limit"` SortBy string `yaml:"sort-by"` ExtraSortBy string `yaml:"extra-sort-by"` CollapseAfter int `yaml:"collapse-after"` CommentsUrlTemplate string `yaml:"comments-url-template"` ShowThumbnails bool `yaml:"-"` // contains filtered or unexported fields }
func (*HackerNews) Initialize ¶
func (widget *HackerNews) Initialize() error
func (*HackerNews) Render ¶
func (widget *HackerNews) Render() template.HTML
func (*HackerNews) RequiresUpdate ¶
func (*HackerNews) Update ¶
func (widget *HackerNews) Update(ctx context.Context)
type IFrame ¶
type IFrame struct { Source string `yaml:"source"` Height int `yaml:"height"` // contains filtered or unexported fields }
func (*IFrame) Initialize ¶
func (*IFrame) RequiresUpdate ¶
type Monitor ¶
type Monitor struct { Sites []struct { Title string `yaml:"title"` Url OptionalEnvString `yaml:"url"` IconUrl string `yaml:"icon"` SameTab bool `yaml:"same-tab"` Status *feed.SiteStatus `yaml:"-"` StatusText string `yaml:"-"` StatusStyle string `yaml:"-"` } `yaml:"sites"` Style string `yaml:"style"` // contains filtered or unexported fields }
func (*Monitor) Initialize ¶
func (*Monitor) RequiresUpdate ¶
type OptionalEnvString ¶
type OptionalEnvString string
func (*OptionalEnvString) UnmarshalYAML ¶
func (f *OptionalEnvString) UnmarshalYAML(node *yaml.Node) error
type RSS ¶
type RSS struct { FeedRequests []feed.RSSFeedRequest `yaml:"feeds"` Style string `yaml:"style"` ThumbnailHeight float64 `yaml:"thumbnail-height"` CardHeight float64 `yaml:"card-height"` Items feed.RSSFeedItems `yaml:"-"` Limit int `yaml:"limit"` CollapseAfter int `yaml:"collapse-after"` // contains filtered or unexported fields }
func (*RSS) Initialize ¶
func (*RSS) RequiresUpdate ¶
type Reddit ¶
type Reddit struct { Posts feed.ForumPosts `yaml:"-"` Subreddit string `yaml:"subreddit"` Style string `yaml:"style"` ShowThumbnails bool `yaml:"show-thumbnails"` SortBy string `yaml:"sort-by"` TopPeriod string `yaml:"top-period"` Search string `yaml:"search"` ExtraSortBy string `yaml:"extra-sort-by"` CommentsUrlTemplate string `yaml:"comments-url-template"` Limit int `yaml:"limit"` CollapseAfter int `yaml:"collapse-after"` RequestUrlTemplate string `yaml:"request-url-template"` // contains filtered or unexported fields }
func (*Reddit) Initialize ¶
func (*Reddit) RequiresUpdate ¶
type Releases ¶
type Releases struct { Releases feed.AppReleases `yaml:"-"` Repositories []string `yaml:"repositories"` Token OptionalEnvString `yaml:"token"` Limit int `yaml:"limit"` CollapseAfter int `yaml:"collapse-after"` // contains filtered or unexported fields }
func (*Releases) Initialize ¶
func (*Releases) RequiresUpdate ¶
type Repository ¶
type Repository struct { RequestedRepository string `yaml:"repository"` Token OptionalEnvString `yaml:"token"` PullRequestsLimit int `yaml:"pull-requests-limit"` IssuesLimit int `yaml:"issues-limit"` RepositoryDetails feed.RepositoryDetails // contains filtered or unexported fields }
func (*Repository) Initialize ¶
func (widget *Repository) Initialize() error
func (*Repository) Render ¶
func (widget *Repository) Render() template.HTML
func (*Repository) RequiresUpdate ¶
func (*Repository) Update ¶
func (widget *Repository) Update(ctx context.Context)
type Stocks ¶
type Stocks struct { Stocks feed.Stocks `yaml:"stocks"` Sort string `yaml:"sort-by"` Style string `yaml:"style"` // contains filtered or unexported fields }
TODO: rename to Markets at some point
func (*Stocks) Initialize ¶
func (*Stocks) RequiresUpdate ¶
type TwitchChannels ¶
type TwitchChannels struct { ChannelsRequest []string `yaml:"channels"` Channels []feed.TwitchChannel `yaml:"-"` CollapseAfter int `yaml:"collapse-after"` // contains filtered or unexported fields }
func (*TwitchChannels) Initialize ¶
func (widget *TwitchChannels) Initialize() error
func (*TwitchChannels) Render ¶
func (widget *TwitchChannels) Render() template.HTML
func (*TwitchChannels) RequiresUpdate ¶
func (*TwitchChannels) Update ¶
func (widget *TwitchChannels) Update(ctx context.Context)
type TwitchGames ¶
type TwitchGames struct { Categories []feed.TwitchCategory `yaml:"-"` Exclude []string `yaml:"exclude"` Limit int `yaml:"limit"` CollapseAfter int `yaml:"collapse-after"` // contains filtered or unexported fields }
func (*TwitchGames) Initialize ¶
func (widget *TwitchGames) Initialize() error
func (*TwitchGames) Render ¶
func (widget *TwitchGames) Render() template.HTML
func (*TwitchGames) RequiresUpdate ¶
func (*TwitchGames) Update ¶
func (widget *TwitchGames) Update(ctx context.Context)
type Videos ¶
type Videos struct { Videos feed.Videos `yaml:"-"` VideoUrlTemplate string `yaml:"video-url-template"` Style string `yaml:"style"` Channels []string `yaml:"channels"` Limit int `yaml:"limit"` // contains filtered or unexported fields }
func (*Videos) Initialize ¶
func (*Videos) RequiresUpdate ¶
type Weather ¶
type Weather struct { Location string `yaml:"location"` ShowAreaName bool `yaml:"show-area-name"` HideLocation bool `yaml:"hide-location"` Units string `yaml:"units"` Place *feed.PlaceJson `yaml:"-"` Weather *feed.Weather `yaml:"-"` TimeLabels [12]string `yaml:"-"` // contains filtered or unexported fields }
func (*Weather) Initialize ¶
func (*Weather) RequiresUpdate ¶
Click to show internal directories.
Click to hide internal directories.