Skip to content

Toni500github/customfetch

Repository files navigation

Customfetch

A command-line system information tool (or neofetch like program), its focus point is the customizability and perfomance.
customfetch is designed to provide a really customizable way to display your system informations in the way you like or want.

Currently supports Linux distros only, but our current goal is to be cross-platform, which will happen soon (windows support incoming)

Config (with explanation)

Here's an example using the default config

image

The config:

[config]
layout = [
    "${red}$<user.name>${0}@${cyan}$<os.hostname>",
    "───────────────────────────",
    "${red}OS${0}: $<os.name>",
    "${cyan}Uptime${0}: $<os.uptime_hours> hours, $<os.uptime_mins> minutes",
    "${green}Kernel${0}: $<os.kernel_name> $<os.kernel_version>",
    "${yellow}Arch${0}: $<os.arch>",
    "${magenta}CPU${0}: $<cpu.name>",
    "${blue}GPU${0}: $<gpu.name>",
    "${#03ff93}RAM usage${0}: $<ram.used> MB / $<ram.total> MB",
    "",
    "${\e[40m}   ${\e[41m}   ${\e[42m}   ${\e[43m}   ${\e[44m}   ${\e[45m}   ${\e[46m}   ${\e[47m}   ",
    "${\e[100m}   ${\e[101m}   ${\e[102m}   ${\e[103m}   ${\e[104m}   ${\e[105m}   ${\e[106m}   ${\e[107m}   "
]

# Colors can be with: hexcodes (#55ff88) OR bash escape code colors like "\e[1;34m"
# remember to add ${0} where you want to reset color
red = "#ff2000"
green = "#00ff00"
blue = "#00aaff"
cyan = "#00ffff"
yellow = "#ffff00"
magenta = "#ff11cc"

The ascii art file.txt:

${\e[1;31m}                     ./${\e[1;35m}o${\e[1;34m}.
${\e[1;31m}                   ./${\e[1;35m}sssso${\e[1;34m}-
${\e[1;31m}                 `:${\e[1;35m}osssssss+${\e[1;34m}-
${\e[1;31m}               `:+${\e[1;35m}sssssssssso${\e[1;34m}/.
${\e[1;31m}             `-/o${\e[1;35m}ssssssssssssso${\e[1;34m}/.
${\e[1;31m}           `-/+${\e[1;35m}sssssssssssssssso${\e[1;34m}+:`
${\e[1;31m}         `-:/+${\e[1;35m}sssssssssssssssssso${\e[1;34m}+/.
${\e[1;31m}       `.://o${\e[1;35m}sssssssssssssssssssso${\e[1;34m}++-
${\e[1;31m}      .://+${\e[1;35m}ssssssssssssssssssssssso${\e[1;34m}++:
${\e[1;31m}    .:///o${\e[1;35m}ssssssssssssssssssssssssso${\e[1;34m}++:
${\e[1;31m}  `:////${\e[1;35m}ssssssssssssssssssssssssssso${\e[1;34m}+++.
${\e[1;31m}`-////+${\e[1;35m}ssssssssssssssssssssssssssso${\e[1;34m}++++-
${\e[1;31m} `..-+${\e[1;35m}oosssssssssssssssssssssssso${\e[1;34m}+++++/`
${\e[1;34m}   ./++++++++++++++++++++++++++++++/:.
${\e[1;34m} `:::::::::::::::::::::::::------``

You may be confused and have difficulty to understand, but this is why customfetch is different from the others.
We use our own parser for displaying the system informations or anything else, and so we use the variable layout along side the file.txt, which contains the ascii art.

We use something we call "modules" and they starts with a '$'. We use them on both the ascii art text file and the layout variable
There are 3 modules:

  • The info module ($<>) lets you access a sub-member of a built-in component
    e.g $<user.name> will print the username, $<os.kernel_version> will print the kernel version and so on.
    run "cufetch -l" for a list of builti-in components

  • The color module (${}) displays the text with a color
    e.g "${red}hello world" will indeed print "hello world" in red (or the color you set in the variable).
    you can even put a custom hex color e.g: ${#ff6622} OR bash escape code colors e.g ${\e[1;32m} or ${\e[0;34m}.
    To reset color use ${0}

  • The bash command module ($()) let's you execute bash commands.
    e.g $(echo "hello world") will indeed echo out hello world
    you can even use pipes:
    e.g $(echo "hello world" | cut -d' ' -f2) will only print world

Any end brackets (')', '}', '>') can be escaped with .

Hope that explained it well

About

Highly customizable and fast fetch program

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages