Skip to content

Commit 49c48b5

Browse files
committed
Cleanup
1 parent 651993e commit 49c48b5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [metaspartan]

main.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// 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
43
package main
54

65
import (
@@ -415,7 +414,7 @@ func main() {
415414
select {
416415
case e := <-uiEvents:
417416
switch e.ID {
418-
case "q", "<C-c>": // "q" or Ctrl+C to quit
417+
case "q", "<C-c>":
419418
close(done)
420419
ui.Close()
421420
os.Exit(0)
@@ -425,19 +424,17 @@ func main() {
425424
grid.SetRect(0, 0, payload.Width, payload.Height)
426425
ui.Render(grid)
427426
case "r":
428-
// refresh ui data
429427
termWidth, termHeight := ui.TerminalDimensions()
430428
grid.SetRect(0, 0, termWidth, termHeight)
431429
ui.Clear()
432430
ui.Render(grid)
433431
case "l":
434-
// Set the new grid's dimensions to match the terminal size
435432
termWidth, termHeight := ui.TerminalDimensions()
436433
grid.SetRect(0, 0, termWidth, termHeight)
437434
ui.Clear()
438435
switchGridLayout()
439436
ui.Render(grid)
440-
case "h", "?": // "h" or "?" to open help menu
437+
case "h", "?":
441438
termWidth, termHeight := ui.TerminalDimensions()
442439
grid.SetRect(0, 0, termWidth, termHeight)
443440
ui.Clear()

0 commit comments

Comments
 (0)