1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
2018-06-10 02:50:16 +03:00

3.8 KiB

title, date, draft
title date draft
Google Calendar 2018-05-10T08:25:33-07:00 false

Displays your upcoming Google calendar events.

gcal screenshot

Not: Setting up access to Google Calendars for Go is a bit unobvious. Check out Google'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: "red"
    description: "lightblue"
    highlights:
    - ['1on1|1\/11', 'green']
    - ['apple|google|aws', 'blue']
    - ['interview|meet', 'magenta']
    - ['lunch', 'yellow']
    past: "gray"
  conflictIcon: "🚨"
  currentIcon: "💥"
  displayResponseStatus: true
  email: "chriscummer@me.com"
  enabled: true
  eventCount: 12
  position:
    top: 0
    left: 0
    height: 4
    width: 1
  refreshInterval: 300
  secretFile: "~/.wtf/gcal/client_secret.json"
  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. If a calendar event title matches a regular expression, the title will be drawn in that colour. Over-rides the default title colour.
Values: [a valid regular expression, any X11 color name.]

colors.past
The color for calendar events that have passed.
Values: Any X11 color name.

conflictIcon
The icon displayed beside calendar events that have conflicting times (they intersect or overlap in some way).
Values: Any displayable unicode character.

currentIcon
The icon displayed beside the current calendar event.
Values: Any displayable unicode character.

displayLocation
Whether or not to display the location of the calendar event.
Values: true, false.

displayResponseStatus
Whether or not to display your response status to the calendar event.
Values: true, false.

email
The email address associated with your Google account. Necessary for determining responseStatus.
Values: A valid email address string.

enabled
Whether or not this module is executed and if its data displayed onscreen.
Values: true, false.

eventCount
The number of calendar events to display.
Values: A positive integer, 0..n.

position
Where in the grid this module's widget will be displayed.

refreshInterval
How often, in seconds, this module will update its data.
Values: A positive integer, 0..n.

secretFile
Your Google client secret JSON file.
Values: A string representing a file path to the JSON secret file.