GithubHelp home page GithubHelp logo

nnbnh / bfetch Goto Github PK

View Code? Open in Web Editor NEW
130.0 3.0 4.0 290 KB

๐Ÿ“  Dynamic fetch displayer that SuperB

License: GNU General Public License v3.0

Shell 96.55% Makefile 3.45%
ascii textart posix cli terminal fetch basher bpkg bfetch

bfetch's Introduction

๐Ÿ“ข Check out DIYfetch, the ultimate fetch tool template. It's the successor to SuperB Fetch!

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 takes user commands output and dynamically changes how it displays output based on the terminal size.

Note Check how people rice SuperB Fetch at Bfetchporn.

๐Ÿ“” Story

As a Linux ricer, I like to make Neofetch automatically run when the terminal starts. This was fine until I switched to using a tiled window manager, the terminal is often too small leading to the fetch getting cropped off, even with Pfetch, the problem would appear. This has led me to create SuperB Fetch, a dynamic fetching tool with the customization spirit of 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

๐Ÿ“ฅ 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:

paru -Sy superbfetch-git

For Bpkg user:

bpkg install NNBnh/bfetch

For Basher user:

basher install NNBnh/bfetch

Note 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 Valid 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

โ„น๏ธ 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.

Note Make sure the file is executable

๐Ÿ–ผ๏ธ Art and color element

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

๐Ÿ’Œ Credits

Special thanks to:






Made with โค๏ธ by NNB

Buy Me a Coffee

bfetch's People

Contributors

francescobianco avatar mcotocel avatar nnbnh avatar techwiz-3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bfetch's Issues

Can't run on MacOs

I've tried running the bfetch on a M1 MacBook, but it throws an error:

$ bfetch
script: illegal option -- -
usage: script [-adkpqr] [-t time] [file [command ...]]
script: illegal option -- -
usage: script [-adkpqr] [-t time] [file [command ...]]


System information:

os: macOS 12.4
host: MacBookPro17,1
kernel: 21.5.0
shell: zsh 5.8.1
cpu: Apple M1
$ sh --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.

Same outcome for both curl and git installation.

edit: Updated the title as it seems like the error is with the MacOs in general not M1 hardware

You will need to find another name for aur

Hi i have an aur account and i first finded the project bfetch and added it to the aur and now in the r/unixporn subredit i found this bfetch and i dont know what to do. Because im thinking of renaming the other bfetch package to bfetch-gitlab-git and this as bfetch-github-git.

Because of aur things i need to suffix it with git

Missing font from friglet example

Hello,
I know it is not a particular issue. I was trying to replicate the same bfetch output in the example video of this repository. When I set the following:

export BFETCH_INFO="curl --silent --location 'wttr.in/london?0pq'"                                                                                                   
export BFETCH_ART="printf \"\033[35m\"; figlet -f Bloody Spooky"                                                                                                     
export BFETCH_COLOR="$XDG_DATA_HOME/textart/color/icon/ghosts.textart"                                                                                               bfetch 

I get an error related to the Bloody font missing. I tried to download also GB of fonts but I was not able to find it. Do you know how we can retrieve the Bloody font? I'm working on Arch Linux.

Thanks

Can't Install on kubuntu

I follow these instructions

git clone https://github.com/NNBnh/bfetch.git ~/.local/share/bfetch
ln -s ~/.local/share/bfetch/bin/bfetch ~/.local/bin/bfetch

the second line has notified:

ln: failed to create symbolic link '/home/username/.local/bin/bfetch': No such file or directory

System Info:
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.8.0-48-generic
OS Type: 64-bit

Thanks,

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.