No description
Find a file
blakewilliams1 8940ec1af6
First pass at drawing tablet settings page (#2220)
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>
2026-10-07 08:33:35 -06:00
.github COSMIC policy update 2026-09-30 09:56:17 -06:00
.vscode feat: dropdown popups 2025-03-14 18:12:40 +01:00
.zed chore: add rustfmt config 2026-05-15 16:26:20 -06:00
cosmic-settings First pass at drawing tablet settings page (#2220) 2026-10-07 08:33:35 -06:00
crates/cosmic-pipewire/src feat(sound): use cosmic-settings-daemon's varlink API 2026-06-15 21:09:03 +02:00
debian Epoch 1.10.0 version update 2026-10-06 21:38:18 +02:00
i18n First pass at drawing tablet settings page (#2220) 2026-10-07 08:33:35 -06:00
page Epoch 1.10.0 version update 2026-10-06 21:38:18 +02:00
pages Epoch 1.10.0 version update 2026-10-06 21:38:18 +02:00
resources feat: reapply frosted glass feature 2026-07-10 19:06:17 +02:00
subscriptions Epoch 1.10.0 version update 2026-10-06 21:38:18 +02:00
.gitattributes github: ignore i18n subdirectories in language stats 2025-10-01 20:38:08 +02:00
.gitignore chore: add nix flake 2023-06-26 18:22:58 +02:00
cargo.just Epoch 1.7.0 version update 2026-08-25 16:56:55 +02:00
Cargo.lock Epoch 1.10.0 version update 2026-10-06 21:38:18 +02:00
Cargo.toml chore: update pinned version of cosmic-protocols 2026-09-16 00:09:35 +02:00
flake.lock build(nix): add dav1d to flake and update flake lock 2026-08-07 20:44:49 +02:00
flake.nix build(nix): add dav1d to flake and update flake lock 2026-08-07 20:44:49 +02:00
justfile feat: add openrc cargo feature for OpenRC bluetooth service management 2026-06-04 20:34:57 +02:00
LICENSE.md feat: settings application architecture 2023-01-26 23:20:45 +01:00
README.md feat: merge subscriptions crate into cosmic-settings repo 2025-10-08 21:48:23 +02:00
rust-toolchain.toml Epoch 1.7.0 version update 2026-08-25 16:56:55 +02:00
rustfmt.toml chore: add rustfmt config 2026-05-15 16:26:20 -06:00
TESTING.md Add display mirroring test (#2215) 2026-09-22 14:38:57 -06:00

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