diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-29 02:22:48 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-29 03:50:32 +0530 |
| commit | 673e7b8245a67d5627ff41ab1c113c90b4c8c553 (patch) | |
| tree | 6b5679bb5ee56fa5a5b5eb5dc9e522503815ce9d /modules/system/system-monitor | |
| parent | 1cc7caf459c25f8dea24e40e68b89aaf4862eef4 (diff) | |
| download | home-manager-config-673e7b8245a67d5627ff41ab1c113c90b4c8c553.tar.gz home-manager-config-673e7b8245a67d5627ff41ab1c113c90b4c8c553.zip | |
system: removed system-monitor, removed bottom, added btop
Diffstat (limited to 'modules/system/system-monitor')
| -rw-r--r-- | modules/system/system-monitor/assertions.nix | 19 | ||||
| -rw-r--r-- | modules/system/system-monitor/default.nix | 41 | ||||
| -rw-r--r-- | modules/system/system-monitor/system-monitor.sh | 26 |
3 files changed, 0 insertions, 86 deletions
diff --git a/modules/system/system-monitor/assertions.nix b/modules/system/system-monitor/assertions.nix deleted file mode 100644 index 08b9f7c..0000000 --- a/modules/system/system-monitor/assertions.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, ... }: -[ - { - assertion = !config.system.system-monitor.enable || config.system.bottom.enable; - message = "system.system-monitor is enabled but requires `system.bottom.enable`."; - } - { - assertion = !config.system.system-monitor.enable || config.system.nvtop.enable; - message = "system.system-monitor is enabled but requires `system.nvtop.enable`."; - } - { - assertion = !config.system.system-monitor.enable || config.terminal.tmux.enable; - message = "system.system-monitor is enabled but requires `terminal.tmux.enable`."; - } - { - assertion = !config.system.system-monitor.enable || config.terminal.kitty.enable; - message = "system.system-monitor is enabled but requires `terminal.kitty.enable`."; - } -] diff --git a/modules/system/system-monitor/default.nix b/modules/system/system-monitor/default.nix deleted file mode 100644 index e103ed3..0000000 --- a/modules/system/system-monitor/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -# System monitor script using tmux to run bottom and nvtop side-by-side -{ - config, - lib, - pkgs, - ... -}: -let - inherit ((import ../../lib/script.nix { inherit lib pkgs; })) mkScriptModule; - script = mkScriptModule { - scope = [ "system" ]; - name = "system-monitor"; - path = ./system-monitor.sh; - description = "System monitor script using tmux to run bottom and nvtop side-by-side\nOpens a tmux session with:\n - Left pane: bottom (system/process monitor)\n - Right pane: nvtop (GPU monitor)"; - deps = [ - config.system.bottom.package - config.system.nvtop.package - config.terminal.tmux.package - config.terminal.kitty.package - pkgs.bash - ]; - desktop = { - enable = true; - displayName = "System Monitor"; - icon = "bottom-system-monitor"; - }; - inherit config; - }; -in -{ - options = script.options; - config = lib.mkMerge [ - script.config - { - assertions = import ./assertions.nix { inherit config lib; }; - home.file.".local/share/icons/hicolor/scalable/apps/bottom-system-monitor.svg" = { - source = ../../../assets/icons/bottom-system-monitor.svg; - }; - } - ]; -} diff --git a/modules/system/system-monitor/system-monitor.sh b/modules/system/system-monitor/system-monitor.sh deleted file mode 100644 index 7a9e7ea..0000000 --- a/modules/system/system-monitor/system-monitor.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -SESSION="system-monitor" - -kitty @ set-font-size -- -5 - -cleanup() { - kitty @ set-font-size -- +5 -} -trap cleanup EXIT INT TERM - -# Kill any existing session -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'" - -# 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 - -# Select main pane and attach -tmux select-pane -t "$SESSION:0.0" -tmux attach-session -t "$SESSION" |
