Google Calendar

gcal screenshot

Displays your upcoming Google calendar events.

Note: Setting up access to Google Calendars for Go is a bit unobvious. Check out Google’s Go Quickstart, and follow Enable The Google Calendar API.

The configuration file downloaded is the file you use for the secretFile configuration option.

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
  timezone: "America/Vancouver"
  withLocation: true

Name Description Value
border Optional Whether or not to draw this widget with a border. Default: true. true, false
colors.description The default color for calendar event descriptions. Any X11 color name.
colors.past The color for calendar events that have passed. Any X11 color name.
colors.title The default colour for calendar event titles. 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. [a valid regular expression, any X11 color name.]
conflictIcon Optional The icon displayed beside calendar events that have conflicting times (they intersect or overlap in some way). Any displayable unicode character.
currentIcon Optional The icon displayed beside the current calendar event. Any displayable unicode character.
displayResponseStatus Optional Whether or not to display your response status to the calendar event. Default: true. true, false
email The email address associated with your Google account. Necessary for determining responseStatus. A valid email address string.
enabled Optional Whether or not this module is executed and if its data displayed onscreen. Default: false. true, false
eventCount The number of calendar events to display. Any positive integer
focusChar Optional Define one of the number keys as a short cut key to access the widget. 0..9
multiCalendar Optional Whether or not to display your primary calendar or all calendars you have access to. Default: false. true, false
position Defines where in the grid this module’s widget will be displayed.
refreshInterval Optional How often, in seconds, this module will update its data. Default: 300. Any positive integer
secretFile Your Google client secret JSON file. A string representing a file path to the JSON secret file.
showDeclined Optional Whether or not to show the location of the appointment. Default: true. true, false
timezone Optional. The timezone to display calendar event times in. Any valid TZ database name.
withLocation Optional Whether or not to show the location of the appointment. Default: true. true, false

Source Code

wtf/modules/google/gcal/