Add smart activity monitoring to silence noisy programs
Automatically disable activity monitoring for constantly-updating programs: - lazygit: Git TUI with frequent display updates - btop: System monitor with continuous refreshing - htop: Process monitor - watch: Repetitive command execution - tail: Log file following Features: - Auto-detection via tmux hooks (after-new-window, window-pane-changed, pane-exited) - Re-enables monitoring when switching to normal programs - Manual toggle with Ctrl+a A - Eliminates false activity notifications while preserving useful ones 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
701df4d95a
commit
682d89e047
1 changed files with 22 additions and 0 deletions
|
|
@ -97,6 +97,28 @@
|
||||||
setw -g monitor-activity on
|
setw -g monitor-activity on
|
||||||
set -g visual-activity off
|
set -g visual-activity off
|
||||||
|
|
||||||
|
# Smart activity monitoring - disable for noisy programs
|
||||||
|
set-hook -g after-new-window {
|
||||||
|
if -F '#{||:#{||:#{||:#{||:#{==:#{pane_current_command},lazygit},#{==:#{pane_current_command},btop}},#{==:#{pane_current_command},htop}},#{==:#{pane_current_command},watch}},#{==:#{pane_current_command},tail}}' {
|
||||||
|
setw monitor-activity off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set-hook -g window-pane-changed {
|
||||||
|
if -F '#{||:#{||:#{||:#{||:#{==:#{pane_current_command},lazygit},#{==:#{pane_current_command},btop}},#{==:#{pane_current_command},htop}},#{==:#{pane_current_command},watch}},#{==:#{pane_current_command},tail}}' {
|
||||||
|
setw monitor-activity off
|
||||||
|
} {
|
||||||
|
setw monitor-activity on
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set-hook -g pane-exited {
|
||||||
|
setw monitor-activity on
|
||||||
|
}
|
||||||
|
|
||||||
|
# Manual toggle for activity monitoring
|
||||||
|
bind A setw monitor-activity \; display-message "Activity monitoring: #{?monitor-activity,ON,OFF}"
|
||||||
|
|
||||||
# Automatically renumber windows
|
# Automatically renumber windows
|
||||||
set -g renumber-windows on
|
set -g renumber-windows on
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue