diff --git a/.github/wiki/Ascii-Art.md b/.github/wiki/Ascii-Art.md new file mode 100644 index 000000000..211871851 --- /dev/null +++ b/.github/wiki/Ascii-Art.md @@ -0,0 +1,34 @@ +This is the format onefetch uses for it's ASCII art files. + +#### Here's an example: + +``` +{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} ``.---::::---..` +``` + +#### Features: + +- You can use `{0}` to `{X}`to color the ascii, with X > 0. +- You can pass the flag `-c, --ascii-colors 2 5 ...` to set your own colors. + - Look at the color palette to know the color order + +![](https://i.imgur.com/NFT4WL4.png) diff --git a/.github/wiki/Command-line-options.md b/.github/wiki/Command-line-options.md new file mode 100644 index 000000000..51eea937c --- /dev/null +++ b/.github/wiki/Command-line-options.md @@ -0,0 +1,122 @@ +```man +Usage: onefetch [OPTIONS] [INPUT] + +Arguments: + [INPUT] + Run as if onefetch was started in instead of the current working directory + +Options: + --ascii-input + Takes a non-empty STRING as input to replace the ASCII logo + + It is possible to pass a generated STRING by command substitution + + For example: + + '--ascii-input "$(fortune | cowsay -W 25)' + + -a, --ascii-language + Which LANGUAGE's ascii art to print + + -c, --ascii-colors ... + Colors (X X X...) to print the ascii art + + -d, --disabled-fields ... + Allows you to disable FIELD(s) from appearing in the output + + -i, --image + Path to the IMAGE file + + --image-protocol + Which image protocol to use + + [possible values: kitty, sixel, iterm] + + --color-resolution + VALUE of color resolution to use with SIXEL backend + + [default: 16] + [possible values: 16, 32, 64, 128, 256] + + --no-bold + Turns off bold formatting + + --no-merges + Ignores merge commits + + --no-color-palette + Hides the color palette + + -n, --number-of-authors + NUM of authors to be shown + + [default: 3] + + -e, --exclude ... + gnore all files & directories matching EXCLUDE + + --no-bots [] + Exclude [bot] commits. Use to override the default pattern + + -l, --languages + Prints out supported languages + + -p, --package-managers + Prints out supported package managers + + -o, --output + Outputs Onefetch in a specific format + + [possible values: json, yaml] + + --true-color + Specify when to use true color + + If set to auto: true color will be enabled if supported by the terminal + + [default: auto] + [possible values: auto, never, always] + + --show-logo + Specify when to show the logo + + If set to auto: the logo will be hidden if the terminal's width < 95 + + [default: always] + [possible values: auto, never, always] + + -t, --text-colors ... + Changes the text colors (X X X...) + + Goes in order of title, ~, underline, subtitle, colon, and info + + For example: + + '--text-colors 9 10 11 12 13 14' + + -z, --iso-time + Use ISO 8601 formatted timestamps + + -E, --email + Show the email address of each author + + --include-hidden + Count hidden files and directories + + -T, --type ... + Filters output by language type + + [default: programming markup] + [possible values: programming, markup, prose, data] + + --generate + If provided, outputs the completion file for given SHELL + + [possible values: bash, elvish, fish, powershell, zsh] + + -h, --help + Print help information (use `-h` for a summary) + + -V, --version + Print version information +``` \ No newline at end of file diff --git a/.github/wiki/Getting-Started.md b/.github/wiki/Getting-Started.md new file mode 100644 index 000000000..a9668cd57 --- /dev/null +++ b/.github/wiki/Getting-Started.md @@ -0,0 +1,44 @@ +Onefetch is installed, then what? + +### Usage + +```sh +> onefetch /path/of/your/repo + ``` + Or + +```sh +> cd /path/of/your/repo +> onefetch +``` + +### Misc + +By @spenserblack +```sh +# Runs `onefetch -a Assembly`, `onefetch -a C`, etc. +onefetch -l | tr "[:upper:] " "[:lower:]-" | while read line; do echo "$line"; onefetch -a $line; done; +``` +By @Quazar_omega + +A little function to put in `.bashrc` to run onefetch whenever you cd into a repo, making sure that it's different from the last one you were in: +```sh +LAST_REPO="" +cd() { + builtin cd "$@"; + git rev-parse 2>/dev/null; + + if [ $? -eq 0 ]; then + if [ "$LAST_REPO" != $(basename $(git rev-parse --show-toplevel)) ]; then + onefetch + LAST_REPO=$(basename $(git rev-parse --show-toplevel)) + fi + fi +} +``` + +By @mbrehin +```sh +# Add Git alias for onefetch. +git config --global alias.project-summary '!which onefetch && onefetch' +``` diff --git a/.github/wiki/Home.md b/.github/wiki/Home.md new file mode 100644 index 000000000..873a309eb --- /dev/null +++ b/.github/wiki/Home.md @@ -0,0 +1,11 @@ +Welcome to the onefetch's wiki! +- **[Home](https://github.com/o2sh/onefetch/wiki)** +- **General** + - [Installation](https://github.com/o2sh/onefetch/wiki/installation) + - [Getting started](https://github.com/o2sh/onefetch/wiki/getting-started) +- **Options** + - [Command-line options](https://github.com/o2sh/onefetch/wiki/command-line-options) +- **Images** + - [Images in the terminal](https://github.com/o2sh/onefetch/wiki/Images-in-the-terminal) +- **Ascii** + - [Ascii file format](https://github.com/o2sh/onefetch/wiki/ascii-art) \ No newline at end of file diff --git a/.github/wiki/Images-in-the-terminal.md b/.github/wiki/Images-in-the-terminal.md new file mode 100644 index 000000000..2e076768f --- /dev/null +++ b/.github/wiki/Images-in-the-terminal.md @@ -0,0 +1,23 @@ +Onefetch supports displaying images using [`kitty`](https://sw.kovidgoyal.net/kitty/graphics-protocol.html), [`Sixel`](https://en.wikipedia.org/wiki/Sixel) and [`iTerm`](https://www.iterm2.com/documentation-images.html). + +

+ +

+ +When running `onefetch --image ./My-picture.jpg`, the program looks for the first `Image Backend` supported by the terminal and use it to display the requested image instead of the Ascii logo. + +If you decide to go manual, and want to force the use of a specific image backend --> `onefetch --image ./My-picture.jpg --image-backend sixel|kitty|iterm` + +### Sixel + +The Sixel protocol is handled by multiple terminal emulators such as [`xterm`](https://invisible-island.net/xterm/) (enabled via flag `-ti 340`), [`mlterm`](https://wiki.ubuntu.com/Mlterm) and [`WezTerm`](https://github.com/wez/wezterm) which are actively maintained. + +You can increase the color resolution using the `--color-resolution` flag. + +### Kitty + +The kitty terminal graphics protocol used on the terminal of the same name allows the program running in the terminal, to render graphics to the screen of the terminal emulator. + +### ITerm + +The iTerm inline image protocol supported by iTerm2 (also WezTerm) allows to display images within the terminal. \ No newline at end of file diff --git a/.github/wiki/Installation.md b/.github/wiki/Installation.md new file mode 100644 index 000000000..bd2c26413 --- /dev/null +++ b/.github/wiki/Installation.md @@ -0,0 +1,202 @@ +This wiki page will guide you through getting onefetch working on your system. + +[![Packaging status](https://repology.org/badge/vertical-allrepos/onefetch.svg)](https://repology.org/project/onefetch/versions) + +# Table of Contents + +* [Universal Install](#universal-install) + * [Cargo](#cargo) + * [Snap](#snap) + * [Build from source](#build-from-source) +* [OS/Distro Packages](#osdistro-packages) + * [Alpine Linux](#alpine-linux) + * [Arch](#arch) + * [Fedora](#fedora) + * [FreeBSD](#freebsd) + * [Funtoo](#funtoo) + * [macOS](#macos) + * [Homebrew](#homebrew) + * [MacPorts](#macports) + * [NetBSD](#netbsd) + * [NixOS](#nixos) + * [openSUSE](#openSUSE-Leap-or-Tumbleweed) + * [Ubuntu](#ubuntu-ppa) + * [Void Linux](#void-linux) + * [Windows](#windows) + * [Winget](#Winget) + * [Scoop](#scoop) + * [Chocolatey](#chocolatey) + +# Universal + +If your architecture is supported by the pre-built binaries, you can download them from the [releases page](https://github.com/o2sh/onefetch/releases). + +## Cargo + +First, install `rustup` to get the `rust` compiler installed on your system (using the recommended `curl https://sh.rustup.rs -sSf | sh -s` installation method) and then + +``` +cargo install onefetch +``` + +This method will build the binary from source. + +To update, run + +``` +cargo install onefetch --force +``` + +## Snap + +For a system with Snap installed, run + +``` +snap install onefetch +``` + +The stable version will be installed for you automatically. + +## Build from source + +First, install `rustup` to get the `rust` compiler installed on your system (using the recommended `curl https://sh.rustup.rs -sSf | sh -s` installation method) and then + +``` +git clone https://github.com/o2sh/onefetch +cd onefetch +make install +``` + +# OS/Distro Packages + +## Alpine Linux + +1. Update repositories + - `apk update` +2. Install the package + - `apk add onefetch` + + +## Arch + +Onefetch is available in the official repos. + +- Install the package + - `pacman -S onefetch` + +## Fedora + +Install it from the COPR + +``` +sudo dnf copr enable varlad/onefetch +sudo dnf install onefetch +``` + +## FreeBSD + +Install it from the official repositories + +- `pkg install onefetch` + +## Funtoo + +Funtoo has an autogenerated onefetch package in the official kits: + +- `emerge app-misc/onefetch` + +## MacOS + +### HomeBrew + +Install `onefetch` with Homebrew + +``` +brew install onefetch +``` + +To update, run + +``` +brew upgrade onefetch +``` + +### MacPorts + +Install `onefetch` with MacPorts + +``` +sudo port selfupdate +sudo port install onefetch +``` + +To update run, + +``` +sudo port upgrade onefetch +``` + +## NetBSD + +Install it from the official repositories. + +- `pkg_add onefetch` + + +## NixOS + +Install it from the official repositories + +- `nix-env -i onefetch` + + +## openSUSE Leap or Tumbleweed + +Install it from the official repositories. + +- `zypper install onefetch` + + +## Ubuntu (ppa) + +``` +sudo add-apt-repository ppa:o2sh/onefetch +sudo apt-get update +sudo apt-get install onefetch +``` + +If your Ubuntu version isn't supported, use [snap](#snap). + +## Void Linux + +Install it from the official repositories + +- `sudo xbps-install -S onefetch` + + +## Windows + +### Winget + +You can install onefetch using [winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/) + +``` +winget install onefetch +``` + +### Scoop + +For [Scoop](https://scoop.sh/) users, onefetch is available from the "Extras" bucket + +``` +scoop bucket add extras +scoop install onefetch +``` + +### Chocolatey + +If you prefer to use [Chocolatey](https://chocolatey.org/) to manage software, it can be installed like so + +``` +choco install onefetch +``` \ No newline at end of file diff --git a/.github/wiki/_Footer.md b/.github/wiki/_Footer.md new file mode 100644 index 000000000..95fce2a5c --- /dev/null +++ b/.github/wiki/_Footer.md @@ -0,0 +1,2 @@ +- 📰 [Wiki Home](https://github.com/o2sh/onefetch/wiki) +- 🛖 [Project Home](https://github.com/o2sh/onefetch) \ No newline at end of file diff --git a/.github/wiki/_Sidebar.md b/.github/wiki/_Sidebar.md new file mode 100644 index 000000000..821f3e3b1 --- /dev/null +++ b/.github/wiki/_Sidebar.md @@ -0,0 +1,10 @@ +- **[Home](https://github.com/o2sh/onefetch/wiki)** +- **General** + - [Installation](https://github.com/o2sh/onefetch/wiki/installation) + - [Getting started](https://github.com/o2sh/onefetch/wiki/getting-started) +- **Options** + - [Command-line options](https://github.com/o2sh/onefetch/wiki/command-line-options) +- **Images** + - [Image in the terminal](https://github.com/o2sh/onefetch/wiki/images-in-the-terminal) +- **Ascii** + - [Ascii file format](https://github.com/o2sh/onefetch/wiki/ascii-art) \ No newline at end of file diff --git a/.github/workflows/wiki.yml b/.github/workflows/wiki.yml new file mode 100644 index 000000000..131520cd1 --- /dev/null +++ b/.github/workflows/wiki.yml @@ -0,0 +1,19 @@ +name: Sync Wiki +on: + push: + branches: [main] + paths: + - ".github/wiki/**" + + workflow_dispatch: + +jobs: + update-wiki: + runs-on: ubuntu-latest + name: Sync Wiki + + steps: + - uses: actions/checkout@v3 + - uses: spenserblack/actions-wiki@v0.1 + with: + token: ${{ secrets.WIKI_TOKEN }}