Skip to content

gcal

Google Calendar

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"
    eventTime: "lightblue"
    description: "yellow"
    highlights:
    - ['1on1|1\/11', 'green']
    - ['apple|google|aws', 'blue']
    - ['interview|meet', 'magenta']
    - ['lunch', 'yellow']
    past: "gray"
  calendarReadLevel: "reader"
  conflictIcon: "🚨"
  currentIcon: "💥"
  displayResponseStatus: true
  email: "chriscummer@me.com"
  enabled: true
  eventCount: 15
  hourFormat: "12"
  multiCalendar: true
  position:
    top: 0
    left: 0
    height: 4
    width: 1
  refreshInterval: 5m
  secretFile: "~/.config/wtf/gcal/client_secret.json"
  showDeclined: true
  showEndTime: false
  timezone: "America/Vancouver"
  withLocation: true

Screenshots

gcal screenshot

Attributes

Name Value
colors.eventTime
Optional The default color for calendar event time.
Any X11 color name or long-form hex value (i.e.: #ff0000).
colors.description
Optional The default color for calendar event description.
Any X11 color name or long-form hex value (i.e.: #ff0000).
colors.past
Optional The color for calendar events that have passed.
Any X11 color name or long-form hex value (i.e.: #ff0000).
colors.title
Optional The default colour for calendar event titles.
Any X11 color name or long-form hex value (i.e.: #ff0000).
colors.highlights
Optional 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, or any X11 color name.
calendarReadLevel
Optional The calender read level specifies level you want to read events. Default: reader.
reader, writer
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.
eventCount
Optional The number of calendar events to display.
Any positive integer.
hourFormat
Optional The format of the clock. Default: 24.
12, 24.
multiCalendar
Optional Whether or not to display your primary calendar or all calendars you have access to. Default: false.
true, false
secretFile
Your Google client secret JSON file.
A string representing a file path to the JSON secret file.
showDeclined
Optional Whether or not to display events you’ve declined to attend. Default: true.
true, false
showEndTime
Optional Whether or not to display the event end time. Default: false.
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

https://github.com/wtfutil/wtf/tree/master/modules/gcal