Skip to content

Latest commit

 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fetchit

macOS port of nzuum/fetchit. All credit for the original design and implementation goes to nzuum and contributors; this fork adds a macOS backend.

fetchit screenshot

A minimal system info fetcher written in C and configurable in lua

build

git clone https://codeberg.org/nzuum/fetchit && cd fetchit
sudo make install
make install-config

configure it

fetchit will copy the init.lua and logos/logo.txt into your ~/.config/fetchit folder on install

column_padding = 2

art = {
  source = "./logos/logo.txt"
}

function fetch()
  return {
    columns = {
      art.out,
      {
        color.red(user.name .. "@" .. host.name),
        color.red("os:      ") .. string.lower(os.name),
        color.yellow("kernel:  ") .. kernel.sysname .. kernel.release,
        color.green("cpu:     ") .. string.lower(cpu.name),
        color.blue("gpu:     ") .. string.lower(gpu.name),
        color.magenta("ram:     ") .. string.format("%.1fGB/%.1fGB (%.1f%%)", memory.used_gb, memory.total_gb, memory.percent),
      }
  }
}
end

the default config only uses a few of the modules that fetchit exposes to the lua state. for a full list, look below

learn

host

host.name

user

user.name

os

os.name

kernel

kernel.sysname
kernel.release

cpu

cpu.name

gpu

gpu.name

memory

-- it is recommended to format x_gb. i.e: string.format(%.1fgb, memory.total_gb)
memory.total_gb
memory.used_gb
memory.available_gb
memory.percent

disk

-- it is recommended to format x_gb. i.e: string.format(%.1fgb, disk.total_gb)
disk.total_gb
disk.used_gb

vendor

vendor.name
vendor.model

uptime

uptime.pretty -- 12h 6m
uptime.seconds -- 43560

shell

shell.name

terminal

terminal.name

art

art source is to be specified in the config file. the path is relative to the config's location

art = {
    source = "path/to/file"
}

color

color.black()
color.red()
color.green()
color.yellow()
color.blue()
color.magenta()
color.cyan()
color.white()
color.bright_black()
color.bright_red()
color.bright_green()
color.bright_yellow()
color.bright_blue()
color.bright_magenta()
color.bright_cyan()
color.bright_white()
color.bold()
color.reset()

About

macOS port of nzuum/fetchit (Codeberg) — minimal system info fetcher in C, configurable in Lua

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages