XTEINK X4 / X4 PRO
Start Here
Make a quiet daily agenda for your X4 sleep screen. Start with the browser generator; this page explains what happens next.
1. Quick generation
- Open the browser generator.
- Choose a date.
- Optionally select an exported
.icscalendar file. - Click Generate preview, review the date and month dots, then click Download BMP.
The result is named like daily-agenda-2026-09-19.bmp. It is a static image, not an app.
2. SD card and sleep image setup
- Insert the device’s microSD card and keep a backup of its current sleep image.
- Copy the downloaded BMP to the location your firmware documents for the sleep image.
- The common filename is
sleep.bmp. The command-line tool also writes a.sleep/folder so outputs are easy to copy together. - Safely eject the card and wake or refresh the X4.
The file must be 480 × 800, portrait, uncompressed 24-bit BMP. Firmware builds differ, so follow your build’s exact filename or folder instructions when they differ from these common conventions.
3. Calendar files
An .ics file is a portable calendar export. In Google Calendar, Outlook, Apple Calendar, and most other calendar apps, look for Export, Download, or Save calendar.
All-day events appear in the today box and schedule. Events anywhere in the selected month get a small dot. Regional events are excluded by default when their location is not USA or the summary contains (Regional Holiday); turn on the regional option when needed.
What about a calendar URL?
The home page has an advanced URL field, but browser CORS rules may block it. Downloading the calendar as an .ics file is more reliable and keeps the data local.
4. AI-agent workflow
This repository includes an Agent Skill at .agents/skills/x4-agenda/SKILL.md. An AI coding agent can use it when you ask for a dated X4 agenda, an ICS import, or output validation.
For example: “Make an X4 agenda for 2026-11-26 using my-calendar.ics, include only national events, and validate the BMP.” The agent should run the tests, preserve the 480 × 800 24-bit format, and show the preview. Never provide calendar credentials; use an exported file or sanitized fixture.
5. Troubleshooting
The device rejects the image
Use the generated BMP directly. Do not resave it in a photo editor. Check that it is 480 × 800 and 24-bit, and confirm whether your firmware expects sleep.bmp, a .sleep/ folder, or another documented name.
An event is missing
Check the selected date and the exported file. Regional events are filtered unless enabled. Recurring events appear only when the calendar export expands them.
The URL does not load
This is usually CORS: the calendar server does not allow a browser page to read it. Download the .ics file instead.
The downloaded file is hard to find
Browser downloads go to the browser’s normal Downloads folder. The CLI writes BMPs to .sleep/ and previews to agenda-preview/.
6. Privacy and limitations
- Uploaded calendar text is processed locally in your browser. No account or server is required.
- A URL is requested by your browser and follows that server’s privacy policy and CORS rules.
- The screen is intentionally static: no checkboxes, note fields, touch controls, or live updates.
- The current layout is compact and English-only; long labels are shortened to fit.
- Review the preview when timezone data is missing from an ICS file.
7. Advanced customization
Technical users need Node.js 18 or newer:
npm install
npm run generate
The CLI reads agenda.json, writes the device-ready BMP to .sleep/, and writes SVG/PNG previews to agenda-preview/. Use custom paths with:
node bin/x4-agenda.mjs path/to/agenda.json output/.sleep output/preview
Core layout logic is in src/agenda-core.mjs; BMP encoding is in src/bmp.mjs. Run npm test after changing either. Recreate the representative fixtures with npm run generate:examples.