id: NL-SPEC-0B9CBD34
type: spec
title: Nuguland bar orientation
Nuguland bar orientation
Behavior
The bar has one global orientation: horizontal or vertical.
Without a valid saved preference, the default is horizontal.
Config owns the single orientation preference; its appearance choice and public orientation/toggle interface use the same setter.
Only explicit valid selection/toggle persists a nonsecret config.json object containing orientation; unknown input causes no mutation, write or remap.
Latest explicit selection wins when persistence is already active.
Missing startup state defaults quietly; malformed/unreadable state defaults with inline feedback.
Valid external updates apply without writeback; invalid updates retain last-good session orientation with feedback.
Failed persistence retains session intent, reports it unsaved, and permits same-selection retry.
Shell observes Config and owns surface remapping and geometry only.
The orientation interface accepts either orientation or toggle and returns the resulting orientation.
Unknown input is a no-op returning the current orientation.
Changes apply live and remain consistent across bar and popup geometry.
Layout
Concern
Horizontal
Vertical
Edge
top
left
Span
full width
full height
Thickness
fixed bar height
widest visible compact content
Flow
left to right
top to bottom
Clock
inline hour and minute
stacked hour, rule, minute
Popups
below the bar
right of the bar
The clock remains the middle zone and never overlaps another bar zone.
Vertical workspace pills remain compact and use the workspace-label abbreviation rule; vertical feature chips use entry glyphs, not abbreviations.
OSD and toast placement remains independently top-right.
Orientation transitions are immediate.
Workspace abbreviation contract
Drop a, e, i, o, and u, then take the first three characters.
If fewer than three characters remain, take the first three characters of the original label.
Input
Output
notify
ntf
code
cod
media
med
system
sys
audio
aud
power
pwr
Popup constraints
Bar thickness is the only orientation-dependent offset shared with popup geometry.
Vertical popups use the free area to the right, move rightward, and clamp on the y-axis.
Horizontal popups use the free area below, move downward, and clamp on the x-axis.
The outside-dismiss region excludes the bar in both orientations.
Acceptance
Horizontal chips share a y-axis and vertical chips share an x-axis in increasing order.
Vertical thickness follows content rather than a fixed width.
human.test.js passes every required abbreviation case.
Registered clock geometry does not overlap another bar zone.
Popup state reports the correct origin, constrained axis, and transition direction.
Outside dismissal does not intercept bar clicks.
Returning to horizontal preserves existing behavior.
The compositor keybind toggles orientation.
Isolated proofs cover Config pointer selection through real Bar geometry, atomic persistence, restart, invalid input, queued selection distinct from the active write, external updates and failed-write feedback.
A human confirms labels, clock, and separator remain legible.
---
id: NL-SPEC-0B9CBD34
type: spec
title: Nuguland bar orientation
---
# Nuguland bar orientation
## Behavior
- The bar has one global orientation: `horizontal` or `vertical`.
- Without a valid saved preference, the default is `horizontal`.
- Config owns the single orientation preference; its appearance choice and public orientation/toggle interface use the same setter.
- Only explicit valid selection/toggle persists a nonsecret `config.json` object containing orientation; unknown input causes no mutation, write or remap.
- Latest explicit selection wins when persistence is already active.
- Missing startup state defaults quietly; malformed/unreadable state defaults with inline feedback.
- Valid external updates apply without writeback; invalid updates retain last-good session orientation with feedback.
- Failed persistence retains session intent, reports it unsaved, and permits same-selection retry.
- Shell observes Config and owns surface remapping and geometry only.
- The orientation interface accepts either orientation or `toggle` and returns the resulting orientation.
- Unknown input is a no-op returning the current orientation.
- Changes apply live and remain consistent across bar and popup geometry.
## Layout
| Concern | Horizontal | Vertical |
| --- | --- | --- |
| Edge | top | left |
| Span | full width | full height |
| Thickness | fixed bar height | widest visible compact content |
| Flow | left to right | top to bottom |
| Clock | inline hour and minute | stacked hour, rule, minute |
| Popups | below the bar | right of the bar |
- The clock remains the middle zone and never overlaps another bar zone.
- Vertical workspace pills remain compact and use the workspace-label abbreviation rule; vertical feature chips use entry glyphs, not abbreviations.
- OSD and toast placement remains independently top-right.
- Orientation transitions are immediate.
## Workspace abbreviation contract
Drop `a`, `e`, `i`, `o`, and `u`, then take the first three characters.
If fewer than three characters remain, take the first three characters of the original label.
| Input | Output |
| --- | --- |
| `notify` | `ntf` |
| `code` | `cod` |
| `media` | `med` |
| `system` | `sys` |
| `audio` | `aud` |
| `power` | `pwr` |
## Popup constraints
- Bar thickness is the only orientation-dependent offset shared with popup geometry.
- Vertical popups use the free area to the right, move rightward, and clamp on the y-axis.
- Horizontal popups use the free area below, move downward, and clamp on the x-axis.
- The outside-dismiss region excludes the bar in both orientations.
## Acceptance
- Horizontal chips share a y-axis and vertical chips share an x-axis in increasing order.
- Vertical thickness follows content rather than a fixed width.
- `human.test.js` passes every required abbreviation case.
- Registered clock geometry does not overlap another bar zone.
- Popup state reports the correct origin, constrained axis, and transition direction.
- Outside dismissal does not intercept bar clicks.
- Returning to horizontal preserves existing behavior.
- The compositor keybind toggles orientation.
- Isolated proofs cover Config pointer selection through real Bar geometry, atomic persistence, restart, invalid input, queued selection distinct from the active write, external updates and failed-write feedback.
- A human confirms labels, clock, and separator remain legible.