BreakingExpress

Handle your calendar from the Linux terminal with the konsolekalendar command

I’m a KDE user, and for years I’ve been on a seemingly infinite journey of discovery with the Plasma Desktop. If you have been to ask me in public, I’d most likely declare to know all the things there may be to know in regards to the desktop I exploit every single day of my life. But in reality, I’ve truly solely simply scratched the floor. It appears every single day I be taught a brand new KDE trick that both makes my life simpler or simply extra enjoyable, and my newest discovery is the konsolekalendar command, which helps you to view and handle an iCal calendar from the terminal.

Akonadi

The Akonadi challenge is a low-level KDE Framework that helps the Plasma Desktop hold observe of all of the Personal Information Manager (PIM) knowledge. It’s largely for builders and consists of plenty of libraries that permit a programmer to create functions via which you’ll be able to entry your contacts, notes, emails, calendar, and so forth. Some terminal instructions are included in Akonadi, akin to akonadictl to start out and cease the Akonadi service, however they’re largely for troubleshooting. However, konsolekalendar is a user-facing command that gives you full entry to all the info within the Kontact suite, together with KMail, Notes, and the Calendar.

If you are working KDE’s Plasma Desktop, then you have already got the Kontact suite put in.

You additionally have already got Akonadi and its instruments put in, so all the things you want for terminal-based calendaring is in place!

View your calendar from the terminal

You can host your individual iCal calendaring service because of initiatives like NextCloud and Radicale, or chances are you’ll have already got an iCal account with common suppliers (as an illustration, Google). When you employ Kontact for calendaring, you subscribe to a calendar object (a “collection” in Akonadi’s terminology). When you make updates to your native calendar, the modifications get despatched again to your iCal server to synchronize your calendar server and consumer.

Whether or not you have used the calendaring a part of Kontact but, you could have some default calendar objects in Kontact. You have one referred to as Personal Calendar and Birthdays & Anniversaries.

Here’s how one can show the present day’s calendar (Personal Calendar by default):

$ konsolekalendar
Date:   Saturday, January 15, 2022
        10:00 AM - 11:00 AM
Summary: Covid booster shot
UID: 8d8a1e38-c88c-4d84-99e5-23...
----------------------------------
Date:   Saturday, January 15, 2022
        12:00 PM - 01:00 PM
Summary: Lunch
UID: 7aa89a...
----------------------------------
Date:   Saturday, January 15, 2022
        01:00 PM - 04:45 PM
Summary: Afternoon coding
UID: 9cde38b...
----------------------------------
Date:   Saturday, January 15, 2022
        06:00 PM - 10:00 PM
Summary: Planescape sport
UID: c73f7e98-722f-48a2-8006-66...
----------------------------------

Add an occasion

To see all calendars you have subscribed to, use the --list-calendars choice:

$ konsolekalendar --list-calendars
----------------------------------
3  - (Read solely) Birthdays & Anniversaries
11 - Personal Calendar
60 - (Read solely) Open Invitations
61 - (Read solely) Declined Invitations
66 - Dnd
67 - Work
68 - Museum

The numbers on the left are calendar IDs. To add an occasion to a particular calendar, use the --calendar choice, adopted by the calendar ID:

$ konsolekalendar --add --calendar 66
--date 2022-01-16
--time 20:00 --end-time 23:59
--summary "Another game"
--description "Remember to bring dice"
Success: "Another game" inserted

Delete an occasion

You may also take away occasions. Each occasion has a novel ID (UID), supplied on the backside of every occasion itemizing:

$ konsolekalendar --list
Date:   Saturday, January 15, 2022
        06:00 PM - 10:00 PM
Summary: Planescape sport
UID: c73f7e98-722f-48a2-8006-66aa8ddcf789

To delete an occasion, use the --delete choice together with the --uid choice:

$ konsolekalendar --delete
--uid c73f7e98-722f-48a2-8006-66aa8ddcf789

Akonadi within the terminal

Everything you do with konsolekalendar is straight away carried out in Akonadi and is mirrored simply as shortly in Kontact itself. Using one does not imply you need to quit the opposite. Thanks to their shared Akonadi backend, the 2 view and edit the identical knowledge. The konsolekalendar command is a piece in progress. Future plans embrace integration with the Notes and Journal elements of Kontact, and there are a lot of extra choices obtainable than this text lined. If you are utilizing the KDE desktop, attempt konsolekalendar and expertise a PIM on your terminal!

Exit mobile version