diff --git a/modules/tmux.nix b/modules/tmux.nix index 2ba89eb..48aedb6 100644 --- a/modules/tmux.nix +++ b/modules/tmux.nix @@ -97,25 +97,6 @@ setw -g monitor-activity on 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}" diff --git a/scripts/templates/basic.sh b/scripts/templates/basic.sh index b245032..2f6f3eb 100755 --- a/scripts/templates/basic.sh +++ b/scripts/templates/basic.sh @@ -26,6 +26,7 @@ tmux split-window -t $SESSION_NAME:2.2 -v -c "$CODE_PATH" tmux select-pane -t $SESSION_NAME:2.1 tmux new-window -t $SESSION_NAME:3 -n "git" -c "$CODE_PATH" tmux send-keys -t $SESSION_NAME:3 "lazygit" C-m +tmux setw -t $SESSION_NAME:3 monitor-activity off tmux new-window -t $SESSION_NAME:4 -n "shell" -c "$CODE_PATH" tmux select-window -t $SESSION_NAME:1 diff --git a/scripts/templates/research.sh b/scripts/templates/research.sh index c8ed1df..ac2812b 100755 --- a/scripts/templates/research.sh +++ b/scripts/templates/research.sh @@ -31,6 +31,7 @@ tmux split-window -t $SESSION_NAME:2.2 -v -c "$CODE_PATH" tmux select-pane -t $SESSION_NAME:2.1 tmux new-window -t $SESSION_NAME:3 -n "code-git" -c "$CODE_PATH" tmux send-keys -t $SESSION_NAME:3 "lazygit" C-m +tmux setw -t $SESSION_NAME:3 monitor-activity off # Create windows for paper tmux new-window -t $SESSION_NAME:4 -n "paper" -c "$PAPER_PATH" @@ -45,6 +46,7 @@ tmux split-window -t $SESSION_NAME:5.2 -v -c "$PAPER_PATH" tmux select-pane -t $SESSION_NAME:5.1 tmux new-window -t $SESSION_NAME:6 -n "paper-git" -c "$PAPER_PATH" tmux send-keys -t $SESSION_NAME:6 "lazygit" C-m +tmux setw -t $SESSION_NAME:6 monitor-activity off # Create remote server window if server details are provided if [ -n "$SERVER" ] && [ -n "$REMOTE_DIR" ]; then