diff options
| author | Igor Soarez <igor@soarez.org> | 2026-10-20 12:43:07 +0300 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-10-20 12:43:07 +0300 |
| commit | 4af6a4f625b1965b783c9efb857f8ac665adb8eb (patch) | |
| tree | dd2dac9627735fd02b3372a4f569125a702ba57a /packaging | |
| parent | 943fc940d9c387916708cb3fdc912323c92ef6dc (diff) | |
rebuild the status model as herdr's state machine, event-driven and tested
the seen logic was inverted: first observations were marked done and real
completions idle, so the menu showed teal for agents that did nothing and
green for agents that finished, and attending changed nothing visible.
- watcher::advance is herdr's apply_pane_state_change + mark_active_tab_seen
as a pure function, unit-tested against herdr's own cases; attendance is
window-level like herdr's active tab
- hook reports are events applied in order, so a turn shorter than a poll is
still a completion
- event-driven: hook reports, dingger focus, and tmux focus hooks wake the
watcher; notifications are delivered off-thread (the macos call blocked
ticks for 2+ seconds) after the pane options are written
- all per-pane state persists in tmux pane options, so restarts and deploys
lose nothing, including the authoritative hook state
- every click goes through dingger focus: the menu bar shells out to it and
the status-line binding runs it; it picks the right client, skips the
window already shown, and activates the terminal app hosting the client
- the ready queue is ordered like the menu (blocked first, then oldest done)
- menu bar and tmux segment render herdr's symbols in herdr's palette
- tests/e2e.sh: 60 assertions against an isolated tmux server with a real
client, a 30s poll interval, and a slow fake notifier
Diffstat (limited to 'packaging')
| -rw-r--r-- | packaging/launchd/dev.dingger.dingger.plist | 2 | ||||
| -rw-r--r-- | packaging/launchd/dev.dingger.menubar.plist | 28 | ||||
| -rw-r--r-- | packaging/tmux/dingger.tmux | 14 |
3 files changed, 31 insertions, 13 deletions
diff --git a/packaging/launchd/dev.dingger.dingger.plist b/packaging/launchd/dev.dingger.dingger.plist index 212b903..2bb434a 100644 --- a/packaging/launchd/dev.dingger.dingger.plist +++ b/packaging/launchd/dev.dingger.dingger.plist @@ -7,7 +7,7 @@ <key>PATH</key> <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string> <key>RUST_LOG</key> - <string>debug</string> + <string>info</string> </dict> <key>KeepAlive</key> <true/> diff --git a/packaging/launchd/dev.dingger.menubar.plist b/packaging/launchd/dev.dingger.menubar.plist index c0b5b50..5ff8f0a 100644 --- a/packaging/launchd/dev.dingger.menubar.plist +++ b/packaging/launchd/dev.dingger.menubar.plist @@ -2,17 +2,21 @@ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> - <key>Label</key> - <string>dev.dingger.menubar</string> - <key>ProgramArguments</key> - <array> - <string>/Users/sz/Applications/dingger.app/Contents/MacOS/dingger-menu</string> - </array> - <key>RunAtLoad</key> - <true/> - <key>KeepAlive</key> - <true/> - <key>ThrottleInterval</key> - <integer>10</integer> + <key>KeepAlive</key> + <true/> + <key>Label</key> + <string>dev.dingger.menubar</string> + <key>ProgramArguments</key> + <array> + <string>/Users/YOURUSER/Applications/dingger.app/Contents/MacOS/dingger-menu</string> + </array> + <key>RunAtLoad</key> + <true/> + <key>StandardErrorPath</key> + <string>/Users/YOURUSER/Library/Logs/dingger-menubar.log</string> + <key>StandardOutPath</key> + <string>/Users/YOURUSER/Library/Logs/dingger-menubar.log</string> + <key>ThrottleInterval</key> + <integer>10</integer> </dict> </plist> diff --git a/packaging/tmux/dingger.tmux b/packaging/tmux/dingger.tmux new file mode 100644 index 0000000..64c5bff --- /dev/null +++ b/packaging/tmux/dingger.tmux @@ -0,0 +1,14 @@ +# dingger: herdr-style agent summary after the clock, in herdr's colors: +# × blocked (red, bold) ✓ done (teal) ◐ working (yellow) +# Clicking the status line jumps to the top waiting agent, like the top row +# of the menu bar: blocked first, then the longest-done (FIFO), skipping the +# window you are already looking at. +# +# Source this from your tmux config: source-file /path/to/dingger.tmux +set -g status-right '%d-%b %H:%M#{?#{e|>:#{@dingger_blocked},0}, #[fg=#f38ba8#,bold]×#{@dingger_blocked}#[default],}#{?#{e|>:#{@dingger_done},0}, #[fg=#94e2d5]✓#{@dingger_done}#[default],}#{?#{e|>:#{@dingger_working},0}, #[fg=#f9e2af]◐#{@dingger_working}#[default],}' +bind -n MouseDown1StatusRight run-shell "$HOME/.local/bin/dingger focus --client '#{client_name}'" +# Tell dingger the moment you look somewhere else (it marks what you see as +# attended). Index 77 keeps your own hooks and makes reloading idempotent. +set-hook -g 'client-session-changed[77]' 'run-shell -b "$HOME/.local/bin/dingger poke"' +set-hook -g 'session-window-changed[77]' 'run-shell -b "$HOME/.local/bin/dingger poke"' +set-hook -g 'window-pane-changed[77]' 'run-shell -b "$HOME/.local/bin/dingger poke"' |
