feat(desktop): default to Frame and OS launcher logos
Some checks are pending
ci / test (push) Waiting to run
Some checks are pending
ci / test (push) Waiting to run
This commit is contained in:
parent
8a2fce5b18
commit
42cba06b61
5 changed files with 43 additions and 7 deletions
|
|
@ -5,6 +5,12 @@ this file is the curated, human-readable summary.
|
||||||
|
|
||||||
## Unreleased — Fast defaults with user-controlled source builds
|
## Unreleased — Fast defaults with user-controlled source builds
|
||||||
|
|
||||||
|
- **Frame and OS launcher logo defaults (2026-10-02).** New DMS profiles
|
||||||
|
start with the Frame layout and the OS logo on the bar and dock launcher
|
||||||
|
buttons. Existing profiles keep their layout and logo choices; DMS stores
|
||||||
|
settings sparsely, so an absent value in an existing file is not treated
|
||||||
|
as permission to replace a previous Standard/apps selection.
|
||||||
|
|
||||||
- **Automatic wallpaper colors by default (2026-10-02).** New DMS profiles
|
- **Automatic wallpaper colors by default (2026-10-02).** New DMS profiles
|
||||||
select Theme Color → Auto, deriving their accent from the bundled wallpaper
|
select Theme Color → Auto, deriving their accent from the bundled wallpaper
|
||||||
when matugen is installed.
|
when matugen is installed.
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,16 @@
|
||||||
Rolling note between work sessions. **Update this file before you finish**, then
|
Rolling note between work sessions. **Update this file before you finish**, then
|
||||||
commit it. It should be short and current; use `git log` for detail.
|
commit it. It should be short and current; use `git log` for detail.
|
||||||
|
|
||||||
|
- **Frame and OS launcher logo defaults (2026-10-02):** DMS 1.6.2's layout
|
||||||
|
picker sets `frameEnabled=true`; its launcher button logo uses
|
||||||
|
`launcherLogoMode=os` (and the dock uses `dockLauncherLogoMode=os`). The
|
||||||
|
session now seeds these in a new `settings.json`, leaving every existing
|
||||||
|
settings file intact for these choices because DMS omits default-valued
|
||||||
|
keys. Session tests cover first use and preservation; `make check`, release
|
||||||
|
and static builds, and ShellCheck pass. The running QEMU playground already
|
||||||
|
visually shows Frame selected and an OS launcher icon; a fresh ISO remains
|
||||||
|
unverified under the 20 GiB VM disk-space gate.
|
||||||
|
|
||||||
- **Theme Color Auto default (2026-10-02):** DMS 1.6.2 maps the Theme Color
|
- **Theme Color Auto default (2026-10-02):** DMS 1.6.2 maps the Theme Color
|
||||||
Auto button to `currentThemeName=dynamic` and
|
Auto button to `currentThemeName=dynamic` and
|
||||||
`currentThemeCategory=dynamic` in `settings.json`. The Mango session now
|
`currentThemeCategory=dynamic` in `settings.json`. The Mango session now
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,16 @@ disposable VM; `serial-driver.py recovery` now automates the same check.
|
||||||
|
|
||||||
## Matrix
|
## Matrix
|
||||||
|
|
||||||
|
Frame and launcher defaults (2026-10-02): the session now seeds DMS 1.6.2's
|
||||||
|
`frameEnabled=true`, `launcherLogoMode=os`, and `dockLauncherLogoMode=os` only
|
||||||
|
when `settings.json` does not yet exist. DMS's sparse settings format makes
|
||||||
|
missing keys in existing files ambiguous; those files retain their layout and
|
||||||
|
logo values. Functional session tests cover the first login and preservation
|
||||||
|
of both explicit and omitted values. `make check`, release/static builds and
|
||||||
|
ShellCheck pass. The existing disposable VM already shows Frame selected and
|
||||||
|
the OS launcher icon. A fresh ISO/install with the new seed remains unverified
|
||||||
|
because the host has 10 GiB free against the 20 GiB VM gate.
|
||||||
|
|
||||||
Theme color default (2026-10-02): the Mango session seeds DMS 1.6.2's
|
Theme color default (2026-10-02): the Mango session seeds DMS 1.6.2's
|
||||||
`currentThemeName` and `currentThemeCategory` as `dynamic` before DMS starts,
|
`currentThemeName` and `currentThemeCategory` as `dynamic` before DMS starts,
|
||||||
when the aurora wallpaper is present and no theme choice exists. This is the
|
when the aurora wallpaper is present and no theme choice exists. This is the
|
||||||
|
|
|
||||||
|
|
@ -1492,12 +1492,13 @@ default_wallpaper="$wallpaper_dir/aurora-lagoon.jpg"
|
||||||
if [ -r "$default_wallpaper" ] && command -v jq >/dev/null 2>&1; then
|
if [ -r "$default_wallpaper" ] && command -v jq >/dev/null 2>&1; then
|
||||||
(
|
(
|
||||||
umask 077
|
umask 077
|
||||||
# DMS Theme Color > Auto derives the accent from the wallpaper. Set
|
# Set first-session appearance before DMS creates its sparse settings
|
||||||
# this only for a new profile (or one with no theme choice).
|
# file. Existing files may omit an explicit Standard/apps choice, so
|
||||||
|
# only fill the theme if missing; leave other choices untouched.
|
||||||
dms_settings="${XDG_CONFIG_HOME:-$HOME/.config}/DankMaterialShell/settings.json"
|
dms_settings="${XDG_CONFIG_HOME:-$HOME/.config}/DankMaterialShell/settings.json"
|
||||||
if mkdir -p "$(dirname "$dms_settings")"; then
|
if mkdir -p "$(dirname "$dms_settings")"; then
|
||||||
if [ ! -e "$dms_settings" ]; then
|
if [ ! -e "$dms_settings" ]; then
|
||||||
jq -n '{configVersion:18,currentThemeName:"dynamic",currentThemeCategory:"dynamic"}' > "$dms_settings"
|
jq -n '{configVersion:18,currentThemeName:"dynamic",currentThemeCategory:"dynamic",launcherLogoMode:"os",dockLauncherLogoMode:"os",frameEnabled:true}' > "$dms_settings"
|
||||||
elif jq -e '(.currentThemeName // "") == ""' "$dms_settings" >/dev/null 2>&1; then
|
elif jq -e '(.currentThemeName // "") == ""' "$dms_settings" >/dev/null 2>&1; then
|
||||||
if settings_tmp="$(mktemp "${dms_settings}.XXXXXX")"; then
|
if settings_tmp="$(mktemp "${dms_settings}.XXXXXX")"; then
|
||||||
if jq '.currentThemeName = "dynamic" | .currentThemeCategory = "dynamic"' "$dms_settings" > "$settings_tmp"; then
|
if jq '.currentThemeName = "dynamic" | .currentThemeCategory = "dynamic"' "$dms_settings" > "$settings_tmp"; then
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,9 @@ fn first_login_seeds_wallpaper_folder_and_letter_avatar_without_replacing_choice
|
||||||
serde_json::from_slice(&std::fs::read(&settings).unwrap()).unwrap();
|
serde_json::from_slice(&std::fs::read(&settings).unwrap()).unwrap();
|
||||||
assert_eq!(settings_json["currentThemeName"], "dynamic");
|
assert_eq!(settings_json["currentThemeName"], "dynamic");
|
||||||
assert_eq!(settings_json["currentThemeCategory"], "dynamic");
|
assert_eq!(settings_json["currentThemeCategory"], "dynamic");
|
||||||
|
assert_eq!(settings_json["launcherLogoMode"], "os");
|
||||||
|
assert_eq!(settings_json["dockLauncherLogoMode"], "os");
|
||||||
|
assert_eq!(settings_json["frameEnabled"], true);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
state_json["wallpaperPath"],
|
state_json["wallpaperPath"],
|
||||||
wallpapers
|
wallpapers
|
||||||
|
|
@ -208,7 +211,7 @@ fn first_login_seeds_wallpaper_folder_and_letter_avatar_without_replacing_choice
|
||||||
std::fs::write(&avatar, b"custom avatar").unwrap();
|
std::fs::write(&avatar, b"custom avatar").unwrap();
|
||||||
std::fs::write(
|
std::fs::write(
|
||||||
&settings,
|
&settings,
|
||||||
r#"{"configVersion":18,"currentThemeName":"purple","currentThemeCategory":"generic"}"#,
|
r#"{"configVersion":18,"currentThemeName":"purple","currentThemeCategory":"generic","launcherLogoMode":"apps","dockLauncherLogoMode":"dank","frameEnabled":false}"#,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
std::fs::remove_file(fixture.runtime.join("wayland-0")).unwrap();
|
std::fs::remove_file(fixture.runtime.join("wayland-0")).unwrap();
|
||||||
|
|
@ -222,9 +225,12 @@ fn first_login_seeds_wallpaper_folder_and_letter_avatar_without_replacing_choice
|
||||||
.read(".cache/DankMaterialShell/cache.json")
|
.read(".cache/DankMaterialShell/cache.json")
|
||||||
.contains("/chosen"));
|
.contains("/chosen"));
|
||||||
assert_eq!(std::fs::read(&avatar).unwrap(), b"custom avatar");
|
assert_eq!(std::fs::read(&avatar).unwrap(), b"custom avatar");
|
||||||
assert!(fixture
|
let preserved: serde_json::Value =
|
||||||
.read(".config/DankMaterialShell/settings.json")
|
serde_json::from_slice(&std::fs::read(settings).unwrap()).unwrap();
|
||||||
.contains("purple"));
|
assert_eq!(preserved["currentThemeName"], "purple");
|
||||||
|
assert_eq!(preserved["launcherLogoMode"], "apps");
|
||||||
|
assert_eq!(preserved["dockLauncherLogoMode"], "dank");
|
||||||
|
assert_eq!(preserved["frameEnabled"], false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
@ -247,4 +253,7 @@ fn missing_theme_choice_is_filled_without_losing_other_dms_settings() {
|
||||||
assert_eq!(saved["currentThemeName"], "dynamic");
|
assert_eq!(saved["currentThemeName"], "dynamic");
|
||||||
assert_eq!(saved["currentThemeCategory"], "dynamic");
|
assert_eq!(saved["currentThemeCategory"], "dynamic");
|
||||||
assert_eq!(saved["fontSize"], 15);
|
assert_eq!(saved["fontSize"], 15);
|
||||||
|
assert!(saved.get("launcherLogoMode").is_none());
|
||||||
|
assert!(saved.get("dockLauncherLogoMode").is_none());
|
||||||
|
assert!(saved.get("frameEnabled").is_none());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue