File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change
1
+ github : [metaspartan]
Original file line number Diff line number Diff line change 1
1
// Copyright (c) 2024 Carsen Klock under MIT License
2
- // mactop is a simple terminal based Apple Silicon power monitor written in Go Lang!
3
- // github.com/context-labs/mactop
2
+ // mactop is a simple terminal based Apple Silicon power monitor written in Go Lang! github.com/context-labs/mactop
4
3
package main
5
4
6
5
import (
@@ -415,7 +414,7 @@ func main() {
415
414
select {
416
415
case e := <- uiEvents :
417
416
switch e .ID {
418
- case "q" , "<C-c>" : // "q" or Ctrl+C to quit
417
+ case "q" , "<C-c>" :
419
418
close (done )
420
419
ui .Close ()
421
420
os .Exit (0 )
@@ -425,19 +424,17 @@ func main() {
425
424
grid .SetRect (0 , 0 , payload .Width , payload .Height )
426
425
ui .Render (grid )
427
426
case "r" :
428
- // refresh ui data
429
427
termWidth , termHeight := ui .TerminalDimensions ()
430
428
grid .SetRect (0 , 0 , termWidth , termHeight )
431
429
ui .Clear ()
432
430
ui .Render (grid )
433
431
case "l" :
434
- // Set the new grid's dimensions to match the terminal size
435
432
termWidth , termHeight := ui .TerminalDimensions ()
436
433
grid .SetRect (0 , 0 , termWidth , termHeight )
437
434
ui .Clear ()
438
435
switchGridLayout ()
439
436
ui .Render (grid )
440
- case "h" , "?" : // "h" or "?" to open help menu
437
+ case "h" , "?" :
441
438
termWidth , termHeight := ui .TerminalDimensions ()
442
439
grid .SetRect (0 , 0 , termWidth , termHeight )
443
440
ui .Clear ()
You can’t perform that action at this time.
0 commit comments