1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# 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.
#
# After tmux restarts, `↺N` (blue) offers to restore N saved sessions:
# clicking it runs `dingger restore`; a notification summarizes, the full
# report is in ~/.local/state/dingger/restore.log.
#
# Source this from your tmux config: source-file /path/to/dingger.tmux
set -g status-right '#{?@dingger_restore,#[range=user|restore]#[fg=#89b4fa#,bold]↺#{@dingger_restore}#[norange default] ,}%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 if -F '#{==:#{mouse_status_range},restore}' \
'run-shell -b "$HOME/.local/bin/dingger restore --report"' \
"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"'
# When a terminal window gains focus, dingger learns which window holds this
# client, so a jump raises exactly that window, tab, and split. Needs the
# terminal's focus reports. (#{hook_client}: in a hook, #{client_name} may be
# another client.)
set -g focus-events on
set-hook -g 'client-focus-in[77]' "run-shell -b \"$HOME/.local/bin/dingger terminal focused --client '#{hook_client}'\""
|