3 +Goal: rebuild the bar incrementally, one widget/behavior at a time, with Nugu colors, consistent clicks, and verification after each step.
7 +1. Propose exact minimal change.
8 +2. Experiment safely when behavior is unknown.
9 +3. Apply focused changes.
10 +4. Verify live with config validation, service state, logs, screenshots, and interaction tests.
11 +5. Remove superfluous widgets/CSS/scripts.
13 +Originally: stop after each step for discussion.
14 +Current standing goal: continue autonomously to completion while preserving brutal verification.
16 +Order rule: start with Bluetooth as requested, then proceed roughly easiest → hardest.
22 +- Bluetooth stack installed/running: `bluez`, `bluez-utils`, `bluetooth.service` active.
23 +- `bluetui` installed and preferred as Bluetooth manager.
24 +- Ironbar Bluetooth widget is status-only; builtin popup disabled because GTK switch popup looked bad.
25 +- Bluetooth left/middle click opens `bluetui` through shared Hypr Lua TUI launcher.
26 +- Ironbar icon theme switched to installed `Adwaita`.
27 +- Ironbar `popup_autohide = true` globally.
28 +- WezTerm mux service added under `wezterm/systemd/wezterm-mux-server.service`, enabled and active.
29 +- WezTerm config attaches GUI to Unix mux (`connect unix`) and status shows `MUX` for mux domain.
30 +- Hypr `SUPER+Enter` opens `wezterm connect unix`.
31 +- Hypr TUI app binds:
32 + - `SUPER+E` → `yazi`
33 + - `SUPER+N` → `impala`
34 + - `SUPER+U` → `bluetui`
35 +- TUI launcher activates the newly spawned WezTerm pane/tab.
36 +- XWayland disabled; obsolete XWayland drag workaround removed.
37 +- Mouse accel switched to adaptive; natural scroll enabled.
42 +- Existing visible WezTerm local-domain sessions may need manual migration/closure; no seamless transfer to mux known.
46 +- Installed Ironbar: `0.19.0`.
47 +- `ironbar --print-schema` exposes needed modules:
48 + - `battery`, `bindmode`, `bluetooth`, `brightness`, `clipboard`, `clock`, `custom`, `focused`, `inhibit`, `launcher`, `music`, `notifications`, `script`, `sys_info`, `tray`, `volume`, `workspaces`.
49 +- WiFi stack: `iwd` + systemd-networkd.
50 + - `iwd.service`: active.
51 + - `NetworkManager`: not installed.
52 + - Ironbar `network_manager` module is wrong unless we intentionally switch network stacks.
53 +- Notifications: Mako currently.
54 + - Ironbar `notifications` module requires SwayNC.
55 + - SwayNC would replace/compete with Mako, so defer.
56 +- `hyprshutdown` installed; keybind uses `--dry-run`.
57 +- Music config must use `player_type = "mpris"`, not `playerctl`.
58 +- Builtin Ironbar workspaces dispatch legacy Hypr syntax; custom switcher is used for Lua-dispatcher compatibility.
60 +##
Upstream feature note 62 +From Ironbar compiling wiki/features:
64 +- Default build enables all features.
65 +- Custom builds can disable defaults and enable selected features.
66 +- Must enable at least one config feature.
67 +- If custom-building for this setup:
70 +cli,config+json,workspaces+hyprland,focused,launcher,music+mpris,sys_info,script,custom,tray,volume,battery,bluetooth,brightness,bindmode,inhibit,clipboard,clock,notifications
75 +- `cli` implies `ipc`.
76 +- `network_manager` omitted while using `iwd`.
77 +- `notifications` only useful if switching to SwayNC.
79 +##
Preferences / launch policy 81 +- Work one thing at a time: propose → experiment → change → verify.
82 +- Prefer awesome fast TUIs when they exist (`bluetui`, `impala`, `btm`, `wiremix`, `yazi`, etc.).
83 +- Prefer mux-backed WezTerm tabs for TUI apps over standalone terminal windows.
84 +- Prefer implementation logic in Lua over shell snippets; shell command strings are acceptable only at process boundary.
85 +- Prefer `require(...)` modules over `dofile(...)` in normal config and shared helpers.
86 +- Shared TUI launch logic lives in Hypr Lua: `hypr/scripts/tui_tab.lua`.
87 +- Hypr binds call it via `require("scripts.tui_tab")`; Ironbar actions bridge through `hyprctl eval 'require("scripts.tui_tab").spawn(...)'` so both use the same implementation.
88 +- TUI launcher should spawn into WezTerm mux and activate the new pane/tab.
89 +- Keep app-specific service/config files in app dirs when possible, e.g. WezTerm systemd unit under `wezterm/systemd/`.
90 +- Avoid fighting ugly GTK popups when a better TUI exists; use Ironbar as status/launcher if builtin popup is poor.
92 +##
Package/dependency report 105 +- `wezterm-nightly-bin`
112 +sudo pacman -S pavucontrol swaync networkmanager
117 +- `wiremix` replaces `pavucontrol` for audio.
118 +- Mako stays; SwayNC would replace/compete with it.
119 +- WiFi stack stays `iwd` + systemd-networkd; no NetworkManager.
121 +Optional only if requested later:
124 +sudo pacman -S resources
127 +Avoid unless intentionally switching network stack:
130 +sudo pacman -S networkmanager
133 +##
Verification loop for every step 135 +1. Edit only one widget/behavior.
139 + ironbar --validate-config -c ~/.config/ironbar/config.json -t ~/.config/ironbar/style.css
145 + systemctl --user restart ironbar.service
151 + systemctl --user status ironbar.service --no-pager
152 + journalctl --user -u ironbar.service -n 80 --no-pager
155 +5. Screenshot / visual check.
156 +6. Discuss before next step.
160 +- Left: popup or primary action.
161 +- Right: toggle/mute/secondary action.
162 +- Middle: open full external tool/TUI.
163 +- Scroll: adjust continuous value.
164 +- Tooltip: document behavior.
166 +##
WezTerm mux policy 168 +- WezTerm GUI should attach to Unix mux by default:
169 + - `cfg.unix_domains = { { name = "unix", no_serve_automatically = true } }`
170 + - `cfg.default_gui_startup_args = { "connect", "unix" }`
171 +- Mux server is systemd-managed:
172 + - `wezterm/systemd/wezterm-mux-server.service`
173 +- WezTerm status should make mux visible:
174 + - domain `unix` renders as `MUX`.
175 +- Hypr terminal bind should explicitly use mux:
176 + - `wezterm connect unix`
177 +- TUI app launcher should:
178 + 1. spawn into mux with `wezterm cli --prefer-mux spawn -- ...`
179 + 2. capture pane id in Lua
180 + 3. activate pane with `wezterm cli --prefer-mux activate-pane --pane-id ...`
181 +- Existing non-mux GUI sessions cannot be seamlessly transferred into mux; recreate/close manually.
183 +##
Nugu styling rules 185 +- Generated colors stay in `ironbar/nugu.css`.
186 +- Layout/behavior stay in `ironbar/config.json` + `ironbar/style.css`.
188 + - normal fg: `--fg`
189 + - muted/empty: `--muted` / `--unfocus`
190 + - active bg: `--focus`, fg `--on-focus`
191 + - hover/accent bg: `--accent`, fg `--on-focus`
194 +##
Ordered implementation steps 196 +###
Step 1 — Bluetooth — done 198 +Why first: explicit request.
202 +- `bluez` + `bluez-utils` installed by user; `bluetooth.service` active.
203 +- `bluetui` installed and preferred.
204 +- Ironbar builtin `bluetooth` module used only for bar status.
205 +- Builtin Bluetooth popup disabled; GTK switch popup looked bad even after CSS work.
206 +- Left/middle click opens `bluetui` through shared Hypr Lua TUI launcher:
207 + - `hyprctl eval 'require("scripts.tui_tab").spawn("bluetui")'`
208 +- Bar label uses fixed semantic Bluetooth battery icon, not dynamic percentage icon:
209 + - ` {device_battery_percent}%`
210 +- `icon_theme` switched from missing `Papirus` to installed `Adwaita`; broken device image fixed.
214 +- Ironbar config validates.
215 +- Ironbar restarts and stays active.
216 +- Popup autohide works globally.
217 +- Bluetooth status visible; clicks open `bluetui`.
219 +Follow-up if wanted:
221 +- Tune bar label length/format.
222 +- Add notification if Bluetooth disconnected/low battery.
224 +###
Step 2 — baseline validation + obvious fixes 226 +Difficulty: very easy.
230 +- Fix music `player_type`: `playerctl` → `mpris`.
231 +- Add `name`/`class` only where needed for CSS targeting.
237 +- Ironbar starts cleanly.
241 +Difficulty: very easy.
246 +- Improve popover padding/colors if needed.
250 +- Existing tray icons render.
251 +- Menus/popovers readable.
253 +###
Step 4 — clock/calendar colors 259 +- Fix hard-to-read calendar popup.
264 +- Explicit GTK calendar selectors:
265 + - `.popup-clock calendar`
266 + - `.popup-clock calendar header`
267 + - `.popup-clock calendar grid label.day-name`
268 + - `.popup-clock calendar grid label.day-number`
269 + - `.popup-clock calendar grid label.other-month`
270 + - `.popup-clock calendar grid label.today`
271 + - `.popup-clock calendar grid label:selected`
275 +- Popup readable in dark + light.
276 +- Today/current/other-month/day-name colors use Nugu vars.
278 +###
Step 5 — clipboard 284 +- Keep clipboard widget and make behavior explicit.
289 +- Middle: optional external launcher later.
290 +- Right: do **not** clear history unless confirmed.
295 +- Selection/paste still works.
297 +###
Step 6 — volume — done 301 +- Make volume behavior consistent.
305 +- Builtin `volume` module.
306 +- Scroll adjusts PipeWire output volume.
307 +- Right click mutes output.
308 +- Middle click opens `wiremix` through shared Hypr Lua TUI launcher.
309 +- Sources hidden on bar to reduce clutter.
313 +- `pipewire-pulse.socket` active.
314 +- Ironbar logs show volume client connected, no `PAErr(-1)`.
315 +- `wiremix` spawned into WezTerm mux tab and activated.
317 +###
Step 7 — battery — done 323 +- Add/keep robust battery widget.
327 +- Builtin `battery` module.
328 +- Show icon + percent.
329 +- Style low/critical/charging states using Nugu semantic colors.
333 +- Hidden on machines without `BAT*` via `show_if`.
334 +- Shows X230 battery percentage.
336 +- Warning/critical states styled with Nugu semantic colors.
338 +###
Step 8 — brightness — done 340 +Difficulty: easy-medium.
344 +- Add brightness widget.
348 +- Builtin `brightness` module.
349 +- Use `systemd`/`backlight` backend.
353 +- Builtin brightness module with `systemd`/`intel_backlight` backend.
354 +- Scroll adjusts brightness through Ironbar backend.
355 +- Rejected custom `brightnessctl` script experiment because direct set failed without permission.
359 +- Detects `intel_backlight`.
360 +- Brightness visible/readable in screenshots.
361 +- No config/service errors.
363 +###
Step 9 — bindmode 365 +Difficulty: easy-medium.
369 +- Show Hyprland submap/bindmode only when active.
373 +- Builtin `bindmode` module.
377 +- Hidden during normal use.
378 +- Appears/disappears correctly if a Hypr submap is active.
380 +###
Step 10 — inhibit — done 386 +- Add sleep/lock inhibition toggle.
390 +- Builtin `inhibit` module.
394 +- Left: toggle selected duration.
395 +- Right: cycle duration.
396 +- Format off/on clearly.
400 +- Toggle visible/readable.
401 +- Duration visible in screenshot.
402 +- No Ironbar errors.
404 +###
Step 11 — cute cat widget — skipped/removed 408 +- Cute but superfluous under the current goal.
409 +- Removed after screenshot showed the right/center area was already dense.
413 +- Bar validates/restarts without it.
414 +- Center media has more room.
416 +###
Step 12 — media/player controls — done 422 +- Make media useful and compact.
426 +- Builtin `music` module with MPRIS.
427 +- Format: status icon + truncated title/artist.
428 +- Popup: album art + controls.
432 +- Builtin `music` module with MPRIS.
433 +- Compact title/artist format with truncation.
434 +- No extra scroll action; avoid accidental media changes.
438 +- Firefox/MPRIS player detected.
439 +- Title visible and compact at 1366px.
440 +- Popup styled by Nugu CSS.
442 +###
Step 13 — system monitors 448 +- Add compact system monitor row.
452 +- Builtin `sys_info` module.
459 +- Disk root percent.
464 +- Compact CPU label via builtin `sys_info`.
465 +- Left/middle opens `btm` through shared Hypr Lua TUI launcher.
470 +sudo pacman -S bottom
476 +sudo pacman -S resources
481 +- Values update at sane intervals.
482 +- Compact enough for 1366px.
483 +- No excessive CPU wakeups.
485 +###
Step 14 — power menu 487 +Difficulty: medium-hard.
491 +- Polish power menu using installed `hyprshutdown`.
495 +- `custom` module popup.
500 +- suspend: `loginctl lock-session && systemctl suspend`
501 +- logout: `hyprshutdown`
502 +- reboot: `hyprshutdown --post-cmd "systemctl reboot"`
503 +- poweroff: `hyprshutdown --post-cmd "systemctl poweroff"`
508 +- Lock/suspend/logout work.
509 +- Do not test reboot/poweroff without explicit confirmation.
511 +###
Step 15 — notifications — done 516 +- Do not install SwayNC; it would replace/compete with Mako.
517 +- Ironbar builtin `notifications` module remains unused.
521 +- Custom Mako indicator script:
523 + - active notifications: ` N`
524 +- Left click: `makoctl restore`.
525 +- Right click: `makoctl dismiss --all`.
529 +- Mako service active.
530 +- Count visible/readable in screenshots.
531 +- Dismissing all notifications via Mako works.
532 +- No SwayNC dependency.
534 +###
Step 16 — WiFi / network — done 538 +- Keep `iwd` + systemd-networkd.
539 +- Do not install/use NetworkManager.
543 +- Custom script module reads `iwctl station wlan0 show`.
544 +- Connected state is icon-only to reduce clutter.
545 +- Disconnected state shows ` off`.
546 +- Left/middle click opens `impala` through shared Hypr Lua TUI launcher.
550 +- `iwd.service` active.
551 +- `networkctl status wlan0` routable/online.
552 +- WiFi icon visible/readable.
553 +- No NetworkManager dependency.
555 +###
Step 17 — workspaces — done 559 +- Show fixed workspace favorites.
567 +- Empty favorites remain visible.
568 +- Active/occupied/empty states readable.
569 +- Click focuses correct workspace.
573 +- Builtin Ironbar `workspaces` sends legacy `hyprctl dispatch workspace N`.
574 +- Hyprland Lua dispatcher rejects that syntax:
575 + - `error: [string "return hl.dispatch(workspace 1)"]:1: ')' expected near '1'`
579 +- Migrated Hypr workspace rules/binds/window rules to numeric IDs.
580 +- Replaced builtin Ironbar workspaces with a custom workspace switcher.
581 +- Each button uses Lua dispatcher syntax:
582 + - `hyprctl eval 'hl.dispatch(hl.dsp.focus({ workspace = "N" }))'`
583 +- Added `ironbar/scripts/workspace-label.lua` for active/occupied/empty Nugu-colored labels.
584 +- Workspace label script caches Hypr state in `$XDG_RUNTIME_DIR/ironbar-workspaces.cache` to avoid repeated `hyprctl` calls from six labels.
585 +- Removed unused builtin `.workspaces` CSS.
586 +- Removed launcher underline styling after screenshot showed it clashed with the active workspace/focused launcher pills.
587 +- Increased system-module spacing slightly; verified clock/power still fit on 1366px.
588 +- Removed unused `.notifications` CSS and normalized `.sysinfo` spacing.
589 +- Removed normal `scratch` workspace from the bar; special scratch remains on `SUPER+S`.
593 +- Hypr reload ok; no config errors.
594 +- Existing named `web`/`term` windows moved to numeric `1`/`3`.
595 +- All six icons visible; no tofu/question mark glyphs.
596 +- Empty workspace active-state update verified after 2s poll interval.
597 +- Ironbar CPU checked after cache optimization: ~2.4% averaged shortly after restart on X230.
598 +- Clicks verified via `wdotool`:
599 + - workspace `1` focuses `id=1`
600 + - empty workspace `2` focuses `id=2`
601 + - workspace `3` focuses `id=3`
602 +- Ironbar logs contain no workspace dispatch errors after custom switcher.
604 +##
Suggested final bar layout 623 +4. Bluetooth battery/status
635 +- Media scroll: next/prev, volume, or none? Current: no scroll action.
636 +- Optional later: richer Mako popup/history UI. Current: compact count + restore/dismiss actions.