Skip to content

Commit 7531489

Browse files
committed
Rebrand to mactop
1 parent 088c9d8 commit 7531489

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/logs
22

3-
goasitop
3+
mactop
44
dist/
55
.DS_Store

.goreleaser.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ changelog:
3535

3636
brews:
3737
- name: "{{ .ProjectName }}"
38-
homepage: "https://github.com/context-labs/goasitop"
38+
homepage: "https://github.com/context-labs/mactop"
3939
description: "Apple Silicon Monitor Top written in Go Lang"
40-
url_template: "https://github.com/context-labs/goasitop/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
41-
caveats: "goasitop requires macOS 12+, and runs only on Apple Silicon."
40+
url_template: "https://github.com/context-labs/mactop/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
41+
caveats: "mactop requires macOS 12+, and runs only on Apple Silicon."
4242
install: |
4343
bin.install "{{ .ProjectName }}"
4444
repository:
4545
owner: "context-labs"
46-
name: "goasitop"
46+
name: "mactop"

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# goasitop
1+
# mactop
22

3-
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/context-labs/goasitop/total) ![GitHub Release](https://img.shields.io/github/v/release/context-labs/goasitop)
3+
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/context-labs/mactop/total) ![GitHub Release](https://img.shields.io/github/v/release/context-labs/mactop)
44

5-
`goasitop` is a terminal-based monitoring tool "top" designed to display real-time metrics for Apple Silicon chips. It provides a simple and efficient way to monitor CPU and GPU usage, E-Cores and P-Cores, power consumption, and other system metrics directly from your terminal!
5+
`mactop` is a terminal-based monitoring tool "top" designed to display real-time metrics for Apple Silicon chips. It provides a simple and efficient way to monitor CPU and GPU usage, E-Cores and P-Cores, power consumption, and other system metrics directly from your terminal!
66

7-
![goasitop](screenshot2.png)
7+
![mactop](screenshot2.png)
88

99
## Compatibility
1010

@@ -25,30 +25,30 @@
2525

2626
## Install via Homebrew
2727

28-
Help get us on the official Homebrew formulas by giving us a star! [goasitop](https://github.com/context-labs/goasitop)
28+
Help get us on the official Homebrew formulas by giving us a star! [mactop](https://github.com/context-labs/mactop)
2929

3030
```bash
31-
brew tap context-labs/goasitop https://github.com/context-labs/goasitop
31+
brew tap context-labs/mactop https://github.com/context-labs/mactop
3232
```
3333

3434
```bash
35-
brew install goasitop
35+
brew install mactop
3636
```
3737

3838
```bash
39-
sudo goasitop
39+
sudo mactop
4040
```
4141

4242
## Installation
4343

44-
To install `goasitop`, follow these steps:
44+
To install `mactop`, follow these steps:
4545

4646
1. Ensure you have Go installed on your machine. If not, you can install it by following the instructions here: [Go Installation Guide](https://go.dev/doc/install).
4747

4848
2. Clone the repository:
4949
```bash
50-
git clone https://github.com/context-labs/goasitop.git
51-
cd goasitop
50+
git clone https://github.com/context-labs/mactop.git
51+
cd mactop
5252
```
5353

5454
3. Build the application:
@@ -58,17 +58,17 @@ To install `goasitop`, follow these steps:
5858

5959
4. Run the application:
6060
```bash
61-
sudo ./goasitop
61+
sudo ./mactop
6262
```
6363

6464
## Usage
6565

66-
After installation, you can start `goasitop` by simply running:
66+
After installation, you can start `mactop` by simply running:
6767
```bash
68-
sudo ./goasitop
68+
sudo ./mactop
6969
```
7070

71-
`sudo` is required to run `goasitop`
71+
`sudo` is required to run `mactop`
7272

7373
Use the following keys to interact with the application:
7474
- `q`: Quit the application.
@@ -79,13 +79,13 @@ Use the following keys to interact with the application:
7979

8080
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
8181

82-
1. Fork goasitop
82+
1. Fork mactop
8383
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
8484
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
8585
4. Push to the Branch (`git push origin feature/AmazingFeature`)
8686
5. Open a Pull Request
8787

88-
## What does goasitop use to get real-time data?
88+
## What does mactop use to get real-time data?
8989

9090
- `sysctl`: For CPU model information
9191
- `system_profiler`: For GPU Core Count
@@ -100,7 +100,7 @@ Distributed under the MIT License. See `LICENSE` for more information.
100100

101101
Carsen Klock - [@carsenklock](https://twitter.com/carsenklock)
102102

103-
Project Link: [https://github.com/context-labs/goasitop](https://github.com/context-labs/goasitop)
103+
Project Link: [https://github.com/context-labs/mactop](https://github.com/context-labs/mactop)
104104

105105
## Acknowledgements
106106

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/context-labs/goasitop/v2
1+
module github.com/context-labs/mactop/v2
22

33
go 1.20
44

goasitop.rb renamed to mactop.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
# frozen_string_literal: true
33

44
# This file was generated by GoReleaser. DO NOT EDIT.
5-
class Goasitop < Formula
5+
class Mactop < Formula
66
desc "Apple Silicon Monitor Top written in Go Lang"
7-
homepage "https://github.com/context-labs/goasitop"
7+
homepage "https://github.com/context-labs/mactop"
88
version "0.1.2"
99
depends_on :macos
1010

1111
if Hardware::CPU.arm?
12-
url "https://github.com/context-labs/goasitop/releases/download/v0.1.2/goasitop_0.1.2_darwin_arm64.tar.gz"
12+
url "https://github.com/context-labs/mactop/releases/download/v0.1.2/mactop_0.1.2_darwin_arm64.tar.gz"
1313
sha256 "4e3f2da4c7a20cf84abe618f105e8c8abbaa1279ec3924b4f55a0bd7d874ee0b"
1414

1515
def install
16-
bin.install "goasitop"
16+
bin.install "mactop"
1717
end
1818
end
1919

2020
def caveats
2121
<<~EOS
22-
goasitop requires macOS 12+, and runs only on Apple Silicon.
22+
mactop requires macOS 12+, and runs only on Apple Silicon.
2323
EOS
2424
end
2525
end

main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2024 Carsen Klock under MIT License
2-
// goasitop is a simple terminal based Apple Silicon power monitor written in Go Lang!
2+
// mactop is a simple terminal based Apple Silicon power monitor written in Go Lang!
33

44
package main
55

@@ -245,14 +245,14 @@ func StderrToLogfile(logfile *os.File) {
245245
syscall.Dup2(int(logfile.Fd()), 2)
246246
}
247247

248-
// goasitop main function
248+
// mactop main function
249249

250250
func main() {
251251

252252
// get version from git
253253
version := "v0.1.2"
254254
if len(os.Args) > 1 && os.Args[1] == "--version" {
255-
fmt.Println("goasitop version:", version)
255+
fmt.Println("mactop version:", version)
256256
os.Exit(0)
257257
}
258258

@@ -263,8 +263,8 @@ func main() {
263263
}
264264

265265
if os.Geteuid() != 0 {
266-
fmt.Println("Welcome to goasitop! Please try again and run goasitop with sudo privileges!")
267-
fmt.Println("Usage: sudo goasitop")
266+
fmt.Println("Welcome to mactop! Please try again and run mactop with sudo privileges!")
267+
fmt.Println("Usage: sudo mactop")
268268
os.Exit(1)
269269
}
270270

@@ -368,7 +368,7 @@ func setupLogfile() (*os.File, error) {
368368
return nil, fmt.Errorf("failed to make the log directory: %v", err)
369369
}
370370
// open the log file
371-
logfile, err := os.OpenFile("logs/goasitop.log", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0660)
371+
logfile, err := os.OpenFile("logs/mactop.log", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0660)
372372
if err != nil {
373373
return nil, fmt.Errorf("failed to open log file: %v", err)
374374
}
@@ -515,7 +515,7 @@ func parseProcessMetrics(powermetricsOutput string, processMetrics []ProcessMetr
515515
matches := dataRegex.FindStringSubmatch(line)
516516
if len(matches) > 3 {
517517
processName := matches[1]
518-
if processName == "goasitop" || processName == "main" || processName == "powermetrics" {
518+
if processName == "mactop" || processName == "main" || processName == "powermetrics" {
519519
continue // Skip this process
520520
}
521521
id, _ := strconv.Atoi(matches[2])

0 commit comments

Comments
 (0)