Skip to main content

max / mountaineer

apkovl: /etc/issue spec form, motd login shim, yambar config - common/etc/issue rewritten to the AESTHETICS-spec form: "Mountaineer 3.23 (Dull Edge) · \n · \l" Version literal will need a bump when Alpine base moves; left as-is until the version-pump discipline is settled. - common/etc/profile.d/sysop-motd.sh: shim that invokes `sysop motd print` on login. Silent no-op if `sysop` is missing or motd is disabled in /etc/mountaineer/sysop.toml. - sysadmin/ overlay tree introduced (referenced by the commented-out sysadmin profile in manifest.toml): root/.config/yambar/config.yml — bar config with svc/zfs/net/audio/ battery/clock segments, flatwhite palette, Iosevka 14px. usr/local/libexec/yambar/{svc,zfs,net}.sh — poller scripts feeding yambar via `sysop <subcmd> --summary`. The sysadmin tree is staged for when manifest.toml's sysadmin profile is uncommented; the server build is untouched apart from /etc/issue and the motd shim.
Author: Max J. <87768334+MaxJMath@users.noreply.github.com> · 2026-05-19 21:15 UTC
Commit: 96288b3f837abf80e6d9733dc964a5a929976c8b
Parent: 533af26
6 files changed, +168 insertions, -1 deletion
@@ -1,2 +1,2 @@
1 - Mountaineer \r \l
1 + Mountaineer 3.23 (Dull Edge) · \n · \l
2 2
@@ -0,0 +1,8 @@
1 + # Mountaineer login tip rotation.
2 + # Operator opt-out: sysop motd off
3 + # Reads /etc/mountaineer/sysop.toml; prints nothing if motd.enabled = false
4 + # or if `sysop` is unavailable.
5 +
6 + if command -v sysop >/dev/null 2>&1; then
7 + sysop motd print 2>/dev/null || true
8 + fi
@@ -0,0 +1,91 @@
1 + # Mountaineer yambar — read-only system surface.
2 + #
3 + # Doctrine (AESTHETICS.md):
4 + # - Bar shows facts; it does not interact.
5 + # - Every non-ok segment routes the operator into a `sysop` invocation.
6 + # - Hue is reserved for non-ok state (red fault, yellow transient).
7 + # The resting bar is foreground-on-background.
8 + #
9 + # Segments below match AESTHETICS.md §yambar segments.
10 +
11 + bar:
12 + location: top
13 + height: 26
14 + background: f7f3eeff
15 + foreground: 605a52ff
16 + font: Iosevka:pixelsize=14
17 + spacing: 3
18 + margin: 6
19 + border:
20 + width: 0
21 +
22 + left:
23 + - river:
24 + content:
25 + map:
26 + conditions:
27 + state == focused:
28 + string: {text: "{id}", font: "Iosevka:pixelsize=14:weight=bold"}
29 + state == visible: {string: {text: "{id}"}}
30 + state == unfocused: {string: {text: "{id}", foreground: 8c867eff}}
31 + state == invisible: {empty: {}}
32 + state == urgent: {string: {text: "{id}", foreground: c46a6aff}}
33 +
34 + center: []
35 +
36 + right:
37 + # --- Mountaineer-specific: service and storage health ---
38 + - script:
39 + path: /usr/local/libexec/yambar/svc.sh
40 + args: []
41 + content:
42 + map:
43 + conditions:
44 + state == ok: {string: {text: "svc ok", foreground: 605a52ff}}
45 + state == down: {string: {text: "svc {count} down", foreground: c46a6aff}}
46 +
47 + - script:
48 + path: /usr/local/libexec/yambar/zfs.sh
49 + args: []
50 + content:
51 + map:
52 + conditions:
53 + state == ok: {string: {text: "zfs ok", foreground: 605a52ff}}
54 + state == degraded: {string: {text: "zfs degraded", foreground: c46a6aff}}
55 +
56 + # --- network ---
57 + - script:
58 + path: /usr/local/libexec/yambar/net.sh
59 + args: []
60 + content:
61 + map:
62 + conditions:
63 + state == down: {string: {text: "net ↓", foreground: c46a6aff}}
64 + state == up: {string: {text: "{label}"}}
65 +
66 + # --- audio (pipewire) ---
67 + - pipewire:
68 + content:
69 + map:
70 + conditions:
71 + type == sink && muted: {string: {text: "vol mute", foreground: 8c867eff}}
72 + type == sink: {string: {text: "vol {linear_volume}"}}
73 +
74 + # --- battery (laptop only; hidden when AC + 100%) ---
75 + - battery:
76 + name: BAT0
77 + poll-interval: 30000
78 + content:
79 + map:
80 + conditions:
81 + state == charging: {string: {text: "bat {capacity}↑", foreground: a78a5eff}}
82 + state == discharging && capacity <= 20: {string: {text: "bat {capacity}", foreground: c46a6aff}}
83 + state == discharging: {string: {text: "bat {capacity}"}}
84 + state == full: {empty: {}}
85 +
86 + # --- clock ---
87 + - clock:
88 + date-format: "%a %d %b"
89 + time-format: "%H:%M"
90 + content:
91 + - string: {text: "{date} {time}"}
@@ -0,0 +1,21 @@
1 + #!/bin/sh
2 + # yambar `net` segment feed: default-route interface from sysop.
3 + #
4 + # Emits one yambar record on each poll:
5 + # state|string|down (no routable interface)
6 + # state|string|up,label|string|<…> (wired ↑ / wlan + ssid)
7 +
8 + set -eu
9 +
10 + while :; do
11 + summary="$(sysop net --summary 2>/dev/null || echo 'net ↓')"
12 + case "$summary" in
13 + 'net ↓')
14 + printf 'state|string|down\n\n'
15 + ;;
16 + *)
17 + printf 'state|string|up\nlabel|string|%s\n\n' "$summary"
18 + ;;
19 + esac
20 + sleep 5
21 + done
@@ -0,0 +1,28 @@
1 + #!/bin/sh
2 + # yambar `svc` segment feed: services health summary from sysop.
3 + #
4 + # Emits one yambar record per second:
5 + # state|string|ok (all up)
6 + # state|string|down (some down)
7 + # count|string|<N> (count of down services, only on `down`)
8 + #
9 + # Routes operator into `sysop services` when state != ok.
10 +
11 + set -eu
12 +
13 + while :; do
14 + summary="$(sysop services --summary 2>/dev/null || echo 'down')"
15 + case "$summary" in
16 + ok)
17 + printf 'state|string|ok\n\n'
18 + ;;
19 + *' down')
20 + count="${summary% down}"
21 + printf 'state|string|down\ncount|string|%s\n\n' "$count"
22 + ;;
23 + *)
24 + printf 'state|string|down\ncount|string|?\n\n'
25 + ;;
26 + esac
27 + sleep 5
28 + done
@@ -0,0 +1,19 @@
1 + #!/bin/sh
2 + # yambar `zfs` segment feed: ZFS pool health summary from sysop.
3 + #
4 + # Emits one yambar record on each poll:
5 + # state|string|ok (all pools ONLINE)
6 + # state|string|degraded (any pool non-ONLINE)
7 + #
8 + # Routes operator into `sysop storage` when state != ok.
9 +
10 + set -eu
11 +
12 + while :; do
13 + summary="$(sysop storage --summary 2>/dev/null || echo 'degraded')"
14 + case "$summary" in
15 + ok) printf 'state|string|ok\n\n' ;;
16 + *) printf 'state|string|degraded\n\n' ;;
17 + esac
18 + sleep 10
19 + done