Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/NNBnh/bfetch
๐ Dynamic fetch displayer that SuperB
https://github.com/NNBnh/bfetch
ascii basher bfetch bpkg cli fetch posix terminal textart
Last synced: about 1 month ago
JSON representation
๐ Dynamic fetch displayer that SuperB
- Host: GitHub
- URL: https://github.com/NNBnh/bfetch
- Owner: NNBnh
- License: gpl-3.0
- Created: 2020-11-21T14:48:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-24T21:40:36.000Z (almost 2 years ago)
- Last Synced: 2024-11-10T03:10:48.681Z (about 1 month ago)
- Topics: ascii, basher, bfetch, bpkg, cli, fetch, posix, terminal, textart
- Language: Shell
- Homepage:
- Size: 283 KB
- Stars: 134
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fetch - bfetch - Dynamic fetch displayer that SuperB. `Shell` (Operation System / Cross Platform)
README
> **๐ข [Check out DIYfetch, the ultimate fetch tool template. It's the successor to SuperB Fetch!](https://github.com/info-mono/diyfetch)**
## ๐ก About
**SuperB Fetch** (a.k.a `bfetch`) is a *SuperB* general-purpose fetch displayer written in [`portable sh`](https://github.com/dylanaraps/pure-sh-bible) 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](https://github.com/NNBnh/bfetch/discussions/1).*
### ๐ Story
As a Linux ricer, I like to make [**Neofetch**](https://github.com/dylanaraps/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**](https://github.com/dylanaraps/pfetch), the problem would appear.
This has led me to create **SuperB Fetch**, a dynamic fetching tool with the customization spirit of [**Ufetch**](https://gitlab.com/jschx/ufetch).||[Neofetch](https://github.com/dylanaraps/neofetch)|[Pfetch](https://github.com/dylanaraps/pfetch)|
|:-:|-|-|
|Without SuperB Fetch|![Neofetch](https://user-images.githubusercontent.com/43980777/108312895-ef3cf400-71e9-11eb-8783-5d5d437c166a.png)|![Pfetch](https://user-images.githubusercontent.com/43980777/108312916-f532d500-71e9-11eb-9313-66363806bb4e.png)|
|With SuperB Fetch|![Bfetch](https://user-images.githubusercontent.com/43980777/108312905-f237e480-71e9-11eb-97db-4f2d0f5cdb8b.png)|![Bfetch](https://user-images.githubusercontent.com/43980777/108312925-f82dc580-71e9-11eb-97ab-1d9becab58dd.png)|### โจ Features
- Super **minimum** with exactly [**256** lines of `sh`](bin/bfetch#L256) and [**no dependencies**](#-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**](#%EF%B8%8F-configuration)
- Have **two mode**:|Paper mode|Classic mode|
|-|-|
|![Paper mode](https://user-images.githubusercontent.com/43980777/108312884-eba96d00-71e9-11eb-90f7-301537ba2000.png)|![Classic mode](https://user-images.githubusercontent.com/43980777/108312871-e64c2280-71e9-11eb-8569-f38765891480.png)|## ๐ Setup
### ๐งพ Dependencies
- [Unix commands](https://en.wikipedia.org/wiki/List_of_Unix_commands) to process
### ๐ฅ Installation
#### ๐ง Manually
Option 1: using `curl`
```sh
curl https://raw.githubusercontent.com/NNBnh/bfetch/main/bin/bfetch > ~/.local/bin/bfetch
chmod +x ~/.local/bin/bfetch
```Option 2: using `git`
```sh
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](https://archlinux.org), install [this AUR package](https://aur.archlinux.org/packages/superbfetch-git):
```sh
paru -Sy superbfetch-git
```For [Bpkg](https://github.com/bpkg/bpkg) user:
```sh
bpkg install NNBnh/bfetch
```For [Basher](https://github.com/basherpm/basher) user:
```sh
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:
```sh
bfetch
```## โ๏ธ Configuration
SuperB Fetch is configured through environment variables: `export BFETCH_=""`
|Value|Valid|Default|Description|
|-|-|-|-|
|`BFETCH_INFO`|``|`$XDG_CONFIG_HOME/bfetch/info` (`~/.config/bfetch/info`)|Read this commands output as infomation element (OS, WM, terminal, ...)|
|`BFETCH_ART`|``|`$XDG_CONFIG_HOME/bfetch/art` (`~/.config/bfetch/art`)|Read this commands output as art element (operating system logo)|
|`BFETCH_COLOR`|``|`$XDG_CONFIG_HOME/bfetch/color` (`~/.config/bfetch/color`)|Read this commands output as color element (colors strip below info)|
|||||
|`BFETCH_TEMPORARY`|``|`/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](https://github.com/NNBnh/textart-collections/blob/7367d278ce41a38783d7ce12b3b05175836213cc/fetch/info.textart) with [Fetchutils](https://github.com/lptstr/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](https://github.com/NNBnh/ansi) and [other textart resources](https://github.com/NNBnh/textart-collections#-resources).
## ๐ Credits
Special thanks to:
- [**Julian Marcos**](https://github.com/Juliaria08) for porting this package to the [AUR](https://aur.archlinux.org/packages/superbfetch-git)
- [**Neofetch**](https://github.com/dylanaraps/neofetch) by [Dylan](https://github.com/dylanaraps)
- [**Pfetch**](https://github.com/dylanaraps/pfetch) also by [Dylan](https://github.com/dylanaraps)
- [**Ufetch**](https://gitlab.com/jschx/ufetch) by [Jschx](https://gitlab.com/jschx)
- [**Fetchutils**](https://github.com/lptstr/fetchutils) by [LPTSTR](https://github.com/lptstr)
- [**Pure sh bible**](https://github.com/dylanaraps/pure-sh-bible) also by [Dylan](https://github.com/dylanaraps)
- [**Carbon**](https://carbon.now.sh) by [@carbon_app](https://twitter.com/carbon_app)
---
>
Made with โค๏ธ by NNB
>
>