Skip to content

A cosmic applet to create and manage system timers, timed, power controls, and scheduling tasks. Basically a caffeine and timed task app all in one.

License

Notifications You must be signed in to change notification settings

kit-foxboy/chronomancer

Repository files navigation

Chronomancer

A COSMIC panel applet for comprehensive time management. Set countdown timers, schedule power management actions, and manage your system's sleep behavior—all from your system panel. It uses system bus to place inhibitors on suspend and ensure that the system uses the lightweight app timer to perform the desired operation. It has a sqlite database backend to eventually support recurring timers and such between reboots. Adding scripting support and/or systemd units is also in the works.

Chronomancer power controls interface showing sleep timer override options

For Users

Installation

Cosmic Store? (Coming Soon)

Note: Chronomancer's submission to the cosmic flatpak repo is currently pending review. Once approved, you'll be able to install it directly from the COSMIC Store.

For Now: Building from Source

If you'd like to try Chronomancer before the flatpak release, you can build and install it from source. A justfile is included for the casey/just command runner:

# Build and install system-wide (requires sudo)
just
sudo just install

Note: When installing this way and not flatpak, you need elevated privilages to write to system folders. There may be a way around this, but as it will be distributed with flatpak eventually, this is not a priority. If you know a better way, feel free to let me know!

Features

  • Countdown Timers: Quick timers with desktop notifications on completion
  • Power Management: Schedule suspend, hibernate, shutdown, or logout at specific times
  • Sleep Timer Override: Temporarily prevent your system from sleeping
  • Persistent Storage: Your timers survive system restarts
  • Reminders: Custom notification messages for important events
  • Panel Integration: Lightweight applet that lives in your COSMIC panel

Roadmap

  • Basic timer functionality (countdown, reminder)
  • System panel applet integration
  • Persistent storage of timers
  • Notifications on timer completion
  • Sleep timer override functionality
  • Power management at set times (suspend, hibernate, shutdown, logout)
  • Systemd bus integration with proper flatpak permissions
  • Restart timers (I have no clue why I forgot this with the other power management features)
  • Reminders with custom messages
  • Recurring timers
  • Script execution on timer completion (planned for much later due to security considerations and flatpak challenges)
  • Additional language support (Only if requested because I barely speak even one language XwX)

For Developers

Getting Started

Developers should install rustup and configure their editor to use rust-analyzer. To improve compilation times (Because holy moly):

  • Disable LTO in the release profile
  • Install the mold linker
  • Configure sccache for use with Rust

The mold linker will only improve link times if LTO is disabled.

Available Commands

The included justfile provides several useful commands:

  • just - builds the application with the default just build-release recipe
  • just run - builds and runs the application
  • just default - build release version
  • just fmt - format the application code
  • just install - installs the project into the system (requires root outside of flatpak)
  • just check - runs clippy on the project to check for linter warnings
  • just flatpak-sources - generate cargo-sources.json in the flatpak folder for flatpak distribution

Project Documentation

This project includes comprehensive documentation for developers in the .github directory:

  • Copilot Instructions: .github/copilot-instructions.md - Project overview, architecture, and patterns
  • Architectural Idioms: .github/architectural-idioms.md - Component-to-page message flow patterns
  • Flatpak Building: .github/flatpak.md - Guide to building with Flathub-preferred builder
  • UI Spacing Guide: .github/ui_spacing_guide.md
  • Iterator Patterns: .github/iterator-patterns.md
  • Icon Theming Notes: .github/icon-theming-notes.md
  • Macro Explanations: .github/macro-explanations.md

These are more or less just my thoughts and notes as I learn COSMIC and Rust, so feel free to suggest improvements or alternative approaches! I would create a pattern or example in the code and have AI help me document it for future reference.

Contributing

Contributions are more than welcome! Please open issues for bug reports or feature requests of any kind. Pull requests are also encouraged for bug fixes, improvements, or new features.

Suggestions for better design patterns and architecture are especially appreciated as I'm still learning COSMIC and Rust. Part of why I admittedly overdesigned this app is to explore standards in the COSMIC app community and I wanted to have at least the beginnings of reusable and scalable components. Feel free to reach out or revise my guides with some better Rust wisdom for my poor JavaScript-addled tiny peanut brain XwX

For Translators

Fluent is used for localization of the software. Fluent's translation files are found in the i18n directory. New translations may copy the English (en) localization of the project, rename en to the desired ISO 639-1 language code, and then translations can be provided for each message identifier. If no translation is necessary, the message may be omitted.

Contact & Support

My health is poor and I'm not always available, but I'm always happy to do my best. My preferred communicaiton platform is Discord but you can email me if that's your thing.

Get in Touch

  • Always subject to my day job and health concerns as autoimmune disease doesn't operate on a predictable schedule
  • Discord (most preferred): kitkabbit
  • Email (if you really must): foxykit@gmail.com
  • Twitch (livestreams playing games and talking about coding, game dev, and tech with a diverse group of wacky people who enjoy socializing and being dorks): https://twitch.tv/teamsnowdog
  • Youtube (just recorded gaming livestreams at the moment, but more dev-centric video essays and breakdowns in the works): https://youtube.com/@teamsnowdog
  • Ko-fi (support my work and ideas as I try to push through medical struggles and get doodles of my ideas and little articles about my experiences and opinions on all things software. Custom software comms in the works if ever healthy enough): https://ko-fi.com/kitkabbit
  • Bluesky: I'd list that but tbh it's where I'm most openly furry trash and not super relevant to my dev work so I'll leave that one out for now. Ask if you really want it.

Financial Support

If you find this project useful and would like to support my further involvement in COSMIC, consider dropping me a tip on Ko-fi: https://ko-fi.com/kitkabbit. My health is really poor and making ends meet is a struggle, so any support means I can be more active in developing apps and livestreaming about games, coding, and development.

Important Note / Rant

Agentic AI has been used to generate documentation and rapidly prototype design patterns in the .github folder. COSMIC is still extremely new, and there aren't strong opinions on best practices and patterns outside of MVU yet, so this can and will evolve over time. This documentation serves more as a journal of my learning process and design decisions with AI summarizing the choices made than anything. Only rough structural code output by AI and is only meant to serve as high level examples of possible approaches. After all, it's optimal for templatized and tedious tasks that don't involve as much reasoning. These journal documents are a good example. It writes the skeleton and I yippity yap my thoughts and experiences into it.

On the off chance you're a programmer reading about my dumb little project, don't be demoralized that AI is everywhere now. Remember that you're in charge and AI still makes shit up all the time. Hang in there. Just because knowing a language isn't enough to be competitive in the job market anymore doesn't mean that you don't have a role. It's up to you to actually KNOW how things work and be able to maintain them. I've always felt technology is always supposed to make life better for humans and in my own microscopic way, I want to contribute to that. Leave the tedium to skynet and don't give up on the world of computing or yourself.

"Dev who uses tools makes a good dev, tools who use devs makes the dev a tool - Codefucius (MY NEW OC, DON'T STEAL)"

License

MIT License (see LICENSE file)

About

A cosmic applet to create and manage system timers, timed, power controls, and scheduling tasks. Basically a caffeine and timed task app all in one.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •  

Languages