GithubHelp home page GithubHelp logo

toni500github / customfetch Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.49 MB

Highly customizable and fast fetch program

License: GNU General Public License v3.0

Makefile 0.11% C++ 99.79% C 0.01% Python 0.09%

customfetch's Introduction

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

customfetch's People

Contributors

toni500github avatar burntranch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.