aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 104863dd65f8a2804cb4cb96fdcd40ed8d49deea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# grub-theme-udt

A GRUB 2 theme for the unified-desktop-theme (udt) family. The background is a
snapshot of the current wallpaper; a translucent panel on the left carries the
menu, in the active udt scheme's colours.

## How it is wired

`theme.txt.in` is a template. udt's `udt-palette` renders it to `theme.txt`
with the scheme's colours, then udt's `install.sh` runs `./build`, which
assembles the complete theme in `dist/udt/`: `theme.txt`, the PNG slices in
the same colours, the `.pf2` fonts and `background.jpg`, a GRUB-readable copy
of `~/.cache/udt/wpaper`. Both outputs are gitignored.

The accent is the scheme's fixed `accent` role, not the wallpaper-tracking
one: nothing at boot can read that.

## Install

GRUB reads `/boot` before anything else is mounted, so the theme is copied,
not linked. In a root shell:

    rm -rf /boot/grub/themes/udt && cp -r <this repo>/dist/udt /boot/grub/themes/

Once, set this in `/etc/default/grub`:

    GRUB_THEME="/boot/grub/themes/udt/theme.txt"

then regenerate the config:

    grub-mkconfig -o /boot/grub/grub.cfg

udt's `install.sh` prints these commands after a successful build; it never
runs them.

## After a scheme or wallpaper change

Rerun udt's `install.sh`, then the `cp` line above. `grub-mkconfig` is only
needed when `GRUB_THEME` changes. The theme on `/boot` stays as it was until
root copies the new one.

## Requirements

GRUB 2.14 or later (for `desktop-image-scale-method`), Python 3, `grub-mkfont`,
`fc-match`, ImageMagick's `magick`, and the fonts Noto Sans (Regular, Bold)
and Inconsolata Nerd Font Mono.

## Test

    ./build --selftest
    ./preview            # headless, screenshot to dist/preview.png
    ./preview --live     # QEMU window: move through the menu, 'c' for the console
    ./preview 1920x1080  # another mode

`preview` boots `dist/udt` in real GRUB (x86_64-efi) under QEMU and OVMF, with
stand-in menu entries, so the theme can be checked before root installs it.
It needs `qemu-system-x86_64`, OVMF in `/usr/share/OVMF` and `grub-mkimage`.

## License

GPLv2 only. See `LICENSE`.

## Development Approach

This project is developed using AI-assisted tools. Code is generated with the help of AI based on human-provided specifications, design decisions, and iterative feedback.

All contributions are reviewed, tested, and curated by the maintainer before being included in the codebase. AI is used as a productivity and exploration tool, while human oversight remains central to all decisions.

The goal is to combine the flexibility of AI-assisted development with standard open-source practices such as transparency, review, and accountability.