Skip to content

Instantly share code, notes, and snippets.

@Vaishnav-Sabari-Girish
Last active June 25, 2026 09:09
Show Gist options
  • Select an option

  • Save Vaishnav-Sabari-Girish/c182a0d54fe7c5fc3b5507ecc62dd301 to your computer and use it in GitHub Desktop.

Select an option

Save Vaishnav-Sabari-Girish/c182a0d54fe7c5fc3b5507ecc62dd301 to your computer and use it in GitHub Desktop.
A google calendar TUI written in pure bash

Calendar widget

Uses bash to create a calendar TUI which displays current date, any events and also allows for movement. Now allows for event creation and listing of all calendars via a separate script

Steps

  1. Create a new project in Google Cloud Console
  2. Create new credentials using the OAuth section (Make sure to register the app as a web application and not desktop app) and in Authorized Redirect URI's paste https://developers.google.com/oauthplayground.
  3. Download the credentials (.json)
  4. Open the downloaded .json file and go to Google OAuth Playground
  5. Click on the gear icon at the top right and click on the "Use Own OAuth Credentials" and paste eyour client id and client secret in the fields.
  6. In the Input Your Own Scopes box at the bottom left paste https://www.googleapis.com/auth/calendar and click Authorize API's and login with your account.
  7. When redirected back, click Exchange authorization code for tokens.
  8. Copy the refresh token.
  9. Create a directory at ~/.config/gcal-tui/ and create a credentials.json file inside it.
  10. Paste the following template into ~/.config/gcal-tui/credentials.json
{
  "client_id": ,
  "client_secret": ,
  "refresh_token": 
}
  1. Fill out those fields with your details.
  2. Run ./gcal-tui.sh

Output

gif

image

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment