From 6b059721a5b45f68952fa17da6e907ed1757c7d7 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Fri, 24 Apr 2026 02:38:36 +0530 Subject: relying on path variable for accessing the binaries in the script rather than passing them as env variables --- modules/scripts/system-monitor.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'modules/scripts/system-monitor.sh') diff --git a/modules/scripts/system-monitor.sh b/modules/scripts/system-monitor.sh index 4fd59ac..cadae3a 100644 --- a/modules/scripts/system-monitor.sh +++ b/modules/scripts/system-monitor.sh @@ -4,26 +4,26 @@ # - Right pane: nvtop (GPU monitor) SESSION="system-monitor" -"$KITTY" @ set-font-size -- -4 +kitty @ set-font-size -- -4 cleanup() { - "$KITTY" @ set-font-size -- +4 + kitty @ set-font-size -- +4 } trap cleanup EXIT INT TERM # Kill any existing session -"$TMUX" kill-session -t "$SESSION" 2>/dev/null +tmux kill-session -t "$SESSION" 2>/dev/null -# Start new "$TMUX" session with $BTM wrapped to kill session on exit -"$TMUX" new-session -d -s "$SESSION" -c "$HOME" "bash -c '\"$BTM\"; \"$TMUX\" kill-session -t $SESSION'" +# Start new tmux session with btm wrapped to kill session on exit +tmux new-session -d -s "$SESSION" -c "$HOME" "bash -c 'btm; tmux kill-session -t $SESSION'" -# Split horizontally: right pane runs $NVTOP wrapped similarly -"$TMUX" split-window -h -t "$SESSION:0" -c "$HOME" "bash -c '\"$NVTOP\"; \"$TMUX\" kill-session -t $SESSION'" +# Split horizontally: right pane runs nvtop wrapped similarly +tmux split-window -h -t "$SESSION:0" -c "$HOME" "bash -c 'nvtop; tmux kill-session -t $SESSION'" -"$TMUX" set -g status off -"$TMUX" set -g mouse on -"$TMUX" set -g focus-events on +tmux set -g status off +tmux set -g mouse on +tmux set -g focus-events on # Select main pane and attach -"$TMUX" select-pane -t "$SESSION:0.0" -"$TMUX" attach-session -t "$SESSION" +tmux select-pane -t "$SESSION:0.0" +tmux attach-session -t "$SESSION" -- cgit v1.2.3