Skip to content

GTK: свои картинки в angelos-assets/, сбой одного шага не ломает весь рендер / angelOS's pictures in angelos-assets/, one failed part no longer ends the render - #150

Closed
Alastor1991 wants to merge 2 commits into
MixaDoDs:mainfrom
Alastor1991:gtk-assets-symlink

Conversation

@Alastor1991

Copy link
Copy Markdown
Contributor

Баг

gtk-live.py кладёт свои картинки (рамки, кнопки окон, значки светофора Golden Gate) в ~/.config/gtk-{3,4}.0/assets/. Это имя общее: по старой инструкции к adw-gtk3 туда ставят ссылку на assets системной темы, а она доступна только для чтения. Тогда первая же картинка падает с PermissionError, и вместе с ней молча падает весь рендер:

  • нет angelos-decor.css, то есть нет светофора Golden Gate;
  • не применяется раскладка кнопок;
  • не включается живая тема angelOS-a/b.

В итоге у GTK4-программ остаются кнопки libadwaita справа, поверх них ложится CSS angelOS, и получаются двойные контуры. Раскладка остаётся от прошлого окружения, у меня это была icon:minimize,maximize,close от KDE.

Исправление

  • Своя папка. Картинки angelOS лежат в angelos-assets/, рядом с каждым CSS и в темах angelOS-a/b. Изменены 8 шаблонов, gtk-live.py, templates.json, пропуск версий GTK4 в test-update.sh и .config/gtk-4.0/angelos.css в репозитории. В папку assets/ angelOS больше не пишет и ничего из неё не удаляет. CSS, отрисованный со старым путём assets/, переносится тем же переписыванием, которым version_gtk4 ставит версию.
  • Независимые шаги. Каждая часть идёт через step(): ошибка печатается в stderr, остальные части выполняются, раскладка кнопок применяется всегда, код выхода 1. Наполовину записанную тему angelOS-a/b скрипт не включает.

Проверено

  • На машине с такой ссылкой: светофор слева, раскладка close,minimize,maximize:, тема angelOS-a/b, ссылка осталась как была.
  • Во временном HOME с недоступной для записи angelos-assets (GSETTINGS_BACKEND=memory): ошибка сообщена, код выхода 1, декорации и тема всё равно записаны.
  • scripts/check.sh (SKIP_INSTALL_TEST=1): 184 прошли, падает только settings-tree, как и на main.
EN

gtk-live.py wrote its pictures into ~/.config/gtk-{3,4}.0/assets/, a common name: adw-gtk3's old setup links it to the system theme's read-only assets. The first picture then failed with PermissionError and the whole render with it, silently: no angelos-decor.css (no Golden Gate lights), no button layout, no live theme; GTK 4 apps kept libadwaita's buttons on the right under angelOS's CSS (double rings), with the previous desktop's layout.

  • angelOS's pictures go to a folder of its own, angelos-assets/, next to each CSS and in its angelOS-a/b themes (8 templates, gtk-live.py, templates.json, test-update.sh, the shipped angelos.css). assets/ is never written in nor removed; a CSS rendered with the old path moves over by version_gtk4's rewrite.
  • Each part runs on its own (step()): a failure goes to stderr, the rest still happens, the button layout always, exit status 1; a half-written theme is not switched to.

Tested on the machine with the link (lights on the left, close,minimize,maximize:, angelOS-a/b, the link untouched), with an unwritable angelos-assets in a scratch HOME (GSETTINGS_BACKEND=memory: reported, exit 1, the rest written), and check.sh (184 passed, only settings-tree failing, as on main).

🤖 Generated with Claude Code

Alastor1991 and others added 2 commits November 1, 2026 21:39
… ends the render

gtk-live.py wrote its pictures (frames, window buttons, the Mac lights'
glyphs) into ~/.config/gtk-{3,4}.0/assets/. That name is common: adw-gtk3's
old setup links it to the system theme's assets, read-only. The first picture
there failed with PermissionError and the whole render with it, silently:
no angelos-decor.css (no Golden Gate traffic lights), no button layout, no
live theme. GTK 4 apps kept libadwaita's buttons on the right, under angelOS's
CSS, with KDE's layout.

- angelOS's pictures go to a folder of its own, angelos-assets/, next to each
  CSS and in its angelOS-a/b themes (8 templates, gtk-live.py, templates.json,
  test-update.sh's skip of the GTK 4 versions, the shipped angelos.css). A
  folder named assets/ is never written in nor removed. A CSS rendered with
  the old assets/ is moved over by version_gtk4's rewrite.
- Each part runs on its own (step()): a failure is said on stderr, the rest
  still happens, the button layout always, exit status 1. A half-written
  angelOS-a/b theme is not switched to.

Checked on the machine that had the link: the traffic lights on the left,
close,minimize,maximize:, angelOS-a/b, the link left as it was; and with an
unwritable angelos-assets in a scratch HOME (GSETTINGS_BACKEND=memory): the
failure reported, exit 1, the decorations and the theme still written.
check.sh (SKIP_INSTALL_TEST=1): 184 passed, only settings-tree failing, as on
main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MixaDoDs

MixaDoDs commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Вошло в angelOS вместе с остальными PR этой пачки — main 0821398 (обновление 05.11). Спасибо! / Shipped in main 0821398 (the 05.11 update). Thanks!

@MixaDoDs MixaDoDs closed this Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants