Skip to content

Commit

Permalink
Merge pull request #126 from yuki-was-taken/macos-fix
Browse files Browse the repository at this point in the history
Hopefully adding working MacOS support.
  • Loading branch information
iinsertNameHere authored Jul 16, 2024
2 parents 6475c7d + 9ec9821 commit 9dbf3bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ desktop = {icon = " ", name = "desktop", color = "(CN)"}
# packages = {icon = " ", name = "packages", color = "(RD)"} # WARNING: Resource Intensive
# gpu = {icon = "󱔐 ", name = "gpu", color = "(MA)"} # WARNING: Resource Intensive
# cpu = {icon = " ", name = "cpu", color = "(RD)"}
disk_0 = {icon = "", name = "disk", color = "(GN)"}
# disk_0 = {icon = " ", name = "disk", color = "(GN)"}
memory = {icon = "", name = "memory", color = "(YW)"}
# battery = {icon = " ", name = "battery", color = "(GN)"}
# weather = {icon = " ", name = "weather", color = "(BE)"} # Requires curl and an emoji font. | WARNING: Resource Intensive
Expand Down
5 changes: 4 additions & 1 deletion src/catnaplib/platform/probe.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ import "../terminal/logging"
import algorithm

proc getDistro*(): string =
when defined(linux):
# Returns the name of the running linux distro
result = "/etc/os-release".loadConfig.getSectionValue("", "PRETTY_NAME") & " " & uname().machine
result = "/etc/os-release".loadConfig.getSectionValue("", "PRETTY_NAME") & " " & uname().machine
elif defined(macos):
result = "MacOS X" & " " & uname().machine

proc getDistroId*(): DistroId =
# Returns the DistroId of the running linux distro
Expand Down

0 comments on commit 9dbf3bc

Please sign in to comment.