All Projects → mhkc → google-calendar-layer

mhkc / google-calendar-layer

Licence: other
A google calendar layer for Spacemacs

Programming Languages

emacs lisp
2029 projects

Projects that are alternatives of or similar to google-calendar-layer

practicalli.github.io
Landing Page for Practicalli for broadcasts, books and guides on Clojure, ClojureScript, Emacs, Spacemacs and more. Developed with ClojureScript and reagent, using figwheel.main
Stars: ✭ 15 (-61.54%)
Mutual labels:  spacemacs
TimeTableManager
Simple react application to create a TimeTable based only on your choice of subjects.
Stars: ✭ 30 (-23.08%)
Mutual labels:  google-calendar
spacemacs module for doom
Aim to port spacemacs features (defaults keybinding, transient state, layers and more) to doom, and provides a spacemacs module for doom.
Stars: ✭ 117 (+200%)
Mutual labels:  spacemacs
spacemacs
Content for the book - Clojure Development with Spacemacs
Stars: ✭ 86 (+120.51%)
Mutual labels:  spacemacs
datebook
📅 Generates URLs and downloadable ICS files for adding events to popular calendar apps.
Stars: ✭ 273 (+600%)
Mutual labels:  google-calendar
garoon-google
To synchronize the Garoon schedule to Google Calendar.
Stars: ✭ 28 (-28.21%)
Mutual labels:  google-calendar
alfredToday
Today menu Plugin for Alfred (generalized for public consumption)
Stars: ✭ 39 (+0%)
Mutual labels:  google-calendar
taskwarrior-syncall
Synchronization between Taskwarrior tasks and services such as Google Calendar, Notion and Google Keep. Formerly taskw_gcal_sync
Stars: ✭ 151 (+287.18%)
Mutual labels:  google-calendar
ical2gcal
sync ics(es) to google calendar
Stars: ✭ 13 (-66.67%)
Mutual labels:  google-calendar
infocenter
Raspberry Pi weather, calendar, and internet radio with graphical, touch-based interface.
Stars: ✭ 18 (-53.85%)
Mutual labels:  google-calendar
SigTools
📆 Sigarra Tools | An extension that makes the information system of the University of Porto slightly better.
Stars: ✭ 35 (-10.26%)
Mutual labels:  google-calendar
emacs-config
Abelardo Jara-Berrocal's Emacs configuration files
Stars: ✭ 15 (-61.54%)
Mutual labels:  spacemacs
ics2gcal
Import .ics files into Google Calendar with only two clicks.
Stars: ✭ 21 (-46.15%)
Mutual labels:  google-calendar
google-backup
Drive/Gmail/Calendar backups
Stars: ✭ 31 (-20.51%)
Mutual labels:  google-calendar
EvDev
Full-Featured Dockerized Development Environment
Stars: ✭ 21 (-46.15%)
Mutual labels:  spacemacs
react-google-calendar
A react-big-calendar implementation that pulls events from Google calendars
Stars: ✭ 82 (+110.26%)
Mutual labels:  google-calendar
clojure-lint-spacemacs-layer
Spacemacs-layer to add and configure a linter for Clojure
Stars: ✭ 22 (-43.59%)
Mutual labels:  spacemacs-layer
Notion-and-Google-Calendar-2-Way-Sync
2 Way Sync Between Notion Database and Google Calendar
Stars: ✭ 205 (+425.64%)
Mutual labels:  google-calendar
Daylight-Calendar-ICS
Daylight Calendar is a dynamically generated .ics calendar that you can host and subscribe to in Google Calendar, iCal, or other calendar software.
Stars: ✭ 22 (-43.59%)
Mutual labels:  google-calendar
evil-briefcase
Change cases quickly with vim motions in emacs
Stars: ✭ 20 (-48.72%)
Mutual labels:  spacemacs

Google calendar layer

./img/gcal.png

Table of Contents

Description

This layer provides two-way Google calendar synchronization using the org-gcal package and a dedicated calendar view using calfw package.

Calendar events are synchronized to your computer by org-gcal. They are stored in org format in one or several files user definable files. This allow the user both to include these calendar events in org-agenda and to create new events from any emacs buffer with org-capture. To learn how to setup and use the many features of org-mode see orgmode.org.

Your calendar events and TODOs (if you are an org user) can be viewed in either org-agenda or the dedicated calendar view provided by calfw. Calfw has daily, weekly and monthly calendar views and lets the user to easily create new events from the view itself.

Install

To use google-calendar layer.

  1. git clone https://github.com/mhkc/google-calendar-layer ~/.emacs.d/private/google-calendar
  2. add it to your ~/.spacemacs. You will need to add google-calendar to the existing dotspacemacs-configuration-layers list in this file.

Configuration

Configure org-gcal

To use sync your Google calendar with org-gcal you need Auth credentials from Google Developers Console.

Create credentials

  1. Go to Google Developers Console
  2. Create a project (with any name)
  3. Go to Google Calendar API and enable the API
  4. Click on Credentials and create a new “OAuth client ID”.
  5. You will need to create a “Consent screen” that will be shown when you allow org-gcal to access your data.
  6. After the screen is created select the Application type “Other”.
  7. Click on Create Client ID
  8. Save the Client ID and Client secret for later.
  9. Go to the calendar setting of your Google Caldendar by clicking on the cogwheel icon in the top right corner.
  10. Click on the “Calendar” that, which will display a list of your calendars.
  11. Select the calendar you want to synchronize with. Save the Calendar-ID which is located in the section called Calendar address, following the ICAL and HTML buttons.

Setup org-gcal

Set the following variables with your Client ID and Secret.

(setq org-gcal-client-id "YourClientId"
      org-gcal-client-secret "YourSecret")

You need to specify which calendar is going to be synchronized to which file. The variable org-gcal-file-alist expect a list where each element is an associated list containing a Calendar-ID and which file to synchronize to, see example. If you want to synchronize multiple calendars its recommended to synchronize them with different files. This also enables the user to create events for a specific calendar. Currently org-gcal do not support synchronization of multiple Google accounts.

(setq org-gcal-file-alist '(("[email protected]" . "/path/to/first_schedule_file.org")
                            ("[email protected]" . "/path/to/second_schedule_file.org")))

You need to include the calendar event files in org-agenda, do so by adding the paths to the files to the org-agenda-files variable.

(setq org-agenda-files
      (quote ("/path/to/first_schedule_file.org" "/path/to/second_schedule_file.org")))

You can create new calendar events from any Emacs buffer with org-capture. This layer provides convenient accessory functions that automatically synchronize the new event to Google calendar, see below.

Configure calfw

You can configure how the calfw calendar buffer should be displayed by altering the variable calfw-calendar-window-setup. When you close the calendar view this layer tries to restore the previous window configuration, if you would like to disable this behavior set calfw-restore-windows-after-quit to nil.

Calfw lets you customize the name of the months and days by altering the following arrays.

;; Month
(setq calendar-month-name-array
  ["January" "February" "March"     "April"   "May"      "June"
   "July"    "August"   "September" "October" "November" "December"])

;; Week days
(setq calendar-day-name-array
      ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"])

You can also change which day the week begins with the following variable.

;; First day of the week
(setq calendar-week-start-day 1) ; 0:Sunday, 1:Monday

In Calfw calendar view you can capture TODOs or events. To do so you need to bind a org-capture template to the variable cfw:org-capture-template. The following are an example template for creating a calendar event that works with the google-calendar/sync-cal-after-capture function.

(setq cfw:org-capture-template '("s" "Scedule an event" entry
                                 (file "/path/to/a/schedule/file.org")
                                 "* %^{Description}\n%^{LOCATION}p\n%(cfw:org-capture-day)\n%?"))

Configure alert

Depending on your taste and OS you might want to set different notification styles. For macOS users osx-notifier or growl on older system might work the best.

NameSummary
fringeChanges the current frame’s fringe background color
mode-lineChanges the current frame’s mode-line background color
gntpUses gntp, it requires [gntp.el](https://github.com/tekai/gntp.el)
growlUses Growl on OS X, if growlnotify is on the PATH
ignoreIgnores the alert entirely
libnotifyUses libnotify if notify-send is on the PATH
logLogs the alert text to Alerts, with a timestamp
messageUses the Emacs `message` facility
notificationsUses notifications library via D-Bus
notifierUses terminal-notifier on OS X, if it is on the PATH
osx-notifierNative OSX notification using AppleScript
toasterUse the toast notification system
(setq alert-default-style 'libnotify)

Schedule events with org-capture

There are many ways to use this layer in conjunction with org-agenda, for instance you can capture tasks directly to the schedule org file for instance by using the template described above. To automatically convert the newly to a calendar event you need to also add the following function to the org-capture-after-finalize-hook. The function checks if the capture entry is put in one of the calendar org files, and if so creates an calendar event of the file.

(add-hook 'org-capture-after-finalize-hook 'google-calendar/sync-cal-after-capture)

For a calendar event to be considered valid by org-gcal it needs.

  • A header
  • A non-interactive timestamp or time range.

Key bindings

Spacemacs leader key shortcuts.

Key BindingDescription
SPC a g fFetch new events
SPC a g sSync calendar
SPC a g rRefresh OAuth token
SPC a g cOpen calendar view

Changing the calendar view.

Key BindingDescription
DDay view
WWeek view
TTwo weeks view
MMonth view

Navigation in calendar view.

Key BindingDescription
lGo right
hGo left
kGo up
jGo down
nNext week
pPrevious week
NNext month
PPrevious month
tToday
gAbsolute date (YYYY/MM/DD)
TABNext item in a day

Actions you can perform in calendar view.

Key BindingDescription
cCapture new event
vPop-up detail agenda buffer
rRefresh buffer
RETJump
qQuit calendar view
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].