Rewrite shell configuration options as well as read/write functionality as plugin #143

Merged
zach merged 9 commits from refactor/config-rw-plugin into main 2026-08-14 18:54:33 +02:00
Owner

What & why

Quickshell's FileView + JsonAdapter combo is great for smaller configuration files, or when said objects don't change much. But if you do need to change an object (e.g. like I did a while back, barConfig -> bar) then it's a bit of a pain since you can't retain the user's set values in the transition without some schizo convoluted JSON.* hack.

All configuration options have been properly migrated to the new plugin, and should not break current configuration files.

I have also fixed the greeter.

Related issue

No response

Type

Refactor / style

Tested

  • Build succeeds
  • Existing tests pass
  • Manually verified

Breaking changes?

User

As far as the user is concerned; only the greeter's configuration options do not work currently. For example, if transparency was set to enabled previously then currently that will not be respected. I need to figure out a clean solution to this since it could get ugly. Previously we were able to separate the configuration files for the greeter and the user, $HOME/.config/zshell/config.json and /etc/zshell-greeter/config.json, but because the plugin that reads the config is now the same code for both the greeter and the shell, there isn't a simple way for me to tell the plugin to read from a different path.
This is why it breaks, too. The plugin tries to read from $HOME, which expands to /home/greetd before login.

Developer

DynamicColors has been renamed to Colors and has moved into a new directory called Services. Configuration options still have the same path spec, for example: Config.bar.tray.showOnHover. Static values from the previous Appearance singleton has changed to become Tokens instead. For example: Appearance.rounding.normal -> Tokens.rounding.normal.
Font assignment has also changed, it used to be Appearance.font.family.* but has changed to be part of the Config singleton: Config.appearance.font.family.*.

Checklist

  • CI passes (format, lint, typecheck)
  • Clean commits
  • No new warnings
  • Docs updated if needed
### What & why Quickshell's `FileView` + `JsonAdapter` combo is great for smaller configuration files, or when said objects don't change much. But if you do need to change an object (e.g. like I did a while back, `barConfig` -> `bar`) then it's a bit of a pain since you can't retain the user's set values in the transition without some ~~schizo~~ convoluted `JSON.*` hack. All configuration options have been properly migrated to the new plugin, and should not break current configuration files. I have also fixed the greeter. ### Related issue _No response_ ### Type Refactor / style ### Tested - [x] Build succeeds - [x] Existing tests pass - [x] Manually verified ### Breaking changes? ### User As far as the user is concerned; only the greeter's configuration options do not work currently. For example, if transparency was set to enabled previously then currently that will not be respected. I need to figure out a clean solution to this since it could get ugly. Previously we were able to separate the configuration files for the greeter and the user, `$HOME/.config/zshell/config.json` and `/etc/zshell-greeter/config.json`, but because the plugin that reads the config is now the same code for both the greeter and the shell, there isn't a simple way for me to tell the plugin to read from a different path. This is why it breaks, too. The plugin tries to read from `$HOME`, which expands to `/home/greetd` before login. ### Developer `DynamicColors` has been renamed to `Colors` and has moved into a new directory called `Services`. Configuration options still have the same path spec, for example: `Config.bar.tray.showOnHover`. Static values from the previous `Appearance` singleton has changed to become `Tokens` instead. For example: `Appearance.rounding.normal` -> `Tokens.rounding.normal`. Font assignment has also changed, it used to be `Appearance.font.family.*` but has changed to be part of the `Config` singleton: `Config.appearance.font.family.*`. ### Checklist - [x] CI passes (format, lint, typecheck) - [x] Clean commits - [x] No new warnings - [x] Docs updated if needed
zach added 5 commits 2026-08-13 16:08:44 +02:00
fix greeter start script
C++ / fmt (pull_request) Successful in 5s
JS/TS / fmt (pull_request) Successful in 21s
JS/TS / lint (pull_request) Successful in 23s
Python / fmt (pull_request) Successful in 34s
Python / lint (pull_request) Successful in 33s
Python / test (pull_request) Successful in 1m0s
Python / typecheck (pull_request) Failing after 1m5s
Rust / fmt (pull_request) Successful in 37s
Rust / build (pull_request) Successful in 1m46s
C++ / build (pull_request) Successful in 2m40s
Rust / clippy (pull_request) Successful in 1m15s
Python / buildcheck (pull_request) Successful in 2m28s
C++ / clang-tidy (pull_request) Successful in 3m57s
566ccd67d9
Collaborator

Everything seems to work just fine after building.
I like what you changed within the developer stuff.
Also appreciate you documenting this within the PR.

Whoever I am curious/wonder why you renamed Appearance to Tokens.
Not a bad thing at all just like to hear your reason.

Did you put font underneath config to directly take whatever the user provides?

Everything seems to work just fine after building. I like what you changed within the developer stuff. Also appreciate you documenting this within the PR. Whoever I am curious/wonder why you renamed `Appearance` to `Tokens`. Not a bad thing at all just like to hear your reason. Did you put `font` underneath `config` to directly take whatever the user provides?
zach added 1 commit 2026-08-13 21:22:27 +02:00
fix font & greeter bin
C++ / fmt (pull_request) Successful in 5s
JS/TS / fmt (pull_request) Successful in 26s
JS/TS / lint (pull_request) Successful in 29s
Python / lint (pull_request) Successful in 33s
Python / fmt (pull_request) Successful in 35s
Python / test (pull_request) Successful in 58s
Python / typecheck (pull_request) Failing after 1m8s
Rust / fmt (pull_request) Successful in 46s
C++ / build (pull_request) Successful in 2m22s
Rust / build (pull_request) Successful in 1m31s
Python / buildcheck (pull_request) Successful in 2m18s
Rust / clippy (pull_request) Successful in 1m26s
C++ / clang-tidy (pull_request) Successful in 3m55s
501e866a68
zach added 1 commit 2026-08-13 21:26:53 +02:00
remove debug statelayer
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 11s
JS/TS / lint (pull_request) Successful in 23s
Python / fmt (pull_request) Successful in 30s
Python / lint (pull_request) Successful in 32s
Python / test (pull_request) Successful in 59s
Python / typecheck (pull_request) Failing after 1m0s
Rust / fmt (pull_request) Successful in 45s
C++ / build (pull_request) Successful in 2m31s
Rust / build (pull_request) Successful in 1m49s
Rust / clippy (pull_request) Successful in 1m17s
Python / buildcheck (pull_request) Successful in 2m25s
C++ / clang-tidy (pull_request) Successful in 3m56s
6ec58cb73a
zach added 1 commit 2026-08-13 21:43:32 +02:00
fix resources colors
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 16s
JS/TS / lint (pull_request) Successful in 18s
Python / fmt (pull_request) Successful in 33s
Python / lint (pull_request) Successful in 31s
Python / test (pull_request) Successful in 1m4s
Python / typecheck (pull_request) Failing after 1m14s
Rust / fmt (pull_request) Successful in 37s
Rust / build (pull_request) Successful in 1m47s
C++ / build (pull_request) Successful in 2m39s
Rust / clippy (pull_request) Successful in 1m10s
Python / buildcheck (pull_request) Successful in 2m27s
C++ / clang-tidy (pull_request) Successful in 3m55s
bda2c3821e
zach added 1 commit 2026-08-14 18:40:56 +02:00
add file+dir watcher & gatekeep reloads
C++ / fmt (pull_request) Successful in 5s
JS/TS / lint (pull_request) Successful in 21s
JS/TS / fmt (pull_request) Successful in 20s
Python / lint (pull_request) Successful in 32s
Python / fmt (pull_request) Successful in 34s
Python / test (pull_request) Successful in 58s
Python / typecheck (pull_request) Failing after 58s
Rust / fmt (pull_request) Successful in 43s
Rust / build (pull_request) Successful in 1m48s
C++ / build (pull_request) Successful in 2m36s
Rust / clippy (pull_request) Successful in 1m18s
Python / buildcheck (pull_request) Successful in 2m21s
C++ / clang-tidy (pull_request) Successful in 3m54s
97ecf68b46
AramJonghu requested review from AramJonghu 2026-08-14 18:48:45 +02:00
AramJonghu approved these changes 2026-08-14 18:52:51 +02:00
AramJonghu left a comment
Collaborator

Since a huge changelog is present, it is going to be a incredibly long time before any of this got a proper runtrough. Many changes seem to be just variable name changes as well.

It would be hard to individually test changes (unless we had written tests, which I am unfamiliar with on the qml side). My suggestion would be to merge it to main as is. We could then create issues as we go. It is regrettable, but this will likely save us more time than trying/testing each changed component. Have been running this branch for a couple days; has been fine apart from a few reverts that were easy fixes new users would not be running into.

Since a huge changelog is present, it is going to be a incredibly long time before any of this got a proper runtrough. Many changes seem to be just variable name changes as well. It would be hard to individually test changes (unless we had written tests, which I am unfamiliar with on the qml side). My suggestion would be to merge it to main as is. We could then create issues as we go. It is regrettable, but this will likely save us more time than trying/testing each changed component. Have been running this branch for a couple days; has been fine apart from a few reverts that were easy fixes new users would not be running into.
zach merged commit 6c80862ce8 into main 2026-08-14 18:54:33 +02:00
zach deleted branch refactor/config-rw-plugin 2026-08-14 18:54:33 +02:00
Sign in to join this conversation.