GithubHelp home page GithubHelp logo

ponymodz / albafetch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alba4k/albafetch

0.0 0.0 0.0 1.81 MB

Faster neofetch alternative, written in C. Still improving :)

License: MIT License

C 96.62% Objective-C 1.73% Makefile 1.65%

albafetch's Introduction

albafetch ~by alba4k

intro

albafetch is a simple, fast system fetching program. It prints many info about the system in way less than a second. I decided to make this as a challenge for myself and since I found neofetch too slow (which is understandable from a 10k+ lines shell script).

Here is a time comparison (exact execution times change between machines and runs):

neofetch albafetch

Dependencies:

Everything the program could need will be installed on your distribution out of te box (sh, lspci). I would reccoment double checking libalpm on archlinux-based systems (it's also a dependency of pacman, so that should already be there).

Compiling:

this will need gcc (make CC=[compiler] for other compilers, which should accept the same flags as gcc, e.g. clang) and make

$ git clone https://github.com/alba4k/albafetch
$ cd albafetch
$ make

An executable file should appear in build/ if the compilation succedes.

Installation

For Arch Linux based systems, an AUR package is avaiable (albafetch-git)

Manual installation:

this will need gcc (make CC=[compiler] install for other compilers, which should accept the same flags as gcc, e.g. clang) and make

$ git clone https://github.com/alba4k/albafetch
$ cd albafetch
# make install

make install needs to be ran as root (e.g. using sudo or in a root shell) to acces /usr/bin/. It will copy the executable from build/ to there.

Customizing

A configuration should be placed in ~/.config/albafetch.conf (~/.config can be overwritten using the XDG_CONFIG_HOME environnment variable). An example config, with comments, is found in this repository.

How to write the config:

Basic rules:

  • comments start with ; and reach the end of the line
  • values can't be big than 32B (separators can get as long as 64B)
  • only ASCII characters will work
  • ending the file with a newline is reccomended

The config should be written in a key "value" format you can put something in between if you like (e.g. 'key = "value"' everything but a " or a keyword.

Options and default values:

spacing = "    "
separator1 = "\e[0m------------------"
separator2 = ""
separator_first = "\e[0m------------------"
separator_last = "\e[0m------------------"
dash_str = "\e[0m:"

print_cpu_freq = "true"
print_cpu_brand = "true"
print_gpu_freq = "true"
print_mem_perc = "true"
align_infos = "false"

default_color = ""
default_bold = "true"
default_logo = ""

col_block_len = "3"

title_prefix = ""
col_prefix = ""
hostname_label = "Hostname"
user_label = "User"
uptime_label = "Uptime"
os_label = "OS"
kernel_label = "Kernel"
desktop_label = "Desktop"
shell_label = "Shell"
term_label = "Terminal"
packages_label = "Packages"
host_label = "Host"
bios_label = "BIOS"
cpu_label = "CPU"
gpu_label = "GPU"
mem_label = "Memory"
pub_ip_label = "Publ. IP"
loc_ip_label = "Priv. IP"
pwd_label = "Directory"

Unset values will use the defaults Quotes in the config are not optional.

If a key is defined more than one the first one is the only oen that will get considered.

This repository contains a commented example config file (albafetch.conf) with the default values.

Source code editing:

If you like, you can directly modify the source code contained in this repository and recompile the program after. New logos can be added in src/logos.h (inside of const char *logos[][]) and in src/main.c (to make them show up in the help message).

Don't mind doing a pull request if you think some of the changes you made should be in the global version, just try to follow the formatting that's used in the rest of the file :)


Aaron Blasko, March 2022

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.