Google Calendar

gcal screenshot

Displays your upcoming Google calendar events.

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.

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
  multiCalendar: true
  position:
    top: 0
    left: 0
    height: 4
    width: 1
  refreshInterval: 300
  secretFile: "~/.config/wtf/gcal/client_secret.json"
  showDeclined: true
  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.

multiCalendar
Whether or not to display your primary calendar or all calendars you have access to.
Values: true, or false

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

focusChar
Define one of the number keys as a short cut key to access the widget.

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.

showDeclined
Optional. Whether or not to display events you’ve declined to attend.
Values: true, or false

withLocation
Whether or not to show the location of the appointment.
Values: true, or false

Source Code

wtf/gcal/