From 1d337059ba37c1c96ee7e1f288dfd98f113ff2eb Mon Sep 17 00:00:00 2001 From: Derek Date: Wed, 14 Oct 2026 17:40:24 +1100 Subject: [PATCH] fix: list the HyperI wallpaper in the GNOME picker The SOE wallpaper is now also registered in /usr/share/gnome-background-properties, so it stays selectable in Settings > Appearance after a user picks another background. The block moves to its own wallpaper.yml with a wallpaper tag, since the gnome.yml include only runs for winlike/maclike. --- README.md | 1 + ansible/roles/soe-gui/tasks/gnome.yml | 58 ------------------ ansible/roles/soe-gui/tasks/main.yml | 14 +++++ ansible/roles/soe-gui/tasks/wallpaper.yml | 73 +++++++++++++++++++++++ install.sh | 1 + 5 files changed, 89 insertions(+), 58 deletions(-) create mode 100644 ansible/roles/soe-gui/tasks/wallpaper.yml diff --git a/README.md b/README.md index 4c433fb..717a71b 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ flowchart TD | `packer` | HashiCorp Packer from HashiCorp's repo or tap. Opt-in, in no persona | | `contributor` | hyperi-ci + its check tools (semgrep, alint), gitleaks, trivy, hadolint, pip-audit, yamllint, ansible-lint, pre-commit, act, git-scrub, macbash | | `soe` / `soe-gui` | HyperI org policy (opt-in) | +| `wallpaper` | HyperI wallpaper only, from `soe-gui`: set as the desktop background and listed in the GNOME Settings picker | | `--full-stack` / `--infra` / `--languages [list]` | Persona bundles (see `--help`) | | `winlike` / `maclike` | GNOME taskbar (winlike) or dock (maclike), winlike wins if both | | `rdp-server` | GNOME Remote Login on port 3389 (inbound). NOT Desktop Sharing -- see the note below the table | diff --git a/ansible/roles/soe-gui/tasks/gnome.yml b/ansible/roles/soe-gui/tasks/gnome.yml index 63b1337..71bdfaf 100644 --- a/ansible/roles/soe-gui/tasks/gnome.yml +++ b/ansible/roles/soe-gui/tasks/gnome.yml @@ -13,7 +13,6 @@ # - ui-mode utility deployment # - Mode application (via ui-mode script) # - System-wide dconf defaults -# - Wallpaper deployment # - Font installation # ============================================================================ @@ -658,63 +657,6 @@ - ansible_facts['distribution'] in ['Ubuntu', 'Fedora'] - gnome_shell_running.rc != 0 -# ============================================================================ -# WALLPAPER DEPLOYMENT (system-wide, safe from apt/dnf updates) -# ============================================================================ -# Controlled by branding_enabled and background_file variables - -- name: Deploy custom wallpaper - tags: ['winlike', 'maclike', 'never'] - when: - - has_gnome | default(false) - - ansible_facts['distribution'] in ['Ubuntu', 'Fedora'] - - branding_enabled | default(true) - - background_file | default('') | length > 0 - block: - - name: Create local backgrounds directory (safe from package updates) - ansible.builtin.file: - path: /usr/local/share/backgrounds - state: directory - mode: '0755' - - - name: Deploy background image - ansible.builtin.copy: - src: "{{ background_file }}" - dest: /usr/local/share/backgrounds/desktop-background.svg - mode: '0644' - - - name: Set background as default (light mode) - community.general.dconf: - key: "/org/gnome/desktop/background/picture-uri" - value: "'file:///usr/local/share/backgrounds/desktop-background.svg'" - state: present - become: true - become_user: "{{ actual_user }}" - - - name: Set background as default (dark mode) - community.general.dconf: - key: "/org/gnome/desktop/background/picture-uri-dark" - value: "'file:///usr/local/share/backgrounds/desktop-background.svg'" - state: present - become: true - become_user: "{{ actual_user }}" - - - name: Set background scaling mode - community.general.dconf: - key: "/org/gnome/desktop/background/picture-options" - value: "'zoom'" - state: present - become: true - become_user: "{{ actual_user }}" - - rescue: - - name: Record that the wallpaper was not deployed - ansible.builtin.set_fact: - deploy_warnings: >- - {{ deploy_warnings | default([]) - + ['Wallpaper: ' ~ (ansible_failed_task.name | default('unknown task')) - ~ ' -- ' ~ (ansible_failed_result.msg | default('no message'))] }} - # ============================================================================ # UPDATE ALL EXTENSIONS TO LATEST # ============================================================================ diff --git a/ansible/roles/soe-gui/tasks/main.yml b/ansible/roles/soe-gui/tasks/main.yml index 4d1e45d..a3adcbc 100644 --- a/ansible/roles/soe-gui/tasks/main.yml +++ b/ansible/roles/soe-gui/tasks/main.yml @@ -39,6 +39,20 @@ - has_gnome | default(false) - "'winlike' in ansible_run_tags or 'maclike' in ansible_run_tags" +# The wallpaper is the same in either UI mode, so winlike/maclike may union +# onto its tasks, unlike gnome.yml above. +- name: Deploy the HyperI wallpaper + ansible.builtin.include_tasks: + file: wallpaper.yml + apply: + tags: ['soe-gui', 'wallpaper', 'winlike', 'maclike'] + tags: ['soe-gui', 'wallpaper', 'winlike', 'maclike'] + when: + - ansible_facts['distribution'] in ['Fedora', 'Ubuntu'] + - has_gnome | default(false) + - branding_enabled | default(true) + - background_file | default('') | length > 0 + - name: Install Slack ansible.builtin.include_tasks: file: slack.yml diff --git a/ansible/roles/soe-gui/tasks/wallpaper.yml b/ansible/roles/soe-gui/tasks/wallpaper.yml new file mode 100644 index 0000000..7c1c259 --- /dev/null +++ b/ansible/roles/soe-gui/tasks/wallpaper.yml @@ -0,0 +1,73 @@ +--- +# HyperI desktop wallpaper: system-wide image, GNOME picker entry, and the +# desktop user's background. Controlled by branding_enabled and background_file. + +- name: Deploy custom wallpaper + block: + - name: Create the backgrounds and wallpaper-list directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + loop: + - /usr/local/share/backgrounds + - /usr/share/gnome-background-properties + + - name: Deploy background image + ansible.builtin.copy: + src: "{{ background_file }}" + dest: /usr/local/share/backgrounds/desktop-background.svg + mode: '0644' + + # Settings > Appearance builds its system background list from this directory, + # so the wallpaper stays selectable after a user picks another one. + - name: List the background in the GNOME wallpaper picker + ansible.builtin.copy: + dest: /usr/share/gnome-background-properties/hyperi-wallpapers.xml + mode: '0644' + content: | + + + + + HyperI + /usr/local/share/backgrounds/desktop-background.svg + /usr/local/share/backgrounds/desktop-background.svg + zoom + solid + #000647 + #000647 + + + + - name: Set background as default (light mode) + community.general.dconf: + key: "/org/gnome/desktop/background/picture-uri" + value: "'file:///usr/local/share/backgrounds/desktop-background.svg'" + state: present + become: true + become_user: "{{ actual_user }}" + + - name: Set background as default (dark mode) + community.general.dconf: + key: "/org/gnome/desktop/background/picture-uri-dark" + value: "'file:///usr/local/share/backgrounds/desktop-background.svg'" + state: present + become: true + become_user: "{{ actual_user }}" + + - name: Set background scaling mode + community.general.dconf: + key: "/org/gnome/desktop/background/picture-options" + value: "'zoom'" + state: present + become: true + become_user: "{{ actual_user }}" + + rescue: + - name: Record that the wallpaper was not deployed + ansible.builtin.set_fact: + deploy_warnings: >- + {{ deploy_warnings | default([]) + + ['Wallpaper: ' ~ (ansible_failed_task.name | default('unknown task')) + ~ ' -- ' ~ (ansible_failed_result.msg | default('no message'))] }} diff --git a/install.sh b/install.sh index c0aa7be..0101bbd 100755 --- a/install.sh +++ b/install.sh @@ -224,6 +224,7 @@ HyperI SOE (soe, soe-gui) - org policy, includes everything above: nemo Nemo file manager (replaces Nautilus) desktop-cleanup Hide duplicate apps, dedupe Flatpak/apt gnome-extensions GNOME extensions (winlike / maclike) + wallpaper HyperI wallpaper, set and listed in the GNOME picker AI coding agents (developer-ai) - opt-in; ai is the group tag for both: codex OpenAI Codex CLI - the second opinion, not the driver