Skip to content

crispinprojects/talkcalendar

Repository files navigation

Talk Calendar

Talk Calendar is a personal desktop calendar for Linux which has some speech capability for reading out dates, times and event details.

Talk Calendar has been developed using C and GTK4 for GTK desktops (Ubuntu Desktop, GNOME, Cinnamon, XFCE etc.).

A screenshot of Talk Calendar (Ubuntu Desktop) is shown below.

Core Features

  • built with C and GTK4 for GTK based desktops
  • Graphical user interface with month view calendar
  • month events side panel
  • export and import iCalendar files (backup and restore)
  • click on calendar day to read out date
  • talking clock (t-key)
  • calendar tools such as calculate Easter and search for events
  • Sqlite3 database used to store events

Local Install Using Pre-built Binary (x86 Intel PCs)

A pre-built 64-bit x86 Talk Calendar executable is available and can be downloaded from the binary directory. This has been built using GTK 4.14 and compiled using Ubuntu 24.04 on Intel hardware.

Extract the downloaded file which contains the Talk Calendar executable. Talk Calendar must have executable permissions to execute. If necessary change Talk Calendar file permissions so that it can run as an executable as shown below.

sudo chmod +x talkcalendar

Assuming that the GTK4 base libraries are installed the Talk Calendar binary can be run from the terminal using:

./talkcalendar

Desktop System Menu Entry

To add Talk Calendar to the system menu modify the Talk Calendar desktop file provided in the download. A desktop file has a .desktop extension and provides metadata about an application such as its name, icon, command to execute and other properties. For user-specific applications desktop files can be located locally in the ~/.local/share/applications/ directory. Local user entries take precedence over system entries. For desktops based on GNOME such as the Ubuntu Desktop, the desktop file should be named using the application ID, that is application_id.desktop, which in this case is "org.gtk.talkcalendar.desktop"

You need to modify the "org.gtk.talkcalendar.desktop" file using your own user name and directory locations. For example, if your user name is "sam" and you install local applications in a folder called "Software" and you create a folder called "talkcalendar " to store the Talk Calendar binary executable and the Flite voice then the executable path would be "Exec=/home/sam/Software/talkcalendar/talkcalendar". The Exec variable defines the command to execute when launching an application, in this case, the talkcalendar binary executable. The Path variable tells the system where to look for the executable and the calendar database. The Icon variable specifies the path to the icon file associated with the application. In a .desktop file, you need to use absolute and full paths.

Copy your modified "org.gtk.talkcalendar.desktop" file to the ~/.local/share/applications/ directory. Create the ~/.local/share/applications/ directory if it does not already exist. This way of locally installing Talk Calendar should be universal across different Linux distributions.

Autostart Talk Calendar

Copy the "org.gtk.talkcalendar.desktop" file to ~/.config/autostart to start Talk Calendar when the computer is switched on. Talk Calendar can then read out the current date and day events and any future upcoming events (see preferences settings) when the computer is switched on.

Calendar Interface

Talk Calendar uses a month view calendar with a curtain side panel to display month events. To create a new event select a day on the calendar and press the new event button on the header bar. To edit an event, select it in month events side panel and then press the edit event button on the header bar. Likewise to delete an event select it in the month events side panel and press the delete button on the header bar. To locate an event on the calendar press the location button.

The hamburger menu can be used to select the preferences dialog and other features such as exporting a personal calendar as an iCalendar file for backup purposes. These typically use the file extension ".ical" or ".ics". The iCalendar standard is an open standard for exchanging calendar and scheduling information between users and computers. An icalendar file is a plain text file and so can be viewed and modified using a standard text editor.

Pressing F1 invokes the information window which can also be selected from the hamburger menu. The information window shows the keyboard shortcuts, how many records are in the calendar database, the Sqlite version being used on the system, the desktop font and scale factor. The About dialog displays the Talk Calendar version number.

New Event

Select An Event

Hamburger Menu

Preferences

Information (F1)

Talking

  • Make sure the "Enable Talking" check button in the preferences window is ticked and the Flite voice (flite_cmu_us_kal16) found in the binary download is placed in the current working directory in which the Talk Calendar executable is located

  • Press the t key to readout the current time (talking clock)

  • Click on a calendar day to read out the date and any event details

  • The space bar can also be used to read out events on a selected day

Font Size, Text Scaling, Colour

Font, font size and text scaling are no longer changed from within Talk Calendar but done at the system level. You can install and use the GNOME Tweaks tool to change system fonts and the text scaling factor.

sudo apt install gnome-tweaks

The calendar style colour is again set at the system level. Open Ubuntu desktop "Settings" and use the "Appearance" tab to change the colour style as required.

Apparently you should use system settings rather that in-app settings with GNOME based desktops.

Speech Engine

This version of Talk Calendar uses a compiled version of Flite which is a free small fast portable speech synthesis system with a BSD-like license. The compiled Flite voice called "flite_cmu_us_kal16" must be located in the current working directory in which the Talk Calendar executable is located. I compiled the voice from the source code located here.

Building on Ubuntu 24.04 x86 Hardware

To build Talk Calendar from source you need the gcc compiler, GTK4, GLIB, and SQLITE development libraries. You need to install the following packages.

sudo apt install build-essential
sudo apt install libgtk-4-dev
sudo apt install libasound2-dev
sudo apt install sqlite3
sudo apt install libsqlite3-dev

To check the installed Sqlite 3 version use the command below.

sqlite3 --version

To determine which version of GTK4 is running on a Ubuntu/Debain system use the following terminal command.

dpkg -l | grep libgtk*

Use the MAKEFILE to compile Talk Calendar. Just run "make" inside the source code folder.

make

To run Talk Calendar from the terminal use

./talkcalendar

Compile Notes

The latest version of Talk Calendar (0.4 series) has been developed using Ubuntu 24.04 which uses GTK 4.14. This is a much newer version of the GTK toolkit compared to that used with Debian 12 which is version GTK 4.8 and used when developing the 0.3 series of Talk Calendar.

A model view design has been used based around a CalendarEvent type which is subclass of GObject. This allows the use of GListStore which is an array-like list implementation. A GListStore is a concrete implementation of the GListModel interface. GListView is used to display data from the model.

With GTK 4.14 the GtkFileDialog API is no longer signal based but callback based using an async/await pattern. This is a syntactic feature that allows an asynchronous, non-blocking function to be structured in a way similar to an ordinary synchronous function. File dialogs to export and import ical files (for backup purposes) has been implemented using this approach and this code is not compatible with GTK 4.8 (Debian 12).

GTask allows a task to be called inside a thread and is now used to play audio rather than using GThread and GMutex. With GTK4 it appears that the preferred way to perform work in a thread is to use GTask. The code now uses g_task_run_in_thread() so that a play audio blocking operation is executed in a separate background thread. The function g_task_run_in_thread() turns a synchronous operation into an asynchronous one, by running it in a thread. Apparently, GTask maintains a thread pool that is based on the number of CPUs available (i.e. supports multiple CPU-cores).

The GTK4.14 GTKCalendar has a function called gtk_calendar_mark_day which places a visual marker on a particular day of the current calendar month. This did not work with GTK 4.8 (Debian 12) and the reason I developed a custom calendar to allow visual markers to be used. GtkCalendar is now used in place of my previous custom calendar implementation.

The latest version of Talk Calendar (0.4 series) can be used with Ubuntu 24.04, Debian 13 (but not Debian 12 for the reasons discussed above) and Fedora 41 and above.

Building on Fedora

With Fedora you need to install the following packages to compile Talk Calendar.

sudo dnf install gcc make
sudo dnf install gtk4-devel
sudo dnf install gtk4-devel-docs
sudo dnf install glib-devel
sudo dnf install alsa-lib-devel
sudo dnf install sqlite-devel

To check the installed Sqlite 3 version use the command below.

sqlite3 --version

To check the installed version of the GTK4 development libraries use the command below.

dnf list gtk4-devel

Versioning

SemVer is used for versioning. The version number has the form 0.0.0 representing major, minor and bug fix changes.

Author

Project Status

Active and under development.

Acknowledgements

About

Talk Calendar is a personal desktop calendar for Linux which has some speech capability.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published