Repository navigation
fix(motd): apply the shared dark/light palette and heavier rules - #108
Merged
Merged
Conversation
added 3 commits
December 1, 2026 08:20
Hostname, OS version and kernel version now use the three RGB values fixed by the approved dark/light design, while every other field keeps the terminal theme colours. The welcome bar, both dividers and the memory/root-disk bars switch to heavy/block glyphs, and the PAM login path prints one bottom rule after the login record (also when no record exists).
A real host can legitimately sit at 0/6 or 6/6, so the live-output check now only asserts six cells drawn from the block/heavy pair and no thin track. Exact fill order and counts stay on the stable fixtures, plus new 0/4/100 percent cases for both endpoints.
Debian's C locale made [[ =~ [█━]{6} ]] and the sed bracket classes treat the
multi-byte glyphs as bytes, so a valid bar was rejected. The bar is now cut
after the percent sign with parameter expansion and validated by stripping the
two literal glyphs, which behaves the same in C and C.UTF-8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
把已定稿的「SSH 登录 · 深浅共用配色」落到 MOTD payload:
#0860C4、系统版本#B32675、内核版本#965000改为深浅终端共用的固定真彩色,字重沿用原样(主机名/系统/内核保持粗体)。33、负载36、健康/警告32/33/31、来源 IP35、日期时间与来源行用 39,风险阈值不变。│→┃,欢迎区下横线与提示符上方横线─→━;内存/根盘进度条改为哈希块█填充 + 重线━轨道,去掉原先细线─,仍按原 6 格与四舍五入填充。--last-login,即 PAMpam_exec)在登录记录之后输出一条━底横线,兼容有记录、无来源、无历史三种情况;登录数据仍不写入共享缓存,sshd drop-in / PAM 安装与恢复语义未改。NO_COLOR/TERM=dumb/缺 TERM 行为与宽度回退(40 列兜底、按段折行)保持不变。Scope
仅
tools/setup-motd.sh、modules/system-customize.sh(两处嵌入 payload 逐字节一致)与tests/test-motd.sh;hash pin 更新为提取后 sha256。Validation
bash -n:三个文件通过。git diff --check:通过。cmp两处提取内容相同。04152b5c08fd321c7d64046d82c3d1e8a90a287ace7a2ca505d0245b4de07ce1,与两处 pin 和测试断言一致。lslogins):8;96;196、179;38;117、150;80;0),无38;5;、无亮色索引、无48;背景。█与━同现且无─。Risks
┃/━/█的宽度,均为单宽度 Unicode 制表符,与原先│/─同类。Rollback
git revert本 PR 的 squash commit,或restore工具回退已安装 MOTD 组;无配置、PAM 或 sshd 语义变化需要恢复。Closes nothing; tracking issue n/a.