A template for developing applications for the COSMIC™ desktop environment.
Log into your GitHub account and click the "Use this template" button above. This will create a new repository in your account. Choose a name for this repository, and then clone it locally onto your system. Make the following changes after cloning it:
- In
Cargo.toml
, change thename
and set yourlicense
andrepository
. - Create a
LICENSE
file containing your chosen software license. - Rename the file
i18n/en/cosmic_app_template.ftl
by replacing thecosmic_app_template
portion with the new cratename
you set inCargo.toml
. - In
justfile
, change thename
andappid
variables with your own. - In
src/app.rs
, change theAPP_ID
value in theApplication
implementation of theAppModel
. - In
src/app.rs
, change theREPOSITORY
const with the URL to your application's git repository. - In
res/app.desktop
, change theName=
,Exec=
, andIcon=
fields - Set your license within the SPDX tags at the top of each source file
A justfile is included by default with common recipes used by other COSMIC projects. Install from casey/just
just
builds the application with the defaultjust build-release
recipejust run
builds and runs the applicationjust install
installs the project into the systemjust vendor
creates a vendored tarballjust build-vendored
compiles with vendored dependencies from that tarballjust check
runs clippy on the project to check for linter warningsjust check-json
can be used by IDEs that support LSP
Refer to the libcosmic API documentation and book for help with building applications with libcosmic.