Skip to content
forked from NNBnh/bfetch

📠 Dynamic fetch displayer that SuperB

License

Notifications You must be signed in to change notification settings

Juliaria08/bfetch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL-3.0 Development completed

💡 About

SuperB Fetch (a.k.a bfetch) is a SuperB general-purpose fetch displayer written in portable sh that take user commands output and change how it display dynamic with the terminal size.

📔 Story

As a Linux ricer, I kile to make Neofetch automatically run when the terminal start. This was fine until I switched to using the tiled window manager, the terminal is often too small leading the fetch get crop off, even with Pfetch, the poblem could appear. This has led me to create SuperB Fetch, a dynamic fetching tool with an customization spirit from Ufetch.

Neofetch Pfetch
Without SuperB Fetch Neofetch Pfetch
With SuperB Fetch Bfetch Bfetch

✨ Features

  • Super minimum with exactly 256 lines of sh and no dependencies (if you don't count sh).
  • Super flexible:
    • Align/shift/change mode contents based on terminal size.
    • Hide some elements if terminal is too small.
  • Super customizable:
    • SuperB Fetch can take commands output and use it. By so, SuperB Fetch can display anything you want, however you want.
    • And even more config options
  • Have two mode:
Paper mode Classic mode
Paper mode Classic mode

🚀 Setup

🧾 Dependencies

  • sh to process

📥 Installation

🔧 Manually

  • Option 1: using curl
curl https://raw.githubusercontent.com/NNBnh/bfetch/main/bin/bfetch > ~/.local/bin/bfetch
chmod +x ~/.local/bin/bfetch
  • Option 2: using git
git clone https://github.com/NNBnh/bfetch.git ~/.local/share/bfetch
ln -s ~/.local/share/bfetch/bin/bfetch ~/.local/bin/bfetch

📦 Package manager

For Arch-Linux base distro, install this AUR package:

yay -Sy superbfetch-git

For bpkg user:

bpkg install NNBnh/bfetch

For Basher user:

basher install NNBnh/bfetch

If you can and want to port SuperB Fetch to other package managers, feel free to do so.

⌨️ Usage

Run SuperB Fetch in the terminal:

bfetch

⚙️ Configuration

SuperB Fetch is configured through environment variables: export BFETCH_<SETTING>="<value>"

Value Invalid Default Description
BFETCH_INFO <commands> $XDG_CONFIG_HOME/bfetch/info (~/.config/bfetch/info) Read this commands output as infomation element (OS, WM, terminal, ...)
BFETCH_ART <commands> $XDG_CONFIG_HOME/bfetch/art (~/.config/bfetch/art) Read this commands output as art element (operating system logo)
BFETCH_COLOR <commands> $XDG_CONFIG_HOME/bfetch/color (~/.config/bfetch/color) Read this commands output as color element (colors strip below info)
BFETCH_TEMPORARY <path/to/file> /tmp/bfetch Temporary file's location
BFETCH_CLASSIC_MODE true|false false Make SuperB Fetch prefer classic mode when both mode are possible
BFETCH_ART_RIGHT true|false false Render art on the right when using classic mode
BFETCH_PADDING 0+ 1 Padding fetch when using classic mode
BFETCH_SEPARATOR 0+ 2 Separate info and art when using classic mode
BFETCH_PROMPT_HEIGHT 0+ 1 Acknowledge how high the shell prompt is and counter it so the prompt don't push the fetch out

SuperB Fetch will export the maximum size that an element can get:

Value Description
BFETCH_INFO_HEIGHT Maximum height of infomation element
BFETCH_INFO_WIDTH Maximum width of infomation element
BFETCH_ART_HEIGHT Maximum height of art element
BFETCH_ART_WIDTH Maximum width of art element
BFETCH_COLOR_HEIGHT Maximum height of color element
BFETCH_COLOR_WIDTH Maximum width of color element

Here is an example of a color element that can be resized based on it's maximum size

ℹ️ Info element

SuperB Fetch looking for and execute $XDG_CONFIG_HOME/bfetch/info for info element as default, you can copy this info template with Fetchutils as a starting point and customizing.

Make sure the file is executable

🖼️ Art and color element

For art element and color element, take a look at NNB's textart collections and other textart resources.

💌 Credits

Special thanks to:






Made with ❤️ by NNB

Buy Me a Coffee

About

📠 Dynamic fetch displayer that SuperB

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 96.5%
  • Makefile 3.5%