diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-04-13 16:38:55 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-04-13 16:38:55 +0530 |
| commit | e87c356c8104c7c016c41fe477d0654056847343 (patch) | |
| tree | d6d8ccd6348ebd7fbff9d34102a6c2ff92263ec4 /modules/scripts/system-monitor.sh | |
| parent | 3292982abcfd60c75a1ef3bb1214d91e4ad144aa (diff) | |
| download | home-manager-config-e87c356c8104c7c016c41fe477d0654056847343.tar.gz home-manager-config-e87c356c8104c7c016c41fe477d0654056847343.zip | |
injecting variables into scripts so that they use the actual path of th binaries of the packages
Diffstat (limited to 'modules/scripts/system-monitor.sh')
| -rw-r--r-- | modules/scripts/system-monitor.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/modules/scripts/system-monitor.sh b/modules/scripts/system-monitor.sh index cadae3a..4fd59ac 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" |
