### Install Dependencies for Onefetch Web Source: https://github.com/o2sh/onefetch/blob/main/docs/web/README.md Run this command to install all necessary project dependencies. ```bash npm i ``` -------------------------------- ### Install Onefetch on Fedora Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Fedora by enabling a COPR repository and then installing the package using dnf. ```shell sudo dnf copr enable varlad/onefetch sudo dnf install onefetch ``` -------------------------------- ### Install Rust Toolchain Source: https://github.com/o2sh/onefetch/wiki/installation Installs the Rust toolchain using rustup. Ensure CMake is installed separately. ```shell curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Install Onefetch on Ubuntu (Snap) Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Ubuntu using the Snap package manager. ```shell snap install onefetch ``` -------------------------------- ### Install Onefetch on Ubuntu (PPA) Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Ubuntu by adding a PPA repository and then using apt-get. ```shell sudo add-apt-repository ppa:o2sh/onefetch sudo apt-get update sudo apt-get install onefetch ``` -------------------------------- ### Install Onefetch on Ubuntu (Debian Package) Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Ubuntu by downloading and installing a Debian package from the releases page. ```shell wget https://github.com/o2sh/onefetch/releases/latest/download/onefetch_amd64.deb && sudo dpkg -i ./onefetch_amd64.deb ``` -------------------------------- ### Install Onefetch with Winget Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Windows using the winget package manager. ```shell winget install onefetch ``` -------------------------------- ### Install Onefetch on Funtoo Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Funtoo using the emerge package manager from the official kits. ```shell emerge app-misc/onefetch ``` -------------------------------- ### Install Onefetch on NetBSD Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on NetBSD using the pkg_add command from the official repositories. ```shell pkg_add onefetch ``` -------------------------------- ### Install Onefetch on Ubuntu Source: https://github.com/o2sh/onefetch/blob/main/README.md Use wget to download the .deb package and dpkg to install it. Remember to remove the downloaded file afterwards. ```bash wget https://github.com/o2sh/onefetch/releases/latest/download/onefetch_amd64.deb && sudo dpkg -i ./onefetch_amd64.deb && rm onefetch_amd64.deb ``` -------------------------------- ### Install Onefetch with Homebrew Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on macOS using the Homebrew package manager. ```shell brew install onefetch ``` -------------------------------- ### Install Onefetch on Void Linux Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Void Linux using the xbps-install command from the official repositories. ```shell sudo xbps-install -S onefetch ``` -------------------------------- ### Install Onefetch on NixOS Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on NixOS using the nix-env command from the official repositories. ```shell nix-env -i onefetch ``` -------------------------------- ### Install Onefetch on Alpine Linux Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Alpine Linux using the apk package manager. First, update repositories, then install the package. ```shell apk update apk add onefetch ``` -------------------------------- ### Start Onefetch Web Development Server Source: https://github.com/o2sh/onefetch/blob/main/docs/web/README.md Use this command to start the development server with hot reloading enabled for rapid development. ```bash npm start ``` -------------------------------- ### Install Onefetch with Chocolatey Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Windows using the Chocolatey package manager. ```shell choco install onefetch ``` -------------------------------- ### Install Onefetch on FreeBSD Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on FreeBSD using the pkg package manager from the official repositories. ```shell pkg install onefetch ``` -------------------------------- ### Install Onefetch with Scoop Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Windows using the Scoop package manager. Requires adding the 'extras' bucket first. ```shell scoop bucket add extras scoop install onefetch ``` -------------------------------- ### Install Onefetch on openSUSE Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on openSUSE Leap or Tumbleweed using the zypper package manager from the official repositories. ```shell zypper install onefetch ``` -------------------------------- ### Install Onefetch on Arch Linux Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on Arch Linux using the pacman package manager from the official repositories. ```shell pacman -S onefetch ``` -------------------------------- ### Install Onefetch with Cargo Source: https://github.com/o2sh/onefetch/wiki/installation Installs the onefetch binary using Cargo. This method builds from source and requires the Rust toolchain and CMake. ```shell cargo install onefetch ``` -------------------------------- ### Install Onefetch with MacPorts Source: https://github.com/o2sh/onefetch/wiki/installation Installs onefetch on macOS using the MacPorts package manager. Ensure MacPorts is updated first. ```shell sudo port selfupdate sudo port install onefetch ``` -------------------------------- ### Onefetch ASCII Art Example Source: https://github.com/o2sh/onefetch/wiki/ascii-art This is an example of the ASCII art format used by Onefetch. It includes placeholders like {0} and {1} which can be used for colorization. ```ascii {2} .:--::////::--.` {1} `/yNMMNho{2}////////////:. {1} `+NMMMMMMMMmy{2}/////////////:` {0} `-:::{1}ohNMMMMMMMNy{2}/////////////:` {0} .::::::::{1}odMMMMMMMNy{2}/////////////- {0} -:::::::::::{1}/hMMMMMMMmo{2}////////////- {0} .::::::::::::::{1}oMMMMMMMMh{2}////////////- {0}`:::::::::::::{1}/dMMMMMMMMMMNo{2}///////////` {0}-::::::::::::{1}sMMMMMMmMMMMMMMy{2}//////////- {0}-::::::::::{1}/dMMMMMMs{0}:{1}+NMMMMMMd{2}/////////: {0}-:::::::::{1}+NMMMMMm/{0}:::{1}/dMMMMMMm+{2}///////: {0}-::::::::{1}sMMMMMMh{0}:::::::{1}dMMMMMMm+{2}//////- {0}`:::::::{1}sMMMMMMy{0}:::::::::{1}dMMMMMMm+{2}/////` {0} .:::::{1}sMMMMMMs{0}:::::::::::{1}mMMMMMMd{2}////- {0} -:::{1}sMMMMMMy{0}::::::::::::{1}/NMMMMMMh{2}//- {0} .:{1}+MMMMMMd{0}::::::::::::::{1}oMMMMMMMo{2}- {1} `yMMMMMN/{0}:::::::::::::::{1}hMMMMMh. {1} -yMMMo{0}::::::::::::::::{1}/MMMy- {1} `/s{0}::::::::::::::::::{1}o/` {0} ``.---::::---..` ``` -------------------------------- ### Add New Language Support Configuration Source: https://github.com/o2sh/onefetch/blob/main/CONTRIBUTING.md Configuration example for adding a new programming language to Onefetch. It includes required fields like language type, ASCII art logo, and color configurations. ```yaml CSharp: # required, this will be the name of the enum variant for the language as specified by tokei [1] type: programming # required, can be programming, data, markup, or prose as specified by linguist [2] # required, this is the logo. If it's not within 25x40 bounds, you will get a compiler error. Use `{i}` to color the ascii with `i` the color index. ascii: | {0} ++++++ {0} ++++++++++++ {0} ++++++++++++++++++++ {0} ++++++++++++++++++++++++++ {0} ++++++++++++++++++++++++++++++++ {0} +++++++++++++{3}************{0}+++++++++++++ {0}+++++++++++{3}******************{0}++++++++{2};;; {0}+++++++++{3}**********************{0}++{2};;;;;;; {0}++++++++{3}********{0}++++++{3}******{2};;;;;;;;; {0}+++++++{3}********{0}++++++++++{3}**{2};;;{3}**{2};;;{3}**{2};;; {0}+++++++{3}*******{0}+++++++++{2};;;;;;{3}*********{2}:: {0}+++++++{3}******{0}+++++++{2};;;;;;;;;;{3}**{2};;;{3}**{2};;; {0}+++++++{3}*******{0}+++{1}:::::{2};;;;;;;{3}*********{2}:: {0}+++++++{3}********{1}::::::::::{3}**{2};;;{3}**{2};;;{3}**{2};;; {0}++++++++{3}*********{1}::::::{3}******{2};;;;;;;;;; {0}++++++{1}:::{3}**********************{1}::{2};;;;;;; {0}+++{1}::::::::{3}******************{1}::::::::{2};;; {1} :::::::::::::{3}************{1}::::::::::::: {1} :::::::::::::::::::::::::::::::: {1} :::::::::::::::::::::::::: {1} :::::::::::::::::::: {1} :::::::::::: {1} :::::: colors: ansi: # required, a list of the ANSI colors used to colorize the logo - blue - magenta - magenta - white hex: # optional, alternative to basic colors for terminals that support true colour. - "#9B4F97" - "#67217A" - "#803788" - "#FFFFFF" chip: "#178600" # required, this is used for the language breakdown bar, its value can be found in linguist [2]. icon: '\u{E648}' # optional, the UTF-16 code point of the nerd font icon if supported [3] serialization: c# # required only if the Enum name `CSharp` doesn't match the display name `C#` ``` -------------------------------- ### Update Onefetch with Homebrew Source: https://github.com/o2sh/onefetch/wiki/installation Updates an existing onefetch installation on macOS using Homebrew. ```shell brew upgrade onefetch ``` -------------------------------- ### Upgrade Onefetch with MacPorts Source: https://github.com/o2sh/onefetch/wiki/installation Upgrades an existing onefetch installation on macOS using MacPorts. ```shell sudo port upgrade onefetch ``` -------------------------------- ### Create a Git alias for onefetch Source: https://github.com/o2sh/onefetch/wiki/getting-started Add a global Git alias to easily run onefetch as part of your Git workflow, for example, `git project-summary`. ```sh # Add Git alias for onefetch. git config --global alias.project-summary '!which onefetch && onefetch' ``` -------------------------------- ### Update Onefetch with Cargo Source: https://github.com/o2sh/onefetch/wiki/installation Updates an existing onefetch installation to the latest version using Cargo. ```shell cargo install onefetch --force ``` -------------------------------- ### Run Onefetch on a Repository Source: https://github.com/o2sh/onefetch/blob/main/docs/wiki/getting-started.md Execute Onefetch by providing the path to a repository. Alternatively, navigate to the repository directory first and then run Onefetch. ```sh > onefetch /path/of/your/repo ``` ```sh > cd /path/of/your/repo > onefetch ``` -------------------------------- ### Run onefetch from inside a repository Source: https://github.com/o2sh/onefetch/wiki/getting-started Navigate into a repository directory and then execute onefetch without arguments. ```sh > cd /path/of/your/repo > onefetch ``` -------------------------------- ### Build Onefetch from Source Source: https://github.com/o2sh/onefetch/wiki/installation Clones the onefetch repository and builds the project using make. Requires Rust toolchain and CMake. ```shell git clone https://github.com/o2sh/onefetch cd onefetch make install ``` -------------------------------- ### CMD Git Repository Greeter for Windows Source: https://github.com/o2sh/onefetch/blob/main/docs/wiki/getting-started.md An adaptation for Windows's cmd.exe, designed for AutoRun scripts or DOSKEY macrofiles to run Onefetch upon entering a new Git repository. ```bat @set LAST_REPOSITORY= @doskey cd = ( ^ for %%^^^^ in ("") do @for /f "delims=" %%i in (^^""$*%%~^^""") do @( ^ if "%%~i"=="" ( ^ if defined USERPROFILE ( ^ if /i not "%%CD%%"=="%%USERPROFILE%%" ( ^ chdir /d "%%USERPROFILE%%" ^&^& set "OLDPWD=%%CD%%" ^ ) ^ ) else (call) ^ ) else if "%%~i"=="-" ( ^ if defined OLDPWD ( ^ if /i not "%%CD%%"=="%%OLDPWD%%" ( ^ chdir /d "%%OLDPWD%%" ^&^& set "OLDPWD=%%CD%%" ^ ) ^ ) else (call) ^ ) else ( ^ if defined CD ( ^ if /i not "%%CD%%"=="%%~fi" ( ^ chdir /d %%~fi ^&^& set "OLDPWD=%%CD%%" ^ ) ^ ) else (call) ^ ) ^ ) ^ ) ^&^& for /f "delims=" %%r in ('git rev-parse --show-toplevel 2^^^>nul') do @( if not "%%~r"=="%%LAST_REPOSITORY%%" ( ^ onefetch ^ ) ^& set "LAST_REPOSITORY=%%~r" ^ ) ``` -------------------------------- ### Run onefetch from repository path Source: https://github.com/o2sh/onefetch/wiki/getting-started Execute onefetch by providing the repository path as an argument. ```sh > onefetch /path/of/your/repo ``` -------------------------------- ### Bash/Zsh Git Repository Greeter Source: https://github.com/o2sh/onefetch/blob/main/docs/wiki/getting-started.md Integrates Onefetch into your shell to automatically run when you enter a new Git repository directory. It prevents repeated runs in the same directory. ```sh # git repository greeter last_repository= check_directory_for_new_repository() { current_repository=$(git rev-parse --show-toplevel 2> /dev/null) if [ "$current_repository" ] && \ [ "$current_repository" != "$last_repository" ]; then onefetch fi last_repository=$current_repository } cd() { builtin cd "$@" check_directory_for_new_repository } ``` -------------------------------- ### Display Image with Auto-Detected Protocol Source: https://github.com/o2sh/onefetch/wiki/images-in-the-terminal Use this command to display an image using the first supported image protocol detected by the terminal. No specific protocol needs to be set. ```bash onefetch --image ./My-picture.jpg ``` -------------------------------- ### Run Onefetch in the current repository directory Source: https://github.com/o2sh/onefetch/blob/main/README.md Navigate to the Git repository directory first, then run Onefetch without any arguments. ```bash cd /path/of/your/repo onefetch ``` -------------------------------- ### Automate onefetch in Bash or Zsh Source: https://github.com/o2sh/onefetch/wiki/getting-started Add this script to your `.bashrc` or `.zshrc` to automatically run onefetch when entering a new Git repository directory. ```sh # git repository greeter last_repository= check_directory_for_new_repository() { current_repository=$(git rev-parse --show-toplevel 2> /dev/null) if [ "$current_repository" ] && \ [ "$current_repository" != "$last_repository" ]; then onefetch fi last_repository=$current_repository } cd() { builtin cd "$@" check_directory_for_new_repository } # optional, greet also when opening shell directly in repository directory # adds time to startup check_directory_for_new_repository ``` -------------------------------- ### Run Onefetch with a specific repository path Source: https://github.com/o2sh/onefetch/blob/main/README.md Execute Onefetch by providing the path to the Git repository as an argument. ```bash onefetch /path/of/your/repo ``` -------------------------------- ### Automate onefetch in Windows CMD Source: https://github.com/o2sh/onefetch/wiki/getting-started An adaptation for Windows's `cmd.exe` to run onefetch automatically when changing directories, suitable for AutoRun scripts or DOSKEY macrofiles. ```bat @set LAST_REPOSITORY= @doskey cd = ( ^ for %%%%%%%% in ("") do @for /f "delims=" %%i in (^^""$*%%~^^"^") do @( ^ if "%%~i"=="" ( ^ if defined USERPROFILE ( ^n if /i not "%%CD%%"=="%%USERPROFILE%%" ( ^ chdir /d "%%USERPROFILE%%" ^&^& set "OLDPWD=%%CD%%" ^ ) ^ ) else (call) ^ ) else if "%%~i"=="-" ( ^ if defined OLDPWD ( ^ if /i not "%%CD%%"=="%%OLDPWD%%" ( ^ chdir /d "%%OLDPWD%%" ^&^& set "OLDPWD=%%CD%%" ^ ) ^n ) else (call) ^ ) else ( ^ if defined CD ( ^ if /i not "%%CD%%"=="%%~fi" ( ^ chdir /d %%~fi ^&^& set "OLDPWD=%%CD%%" ^ ) ^ ) else (call) ^ ) ^ ) ^&^& for /f "delims=" %%r in ('git rev-parse --show-toplevel 2^^^>nul') do @( ^ if not "%%~r"=="%%LAST_REPOSITORY%%" ( ^ onefetch ^ ) ^& set "LAST_REPOSITORY=%%~r" ^ ) ``` -------------------------------- ### Automate onefetch in Powershell Source: https://github.com/o2sh/onefetch/wiki/getting-started Place this script in your Powershell `$PROFILE` to automatically run onefetch when changing into a new Git repository. ```pwsh # git repository greeter # Set the console output encoding to UTF-8, so that special characters are displayed correctly when piping to Write-Host [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 $global:lastRepository = $null function Check-DirectoryForNewRepository { $currentRepository = git rev-parse --show-toplevel 2>$null if ($currentRepository -and ($currentRepository -ne $global:lastRepository)) { onefetch | Write-Host } $global:lastRepository = $currentRepository } function Set-Location { Microsoft.PowerShell.Management\Set-Location @args Check-DirectoryForNewRepository } # Optional: Check the repository also when opening a shell directly in a repository directory # Uncomment the following line if desired #Check-DirectoryForNewRepository ``` -------------------------------- ### Automate onefetch in Fish shell Source: https://github.com/o2sh/onefetch/wiki/getting-started This Fish shell adaptation automatically runs onefetch when changing into a new Git repository. Run it once to save the functions. ```fish function cd -w='cd' builtin cd $argv || return check_directory_for_new_repository end function check_directory_for_new_repository set current_repository (git rev-parse --show-toplevel 2> /dev/null) if [ "$current_repository" ] && \ [ "$current_repository" != "$last_repository" ] onefetch end set -gx last_repository $current_repository end funcsave cd funcsave check_directory_for_new_repository ``` -------------------------------- ### Iterate and Display Languages with Onefetch Source: https://github.com/o2sh/onefetch/blob/main/docs/wiki/getting-started.md This script iterates through supported languages, converts them to lowercase with hyphens, and displays each language along with its Onefetch output. ```sh # Runs `onefetch -a Assembly`, `onefetch -a C`, etc. onefetch -l | tr "[:upper:] " "[:lower:]-" | while read line; do echo "$line"; onefetch -a $line; done; ``` -------------------------------- ### Run onefetch for all detected languages Source: https://github.com/o2sh/onefetch/wiki/getting-started This script iterates through all languages detected by onefetch and runs onefetch for each, filtering by language. ```sh # Runs `onefetch -a Assembly`, `onefetch -a C`, etc. onefetch -l | tr ":upper: " ":lower:-" | while read line; do echo "$line"; onefetch -a $line; done; ``` -------------------------------- ### Force Specific Image Protocol Source: https://github.com/o2sh/onefetch/wiki/images-in-the-terminal Manually force Onefetch to use a specific image protocol (sixel, kitty, or iterm) when displaying an image. This is useful if auto-detection is not working as expected. ```bash onefetch --image ./My-picture.jpg --image-protocol sixel|kitty|iterm ``` -------------------------------- ### Increase Color Resolution for Sixel Source: https://github.com/o2sh/onefetch/blob/main/docs/wiki/images-in-the-terminal.md When using the Sixel protocol, you can increase the color resolution with the `--color-resolution` flag. ```bash onefetch --image ./My-picture.jpg --image-protocol sixel --color-resolution 256 ``` -------------------------------- ### Increase Color Resolution for Sixel Source: https://github.com/o2sh/onefetch/wiki/images-in-the-terminal When using the Sixel protocol, you can increase the color resolution for better image quality. This flag adjusts the color depth. ```bash onefetch --color-resolution ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.