Getting started
Install the toolchain, build and run Katlendar, and keep your test data apart from your real calendar.
Toolchain#
Install Rust with rustup and use the stable channel. egui 0.37 needs rustc 1.95 or newer. The crate uses the 2021 edition.
On Linux nothing else is needed to build or test. egui draws with OpenGL (glow) and talks to X11 or Wayland at run time. The keyring talks to the Secret Service over D-Bus, through the zbus crate, so no C libraries are linked.
On Windows the keyring uses the Credential Manager. On macOS it uses the Keychain.
Build and run#
cargo run
cargo build --release
Debug builds use opt-level = 1, so the app is quick enough to use while you work. Release builds are stripped and use thin LTO.
A debug build calls itself katlendar-debug to the window system, so it doesn't share an app ID with an installed copy.
Command line#
| Option | What it does |
|---|---|
--screenshot <file.png> | draws the app with sample data, saves a picture and quits (see Testing) |
--check-feed <link> | reads a calendar feed and prints what it found |
--check-caldav <server> <user> | lists a CalDAV account's calendars; the password comes from KATLENDAR_PASS |
--check-update | runs the update check once and prints the answer |
--version, -V | prints the version |
--help, -h | prints the options |
Where data lives#
| Linux | Windows | macOS | |
|---|---|---|---|
| data | ~/.local/share/katlendar/data.json | %APPDATA%\katlendar\data.json | ~/Library/Application Support/katlendar/data.json |
| settings | ~/.config/katlendar/config.json | %APPDATA%\katlendar\config.json | ~/Library/Application Support/katlendar/config.json |
XDG_DATA_HOME and XDG_CONFIG_HOME are honoured on every system, not only Linux. Code that needs these places goes through src/platform.rs and src/model/data.rs.
A file named katlendar.lock sits beside data.json. A second copy of the app that finds it held shows an "already open" window and stops.
The portable .home folder#
Put a folder named after the program plus .home beside it, and Katlendar keeps everything in there instead:
| Program | Folder |
|---|---|
katlendar | katlendar.home |
katlendar.exe | katlendar.exe.home |
Inside it, data goes to .local/share/katlendar and settings to .config/katlendar.
This is the easiest way to keep test data away from your real calendar. Make an empty target/debug/katlendar.home and every cargo run uses it.
mkdir -p target/debug/katlendar.home
Old names#
The app was once called Kalendar. On first start an old kalendar data folder is renamed, and keyring entries under the old service name are moved. Keep that code: people still upgrade from those copies.