Skip to content

Damask: First-run configuration hook and non-destructive activation #1161

Closed

Description

@castrojo

Summary

Configure non-destructive defaults for Damask without overwriting personal wallpapers or colliding with GNOME's built-in timed day/night wallpaper cycle.

Technical Context

  • Flatpak apps run against GKeyfileSettingsBackend with config located at ~/.var/app/app.drey.Damask/config/glib-2.0/settings/keyfile.
  • Damask's GSettings schema separates root application preferences (app.drey.Damask) from source plugins (app.drey.Damask.sources.slideshow). Keys like folder-uri belong strictly to [app/drey/Damask/sources/slideshow].
  • Damask enumerates folders non-recursively. Wallpaper images live in /usr/share/backgrounds/bluefin/ (not the root /usr/share/backgrounds/).
  • Because Bluefin ships timed day/night XML slideshows natively, setting active-source='slideshow' by default would overwrite org.gnome.desktop.background picture-uri with static images and bypass day/night crossfades. Leaving active-source='none' pre-seeds the desired interval and settings while letting the user activate the rotator deliberately.

Implementation Steps

  1. Add user setup hook system_files/bluefin/usr/share/ublue-os/user-setup.hooks.d/25-damask-setup.sh:
    • Source /usr/lib/ublue/setup-services/libsetup.sh and call version-script damask-setup user 1 || exit 0.
    • Ensure directory ~/.var/app/app.drey.Damask/config/glib-2.0/settings exists.
    • Write pre-seeded keyfile:
      [app/drey/Damask]
      refresh-interval='86400'
      enable-automatic-refresh=true
      run-in-background=true
      active-source='none'
      
      [app/drey/Damask/sources/slideshow]
      folder-uri='file:///usr/share/backgrounds/bluefin'
      sort-by='random'
    • Enable user unit systemctl --user enable damask.service (which is safely guarded by ConditionPathExists=| so it only activates when Damask is installed).

Testing & Verification

  • Bats unit test executing hook in isolated environment and verifying generated keyfile structure and permissions.
  • Verify idempotency on repeat runs via version-script.

Activity

  1. added 2 commits that reference this issue on Sep 24, 2026
    813816a
    343bdc5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions