<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/modules/host-environment.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-24T21:13:01+00:00</updated>
<entry>
<title>docs(load-graph): seed module inventory and annotate foundation headers</title>
<updated>2026-05-24T21:13:01+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-24T21:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=2d83f8f55977dbf69f4f80e490ed0b96aeea4eee'/>
<id>urn:sha1:2d83f8f55977dbf69f4f80e490ed0b96aeea4eee</id>
<content type='text'>
I started the init.el load-graph classification with the foundation batch. I added docs/design/module-inventory.org as the living per-module inventory and annotated the seven foundation modules (system-lib, user-constants, host-environment, system-defaults, keyboard-compat, keybindings, config-utilities) with the load-graph header contract: layer, category, load shape, eager reason, top-level side effects, runtime requires, and direct-test-load safety.

I changed no load order, so init.el keeps its current eager order. The inventory records one hidden dependency for Phase 2: system-defaults uses host-environment and user-constants symbols at load while declaring them eval-when-compile, so the compiled module cannot load standalone.
</content>
</entry>
<entry>
<title>refactor(host-env): fix env-desktop-p doc and normalize the X predicates</title>
<updated>2026-05-23T08:35:17+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-23T08:35:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=14ec32b223608c8c507b4743ea7aa9c742d30d75'/>
<id>urn:sha1:14ec32b223608c8c507b4743ea7aa9c742d30d75</id>
<content type='text'>
env-desktop-p's docstring described a laptop, but the function returns t for the desktop case (no battery). env-x-p compared the window system against the string "x" while its sibling env-x11-p used `eq` against the symbol, so the two read differently for the same check.

I corrected the docstring and switched env-x-p to the symbol comparison. I also spelled out the difference between env-x-p (any X display, including XWayland) and env-x11-p (a real X11 session, no Wayland). Behavior is unchanged, so the existing display-predicate tests stay green.
</content>
</entry>
<entry>
<title>fix(host-environment): correct docstring order in cj/detect-system-timezone</title>
<updated>2026-04-30T14:13:43+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-30T13:25:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=17e2366180838b7e170230ff881cd3406be84a70'/>
<id>urn:sha1:17e2366180838b7e170230ff881cd3406be84a70</id>
<content type='text'>
The numbered list in the docstring had file-comparison and TZ env var
swapped relative to what the code does. The code tries
cj/match-localtime-to-zoneinfo first, then falls back to TZ. Updated
the docstring so the numbering matches the actual `or' chain.

Surfaced while writing tests for the priority chain.
</content>
</entry>
<entry>
<title>fix(host-environment): detect battery correctly on Linux desktops</title>
<updated>2026-04-22T16:45:19+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-22T16:45:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=848a2d52c9eb796dac94a6f263b0518abe580c69'/>
<id>urn:sha1:848a2d52c9eb796dac94a6f263b0518abe580c69</id>
<content type='text'>
`env-laptop-p` treated any `battery-format "%B"` value that wasn't literally "N/A" as "has a battery." On a Linux desktop using `battery-upower`, the result is "unknown". The AC adapter and USB-C power entries exist in /sys but there's no BAT*. That made desktops look like laptops. The per-machine font height switch in `font-config.el` broke as a result.

The fix uses /sys/class/power_supply/BAT* as the canonical Linux signal. That's what the kernel exposes, and what upower itself reads. Other platforms keep the `battery-format` path, but the fallback now checks for a live battery status char ("!", "+", "-") instead of only excluding "N/A".

Two pure helpers (`env--battery-status-char-indicates-battery-p`, `env--power-supply-has-battery-p`) keep the logic testable. The new test file covers Normal, Boundary, and Error cases for each helper.
</content>
</entry>
<entry>
<title>feat(env): add X11 and Wayland detection functions</title>
<updated>2026-02-01T08:00:38+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-02-01T08:00:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=29b5c8a78a87104475e7b808f7d98c776cb25a27'/>
<id>urn:sha1:29b5c8a78a87104475e7b808f7d98c776cb25a27</id>
<content type='text'>
env-x11-p returns t when on X11 (not Wayland).
env-wayland-p checks WAYLAND_DISPLAY env var, works with XWayland.
</content>
</entry>
<entry>
<title>feat(calendar-sync): Add automatic timezone detection and chronological sorting</title>
<updated>2025-11-17T00:09:17+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-17T00:09:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=d842e08de5600c90c2f9de93ca81aea32be9775a'/>
<id>urn:sha1:d842e08de5600c90c2f9de93ca81aea32be9775a</id>
<content type='text'>
Implemented calendar-sync.el as a complete replacement for org-gcal, featuring:

**Core Functionality:**
- One-way sync from Google Calendar to Org (via .ics URL)
- UTC to local timezone conversion for all event timestamps
- Chronological event sorting (past → present → future)
- Non-blocking sync using curl (works reliably in daemon mode)

**Automatic Timezone Detection:**
- Detects timezone changes when traveling between timezones
- Tracks timezone offset in seconds (-21600 for CST, -28800 for PST, etc.)
- Triggers automatic re-sync when timezone changes detected
- Shows informative messages: "Timezone change detected (UTC-6 → UTC-8)"

**State Persistence:**
- Saves sync state to ~/.emacs.d/data/calendar-sync-state.el
- Persists timezone and last sync time across Emacs sessions
- Enables detection even after closing Emacs before traveling

**User Features:**
- Interactive commands: calendar-sync-now, calendar-sync-start/stop
- Keybindings: C-; g s (sync), C-; g a (start auto-sync), C-; g x (stop)
- Optional auto-sync every 15 minutes (disabled by default)
- Clear status messages for all operations

**Code Quality:**
- Comprehensive test coverage: 51 ERT tests (100% passing)
- Refactored UTC conversion into separate function
- Clean separation of concerns (parsing, conversion, formatting, sorting)
- Well-documented with timezone behavior guide and changelog

**Migration:**
- Removed org-gcal-config.el (archived in modules/archived/)
- Updated init.el to use calendar-sync
- Moved gcal.org to .emacs.d/data/ for machine-independent syncing
- Removed org-gcal appointment capture template

Files modified: modules/calendar-sync.el:442, tests/test-calendar-sync.el:577
Files created: data/calendar-sync-state.el, tests/testutil-calendar-sync.el
Documentation: docs/calendar-sync-timezones.md, docs/calendar-sync-changelog.md
</content>
</entry>
<entry>
<title>style:host-environment: Fix quoting in docstrings</title>
<updated>2025-10-23T05:08:59+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-23T05:08:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=70f64261168d6f508a318a0159933a84e0997e1e'/>
<id>urn:sha1:70f64261168d6f508a318a0159933a84e0997e1e</id>
<content type='text'>
Correct the quoting style in docstrings for commands using backticks
instead of incorrect characters.
</content>
</entry>
<entry>
<title>fix: host-env: fix battery func, mac-osx detection, and docstrings</title>
<updated>2025-10-18T05:44:58+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-18T05:44:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=f59e3227404366599819a7b9fcc6c2f1d275c36a'/>
<id>urn:sha1:f59e3227404366599819a7b9fcc6c2f1d275c36a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: host-environment: issue with string vs symbol for system-type</title>
<updated>2025-10-15T18:31:08+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-15T18:31:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=ff9d96460e13e59edb4674cc0e050924718c33bb'/>
<id>urn:sha1:ff9d96460e13e59edb4674cc0e050924718c33bb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>changing repositories</title>
<updated>2025-10-12T16:47:26+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-10-12T16:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=092304d9e0ccc37cc0ddaa9b136457e56a1cac20'/>
<id>urn:sha1:092304d9e0ccc37cc0ddaa9b136457e56a1cac20</id>
<content type='text'>
</content>
</entry>
</feed>
