termweb-dashboard 0.2.5 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,15 +29,26 @@ Opens a real-time system monitoring dashboard in your terminal with:
29
29
 
30
30
  ## Keyboard Controls
31
31
 
32
+ **Main view:**
33
+ - `c` - CPU details
34
+ - `m` - Memory details
35
+ - `n` - Network details
36
+ - `d` - Disk details
37
+ - `p` - Process list
38
+
32
39
  **Disk view:**
33
- - `Arrow keys` - Navigate folders
34
- - `Enter` - Drill into folder
35
- - `Backspace` - Go up one level
40
+ - `Tab/Shift+Tab` - Select folder in treemap
41
+ - `Enter` - Navigate to path in textbox
42
+ - `Ctrl+Enter` - Drill into selected folder
43
+ - `Ctrl+Backspace` - Go up one directory level
44
+ - `Ctrl+D` - Delete selected folder (with Y/N confirmation)
45
+ - `Escape` - Return to main view
36
46
 
37
47
  **Process view:**
38
48
  - `Arrow keys` - Select process
39
- - `Tab` - Change sort column
40
- - `Ctrl+K` - Kill selected process
49
+ - `Tab/Shift+Tab` - Change sort column
50
+ - `Ctrl+K` - Kill selected process (with Y/N confirmation)
51
+ - Search box filters by name, PID, or port
41
52
 
42
53
  **General:**
43
54
  - `Escape` - Return to main view
package/bin/cli.js CHANGED
@@ -78,6 +78,16 @@ async function main() {
78
78
  if (verbose) console.log('[Kill] Cancel mode');
79
79
  termweb.removeKeyBinding('y');
80
80
  termweb.removeKeyBinding('n');
81
+ } else if (msg.type === 'deleteConfirm') {
82
+ // Add y/n bindings for delete confirmation
83
+ if (verbose) console.log('[Delete] Confirm mode');
84
+ termweb.addKeyBinding('y', 'delete:confirm');
85
+ termweb.addKeyBinding('n', 'delete:cancel');
86
+ } else if (msg.type === 'deleteCancel') {
87
+ // Remove y/n bindings
88
+ if (verbose) console.log('[Delete] Cancel mode');
89
+ termweb.removeKeyBinding('y');
90
+ termweb.removeKeyBinding('n');
81
91
  }
82
92
  } catch (e) {}
83
93
  });
@@ -91,7 +101,7 @@ async function main() {
91
101
 
92
102
  termweb.openAsync(url, {
93
103
  toolbar: false,
94
- allowedHotkeys: ['quit', 'select_all', 'copy', 'cut', 'paste'],
104
+ allowedHotkeys: ['quit', 'copy', 'cut', 'paste'],
95
105
  singleTab: true,
96
106
  keyBindings: mainBindings,
97
107
  verbose