This is a first pass at creating a page dedicated for controlling the settings of tablet/pen style input devices. It's purpose is to modify the config file found at `/home/$USER/.config/cosmic/com.system76.CosmicComp/v1/input_devices`, so that the Compositor can route incoming input events to the correct displays and the events don't get discarded. Here's a video showing the functionality: <video src="https://github.com/user-attachments/assets/ffd59291-b610-4109-a3af-04bde7ddab4b"></video> As this is a first pass at the page, it naturally isn't in a fully featured state. It only is doing the bare minimum to get tablet input to not be discarded. There are 2 limitations I'd like to call out with this current state: **1)** The settings page will only show settings options for tablet/pen style input devices that currently plugged in. It doesn't have ability to allow users to clear out stale config entries for old tablets they might not be using anymore. They'll need to manually delete the entries from `input_devices` with a text editor. **2)** The list of drawing tablets present is calculated once when you open the settings application and doesn't live reload as devices are connected or disconnected. - [X] I have disclosed use of any AI generated code in my commit messages. - If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR. - In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment. - [X] I understand these changes in full and will be able to respond to review comments. - [X] My change is accurately described in the commit message. - [X] My contribution is tested and working as described. - [X] I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions. --------- Co-authored-by: Levi Portenier <levi@system76.com> |
||
|---|---|---|
| .github | ||
| .vscode | ||
| .zed | ||
| cosmic-settings | ||
| crates/cosmic-pipewire/src | ||
| debian | ||
| i18n | ||
| page | ||
| pages | ||
| resources | ||
| subscriptions | ||
| .gitattributes | ||
| .gitignore | ||
| cargo.just | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| LICENSE.md | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
| TESTING.md | ||
COSMIC Settings
The settings application for the COSMIC desktop environment.
Translators
Translations must go through Weblate at https://hosted.weblate.org/projects/pop-os/cosmic-settings.
Distributors
We will accept pull requests for distro-specific features and pages. Make them compile conditionally with a cargo feature.
The accent palettes on the Appearance settings page are configurable through the cosmic-config directory at /usr/share/cosmic/com.system76.CosmicSettings/v1/. One at accent_palette_dark, and another at accent_palette_light. Examples can be found at resources/accent_palette_dark.ron and resources/accent_palette_light.ron. This can be copied locally to ~/.config/cosmic/com.system76.CosmicSettings/v1/ for testing, and then move to /usr/share/cosmic for packaging.
Build
Dependencies
See the Build-Depends section of the debian control file.
Install
COSMIC uses just as its preferred build tool.
just
sudo just install
Packaging
If packaging for a Linux distribution, vendor dependencies locally with the vendor rule, and build with the vendored sources using the build-vendored rule. When installing files, use the rootdir and prefix variables to change installation paths.
just vendor
just build-vendored
just rootdir=debian/cosmic-settings prefix=/usr install
It is recommended to build a source tarball with the vendored dependencies, which can typically be done by running just vendor on the host system before it enters the build environment. Reference debian/rules to see how we generate debian packages with sbuild.
Developers
Developers should install rustup and configure their editor to use rust-analyzer. Run just check to ensure that the changes you make are free of linter warnings. You may configure your editor to run just check-json as the rust-analyzer check command.
Run the cosmic-settings binary with just run so that logs will be emitted to stderr, and crashes will generate detailed backtraces. Applications shouldn't crash, so when writing code, avoid use of unwrap() and expect(). Instead, log errors with tracing::error!() or tracing::warn!().
To improve compilation times, use Rust >= 1.90.0 and configure sccache for use with Rust.
License
Licensed under the GNU Public License 3.0.
Contribution
Any contribution intentionally submitted for inclusion in the work by you shall be licensed under the GNU Public License 3.0 (GPL-3.0). Each source file should have a SPDX copyright notice at the top of the file:
// SPDX-License-Identifier: GPL-3.0-only