├── .editorconfig
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── feature_request.md
│ └── new-distribution-request.md
├── git-chglog
│ ├── CHANGELOG.tpl.md
│ └── config.yml
├── shellcheck-pr.yml.disabled
├── shellcheck.yml.disabled
├── shfmt.yaml.disabled
├── tests
│ ├── macos.sh
│ ├── ubuntu.sh
│ └── windows.sh
└── workflows
│ ├── release.yaml
│ ├── shiftleft-analysis.yml
│ ├── test-workflows.yaml
│ ├── tests.yaml
│ └── trunk-io.yaml
├── .gitignore
├── .markdownlint.yaml
├── .shellcheckrc
├── .trunk
├── .gitignore
└── trunk.yaml
├── .vscode
└── settings.json
├── LICENSE
├── LICENSE.gpl
├── README.md
├── ascii
├── aldos.sh
├── alpine-linux.sh
├── amazon-linux.sh
├── android.sh
├── arch-linux-old.sh
├── arch-linux.sh
├── arcolinux.sh
├── artix-linux.sh
├── blackpanther-os.sh
├── bunsenlabs.sh
├── centos.sh
├── chakra.sh
├── chrome-os.sh
├── crux.sh
├── debian.sh
├── deepin.sh
├── devuan.sh
├── dragonflybsd.sh
├── draugeros.sh
├── elementary-os.sh
├── endeavor.sh
├── eurolinux.sh
├── exherbo.sh
├── fedora.sh
├── freebsd-old.sh
├── freebsd.sh
├── frugalware.sh
├── funtoo.sh
├── gentoo.sh
├── gnu-hurd.sh
├── grombyang.sh
├── guix-system.sh
├── haiku.sh
├── hyperbola.sh
├── kali-linux.sh
├── kaos.sh
├── kde-neon.sh
├── kogaion.sh
├── linux-generic.sh
├── lmde.sh
├── mac-classic.sh
├── macos.sh
├── mageia.sh
├── manjaro-tree.sh
├── manjaro.sh
├── mint.sh
├── netbsd.sh
├── netrunner.sh
├── nixos.sh
├── openbsd.sh
├── os-elbrus.sh
├── parabola.sh
├── pardus.sh
├── parrot-security.sh
├── pclinuxos.sh
├── peppermint.sh
├── proxmox-ve.sh
├── pureos.sh
├── qubes-os.sh
├── raspbian.sh
├── rhel.sh
├── rosa.sh
├── sabayon.sh
├── sailfishos.sh
├── scientific-linux.sh
├── siduction.sh
├── solus.sh
├── sourcemage.sh
├── sparkylinux.sh
├── steamos.sh
├── sulin.sh
├── suse.sh
├── trisquel.sh
├── ubuntu.sh
├── unix-generic.sh
├── unknown.sh
├── void-linux.sh
├── windows-classic.sh
├── windows.sh
└── zorin-os.sh
├── fetch
├── fetch.1
├── lib
├── config.sh
├── detection
│ ├── cpu.sh
│ ├── distro.sh
│ ├── kernel.sh
│ ├── memory.sh
│ ├── os.sh
│ ├── packages.sh
│ ├── shell.sh
│ ├── uptime.sh
│ └── userinfo.sh
└── distro
│ ├── debian
│ └── lib.sh
│ ├── fedora
│ └── lib.sh
│ ├── gentoo
│ └── lib.sh
│ ├── kde-neon
│ └── lib.sh
│ ├── mint
│ └── lib.sh
│ ├── sailfish
│ └── lib.sh
│ ├── suse
│ └── lib.sh
│ └── ubuntu
│ └── lib.sh
└── sample.config.conf
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | keep_padding = true
7 | shell_variant = bash
8 | switch_case_indent = true
9 | binary_next_line = true
10 | space_redirects = true
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: 'core: bug'
6 | assignees: KittyKatt
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Run fetch with '...' flags on '...' system
16 | 2. See error
17 |
18 | **Expected behavior**
19 | A clear and concise description of what you expected to happen.
20 |
21 | **Screenshots**
22 | If applicable, add screenshots to help explain your problem.
23 |
24 | **System Information (please complete the following information):**
25 | - OS/Distribution: [e.g. Ubuntu]
26 | - CPU/Architecture: [e.g. AMD Ryzen 5 x86_64]
27 | - GPU: [e.g. NVIDIA GeForce 1060]
28 | - Output of `fetch --version`
29 | - Do you have Bash installed on your system? Which version? (`bash --version` or `echo ${BASH_VERSION}` inside a Bash shell)
30 |
31 | **Additional context**
32 | Add any other context about the problem here.
33 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest a feature fetch could use
4 | title: ''
5 | labels: 'feature: new'
6 | assignees: KittyKatt
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I wish fetch would do [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/new-distribution-request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: New Distribution Request
3 | about: Use this template to request support for detecting a distribution fetch doesn't
4 | currently detect.
5 | title: ''
6 | labels: 'distro: new, issue: testers needed'
7 | assignees: KittyKatt
8 |
9 | ---
10 |
11 | **Please provide the following information:**
12 | - Distribution name
13 | - Distribution package manger or system
14 | - A link to an image of the distribution's logo
15 | - A link to the distribution's web page (if applicable)
16 |
17 | **Please also run the following commands and include the output in your request:**
18 | - `lsb_release -sirc`
19 | - `lsb-release -sirc`
20 | - `cat /etc/os-release`
21 | - `ls /etc/*-release`
22 |
--------------------------------------------------------------------------------
/.github/git-chglog/CHANGELOG.tpl.md:
--------------------------------------------------------------------------------
1 | {{ range .Versions }}
2 |
3 | ## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }}
4 |
5 | > {{ datetime "2006-01-02" .Tag.Date }}
6 |
7 | {{ range .CommitGroups -}}
8 | ### {{ .Title }}
9 | {{ range .Commits -}}
10 | - {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
11 | {{ end }}
12 | {{ end -}}
13 |
14 | {{- if .RevertCommits -}}
15 | ### Reverts
16 | {{ range .RevertCommits -}}
17 | - {{ .Revert.Header }}
18 | {{ end }}
19 | {{ end -}}
20 |
21 | {{- if .MergeCommits -}}
22 | ### Pull Requests
23 | {{ range .MergeCommits -}}
24 | - {{ .Header }}
25 | {{ end }}
26 | {{ end -}}
27 |
28 | {{- if .NoteGroups -}}
29 | {{ range .NoteGroups -}}
30 | ### {{ .Title }}
31 | {{ range .Notes }}
32 | {{ .Body }}
33 | {{ end }}
34 | {{ end -}}
35 | {{ end -}}
36 | {{ end -}}
37 |
38 | {{- if .Versions }}
39 | [Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
40 | {{ range .Versions -}}
41 | {{ if .Tag.Previous -}}
42 | [{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
43 | {{ end -}}
44 | {{ end -}}
45 | {{ end -}}
--------------------------------------------------------------------------------
/.github/git-chglog/config.yml:
--------------------------------------------------------------------------------
1 | style: github
2 | template: CHANGELOG.tpl.md
3 | info:
4 | title: CHANGELOG
5 | repository_url: https://github.com/KittyKatt/fetch
6 | options:
7 | commits:
8 | filters:
9 | Type:
10 | - feat
11 | - flag
12 | - fix
13 | - perf
14 | - refactor
15 | - dist
16 | - misc
17 | commit_groups:
18 | group_by: Type
19 | sort_by: Title
20 | title_maps:
21 | feat: Features
22 | flag: Flags
23 | fix: Bug Fixes
24 | perf: Performance Improvements
25 | refactor: Code Refactoring
26 | dist: New Distribution
27 | misc: Miscellanious Commits
28 | header:
29 | pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
30 | pattern_maps:
31 | - Type
32 | - Scope
33 | - Subject
34 | notes:
35 | keywords:
36 | - BREAKING CHANGE
--------------------------------------------------------------------------------
/.github/shellcheck-pr.yml.disabled:
--------------------------------------------------------------------------------
1 | name: PR Reviewdog (Shellcheck)
2 | on:
3 | pull_request:
4 | branches:
5 | - master
6 | paths:
7 | - fetch
8 | - sample.config.conf
9 | - lib/*/*.sh
10 | - ascii/*.sh
11 | jobs:
12 | shellcheck:
13 | name: ShellCheck
14 | runs-on: ubuntu-20.04
15 | steps:
16 | - uses: actions/checkout@v1
17 | - name: shellcheck
18 | uses: reviewdog/action-shellcheck@v1
19 | with:
20 | github_token: ${{ secrets.github_token }}
21 | reporter: github-pr-review # Change reporter.
22 | path: "." # Optional.
23 | pattern: "fetch" # Optional.
24 |
--------------------------------------------------------------------------------
/.github/shellcheck.yml.disabled:
--------------------------------------------------------------------------------
1 | name: Shellcheck
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | paths:
8 | - fetch
9 | - sample.config.conf
10 | - lib/*/*.sh
11 | - ascii/*.sh
12 | workflow_dispatch:
13 |
14 | jobs:
15 | shellcheck:
16 | name: Shellcheck
17 | runs-on: ubuntu-20.04
18 | steps:
19 | - uses: actions/checkout@v2
20 | - name: Import Problem Matchers
21 | uses: lumaxis/shellcheck-problem-matchers@v1
22 | - name: Run ShellCheck
23 | run: shellcheck -S warning -a -x -f gcc fetch
24 |
--------------------------------------------------------------------------------
/.github/shfmt.yaml.disabled:
--------------------------------------------------------------------------------
1 | name: Formatting
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | paths:
8 | - fetch
9 | - sample.config.conf
10 | - lib/*/*.sh
11 | - ascii/*.sh
12 | pull_request:
13 | branches:
14 | - master
15 | workflow_dispatch:
16 |
17 | jobs:
18 | sh-checker:
19 | name: shfmt
20 | runs-on: ubuntu-20.04
21 | steps:
22 | - uses: actions/checkout@v1
23 | - name: Run the sh-checker
24 | uses: luizm/action-sh-checker@v0.1.12
25 | env:
26 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 | SHFMT_OPTS: -i 2 -ln bash -ci -sr -kp -s -d
28 | with:
29 | sh_checker_shellcheck_disable: true
30 | sh_checker_comment: true
31 | sh_checker_exclude: ".github"
32 | line-checker:
33 | name: Line Checker
34 | runs-on: ubuntu-20.04
35 | steps:
36 | - uses: actions/checkout@v1
37 | - name: Check line count doesn't exceed 100
38 | run: |
39 | if grep '.\{102\}' fetch; then (exit 1); else (exit 0); fi
40 |
--------------------------------------------------------------------------------
/.github/tests/macos.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | reset=$'\e[0m'
4 | successOut() {
5 | success=$'\033[0m\033[32m'
6 | printf '%b\n' ">> ${success}${1}${reset}"
7 | }
8 | errorOut() {
9 | error=$'\033[0m\033[1;31m'
10 | printf '%b\n' "${error}${1}${reset}"
11 | }
12 |
13 | bash_exe="/usr/local/bin/bash"
14 |
15 | # shellcheck disable=SC2312
16 | if [[ -n $(bash fetch --config sample.config.conf --lib . -v) ]]; then
17 | successOut 'Fetched current output:'
18 | ${bash_exe} fetch --config sample.config.conf --lib . -v
19 | else
20 | errorOut 'fetch failed output:'
21 | ${bash_exe} fetch --config sample.config.conf --lib . -v
22 | exit 1
23 | fi
24 |
--------------------------------------------------------------------------------
/.github/tests/ubuntu.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # TODO: test ASCII output
3 | f=0
4 | reset=$'\e[0m'
5 | successOut() {
6 | success=$'\033[0m\033[32m'
7 | printf '%b\n' ">> ${success}${1}${reset}"
8 | }
9 | errorOut() {
10 | error=$'\033[0m\033[1;31m'
11 | printf '%b\n' "${error}${1}${reset}"
12 | }
13 |
14 | # shellcheck disable=SC2312
15 | if [[ -n $(bash fetch --lib . --config sample.config.conf -v) ]]; then
16 | successOut 'Fetched current output:'
17 | bash fetch --lib . --config sample.config.conf -v
18 | else
19 | errorOut 'fetch failed output:'
20 | bash fetch --lib . --config sample.config.conf -v
21 | exit 1
22 | fi
23 |
24 | # shellcheck disable=SC2016
25 | ascii_expected=' ./+o+-
26 | yyyyy- -yyyyyy+
27 | ://+//////-yyyyyyo
28 | .++ .:/++++++/-.+sss/`
29 | .:++o: /++++++++/:--:/-
30 | o:+o+:++.`..```.-/oo+++++/
31 | .:+o:+o/. `+sssoo+/
32 | .++/+:+oo+o:` /sssooo.
33 | /+++//+:`oo+o /::--:.
34 | +/+o+++`o++o ++////.
35 | .++.o+++oo+:` /dddhhh.
36 | .+.o+oo:. `oddhhhh+
37 | +.++o+o``-````.:ohdhhhhh+
38 | `:o+++ `ohhhhhhhhyo++os:
39 | .o:`.syhhhhhhh/.oo++o`
40 | /osyyyyyyo++ooo+++/
41 | ````` +oo+++o:
42 | `oo++.'
43 | ascii_actual=$(bash fetch --lib . --config sample.config.conf -LN)
44 | if [[ ${ascii_expected} != "${ascii_actual}" ]]; then
45 | errorOut "ASCII did not match expected output."
46 | errorOut "Actual output:"
47 | printf '%b\n' "${ascii_actual}"
48 | errorOut "What we expected:"
49 | printf '%b\n' "${ascii_expected}"
50 | ((f++))
51 | else
52 | successOut "ASCII succeeded"
53 | fi
54 |
55 | # shellcheck disable=SC2312
56 | if [[ ${BASH_VERSINFO[0]} -ge '4' ]]; then
57 | readarray _output < <(bash fetch --lib . --config sample.config.conf -TNv)
58 | else
59 | n=0
60 | IFS=$'\n'
61 | while read -r line; do
62 | _output[${n}]="${line}"
63 | ((n++))
64 | done <<< "$(bash fetch --lib . --config sample.config.conf -TNv)"
65 | fi
66 |
67 | # shellcheck disable=SC2312
68 | if [[ ${_output[*]} =~ ':: Finding kernel...found as '\'[[:print:]]+\''.' ]]; then
69 | if [[ ! ${BASH_REMATCH[0]} =~ 'Linux '[[:digit:]]+'.'[[:digit:]]+'.'[[:digit:]]+'-'[[:digit:]]+ ]]; then
70 | errorOut "!! Failed on kernel."
71 | errorOut "\tfailed line: ${BASH_REMATCH[0]}"
72 | errorOut "\t\$(uname -srm): $(uname -srm)"
73 | ((f++))
74 | else
75 | successOut "Kernel succeeded."
76 | fi
77 | fi
78 |
79 | if [[ ${_output[*]} =~ ':: Finding OS...found as '\'[[:print:]]+\''.' ]]; then
80 | if [[ ! ${BASH_REMATCH[0]} =~ 'Linux'(.*) ]]; then
81 | errorOut "!! Failed on OS."
82 | errorOut "\tfailed line: ${BASH_REMATCH[0]}"
83 | ((f++))
84 | else
85 | successOut "OS succeeded."
86 | fi
87 | fi
88 |
89 | # shellcheck disable=SC2312
90 | if [[ ${_output[*]} =~ ':: Finding user info...found as '\'[[:print:]]+'@'[[:print:]]+\''.' ]]; then
91 | if [[ ! ${BASH_REMATCH[0]} =~ [^[:space:]]+'@'[^[:space:]]+ ]]; then
92 | errorOut "!! Failed on user info."
93 | errorOut "\tfailed line: ${BASH_REMATCH[0]}"
94 | errorOut "\t\${USER}: ${USER}"
95 | errorOut "\t\${HOSTNAME}: ${HOSTNAME}"
96 | errorOut "\t\$(hostname): $(hostname)"
97 | ((f++))
98 | else
99 | successOut "User info succeeded."
100 | fi
101 | fi
102 |
103 | # shellcheck disable=SC2312
104 | if [[ ${_output[*]} =~ ':: Finding distribution...found as '\'[[:print:]]+\''.' ]]; then
105 | if [[ ! ${BASH_REMATCH[0]} =~ 'Ubuntu '[[:digit:]]+'.'[[:digit:]]+[[:space:]](((LTS)[[:space:]])?)'('([[:alnum:]]|[[:space:]])+') x86_64' ]]; then
106 | errorOut "!! Failed on distribution."
107 | errorOut "\tfailed line: ${BASH_REMATCH[0]}"
108 | [[ -n $(type -p lsb_release) || -n $(type -p lsb-release) ]] && errorOut "\t\$(lsb_release -sirc): $(lsb_release -sirc | tr '\r\n' ' ')"
109 | ((f++))
110 | else
111 | successOut "Distribution succeeded."
112 | fi
113 | fi
114 |
115 | # shellcheck disable=SC2312
116 | if [[ ${_output[*]} =~ ':: Finding current uptime...found as '[[:print:]]+\''.' ]]; then
117 | if [[ ! ${BASH_REMATCH[0]} =~ ([[:digit:]]|,|[[:space:]]|[[:alpha:]])+ ]]; then
118 | errorOut "!! Failed on uptime."
119 | errorOut "\tfailed line: ${BASH_REMATCH[0]}"
120 | errorOut "\t\$(uptime): $(uptime)"
121 | ((f++))
122 | else
123 | successOut "Uptime succeeded."
124 | fi
125 | fi
126 |
127 | # shellcheck disable=SC2312,SC2248
128 | if [[ ${_output[*]} =~ ':: Finding current shell...found as '[[:print:]]+\''.' ]]; then
129 | if [[ ! ${BASH_REMATCH[0]} =~ (bash|zsh|ksh|fish)' '[[:digit:]]'.'[[:digit:]]+'.'[[:digit:]]+ ]]; then
130 | errorOut "!! Failed on shell."
131 | errorOut "\tfailed line: ${BASH_REMATCH[0]}"
132 | errorOut "\t\${SHELL}: ${SHELL}"
133 | errorOut "\t\$(ps -e | grep \${PPID}): $(ps --no-headers ${PPID})"
134 | ((f++))
135 | else
136 | successOut "Shell succeeded."
137 | fi
138 | fi
139 |
140 | # shellcheck disable=SC2312
141 | if [[ ${_output[*]} =~ ':: Finding current package count...found as '[[:print:]]+\''.' ]]; then
142 | if [[ ! ${BASH_REMATCH[0]} =~ ([[:digit:]]+[[:space:]][[:punct:]][[:alnum:]]+[[:punct:]]([,]?)([[:space:]]?))+ ]]; then
143 | errorOut "!! Failed on package count."
144 | errorOut "\tfailed line: ${BASH_REMATCH[0]}"
145 | if [[ -n $(type -p apt) ]]; then
146 | errorOut "\t\$(dpkg-query -W | wc -l): $(dpkg-query -W | wc -l)"
147 | else
148 | errorOut "\tapt doesn't exist"
149 | fi
150 | ((f++))
151 | else
152 | successOut "Package count succeeded."
153 | fi
154 | fi
155 |
156 | if [[ ${_output[*]} =~ ':: Finding CPU...found as '[[:print:]]+\''.' ]]; then
157 | if [[ ! ${BASH_REMATCH[0]} =~ (AMD|Intel)[[:space:]][[:alnum:][:space:]]+[[:punct:]][[:digit:]]+[[:punct:]][[:space:]]+(@)[[:space:]][[:digit:][:punct:]]+'GHz' ]]; then
158 | errorOut "!! Failed on CPU."
159 | errorOut "\tfailed line: ${BASH_REMATCH[0]}"
160 | _cpufiletest="$(awk -F '\\s*: | @' \
161 | '/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {
162 | cpu=$2; if ($1 == "Hardware") exit } END { print cpu }' /proc/cpuinfo)"
163 | errorOut "\t\/proc/cpuinfo parsing: ${_cpufiletest}"
164 | ((f++))
165 | else
166 | successOut "CPU succeeded."
167 | fi
168 | fi
169 |
170 | if [[ ${_output[*]} =~ ':: Finding memory usage...found as '[[:print:]]+\''.' ]]; then
171 | if [[ ! ${BASH_REMATCH[0]} =~ ([[:digit:]])+(MiB|KiB)' / '([[:digit:]])+(MiB|KiB)' ('([[:digit:]])+'%)' ]]; then
172 | errorOut "!! Failed on memory."
173 | errorOut "\tfailed line: ${BASH_REMATCH[0]}"
174 | ((f++))
175 | else
176 | successOut "Memory succeeded."
177 | fi
178 | fi
179 |
180 | printf '\n'
181 | successOut "Execution time: "
182 | # shellcheck disable=SC2312
183 | time bash fetch -c sample.config.conf -l . 2> /dev/null 1>&2
184 |
185 | if ((f == 0)); then
186 | exit 0
187 | else
188 | errorOut "failures: ${f}"
189 | exit 1
190 | fi
191 |
--------------------------------------------------------------------------------
/.github/tests/windows.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | reset=$'\e[0m'
4 | successOut() {
5 | success=$'\033[0m\033[32m'
6 | printf '%b\n' ">> ${success}${1}${reset}"
7 | }
8 | errorOut() {
9 | error=$'\033[0m\033[1;31m'
10 | printf '%b\n' "${error}${1}${reset}"
11 | }
12 |
13 | # shellcheck disable=SC2312
14 | if [[ -n $(bash fetch --config sample.config.conf --lib . -v) ]]; then
15 | successOut 'Fetched current output:'
16 | bash fetch --config sample.config.conf --lib . -v
17 | else
18 | errorOut 'fetch failed output:'
19 | bash fetch --config sample.config.conf --lib . -v
20 | exit 1
21 | fi
22 |
--------------------------------------------------------------------------------
/.github/workflows/release.yaml:
--------------------------------------------------------------------------------
1 | name: Package and Release
2 | on:
3 | push:
4 | tags:
5 | - "v*.*.*"
6 | - "v*.*"
7 |
8 | env:
9 | APP_NAME: "fetch"
10 | MAINTAINER: "Katie Bohnenkamper "
11 | DESC: "fetch is a BASH screenshot, system information, and distribution ASCII logo display tool."
12 | HOMEPAGE: "https://github.com/KittyKatt/fetch"
13 |
14 | jobs:
15 | build-debian-package:
16 | runs-on: ubuntu-latest
17 | steps:
18 | - uses: actions/checkout@v1
19 | - uses: FranzDiebold/github-env-vars-action@v2
20 | - name: Create package structure
21 | run: |
22 | mkdir -p deb_pkg/usr/share/fetch
23 | mldor -p deb_pkg/usr/share/man/man.1
24 | mkdir -p deb_pkg/usr/local/bin
25 | cp -r ascii lib deb_pkg/usr/share/fetch/
26 | cp LICENSE README.md sample.config.conf deb_pkg/usr/share/fetch/
27 | cp fetch deb_pkg/usr/local/bin/
28 | cp fetch.1 deb_pkg/usr/share/man/man.1/
29 | - name: Build some variables to use
30 | run: |
31 | PVERSION=${{ env.CI_REF_NAME }}
32 | echo "PVERSION=${PVERSION//v/}" >> ${GITHUB_ENV}
33 | echo PDEPENDS="-d 'bash (>4)' -d 'awk' -d 'pciutils' -d 'procps'" >> $GITHUB_ENV
34 | - name: Run NPM to create Debian package
35 | uses: bpicode/github-action-fpm@master
36 | id: deb_build
37 | with:
38 | fpm_args: "./"
39 | fpm_opts: '--log warn -t deb -a all -n ${{ env.APP_NAME }} -v ${{ env.PVERSION }} -m "${{ env.MAINTAINER }}" --description "${{ env.DESC }}" --url "${{ env.HOMEPAGE }}" --license MIT --category ''Utils'' --deb-priority ''extra'' ${{ env.PDEPENDS }} -C deb_pkg -s dir'
40 | - name: Check output files
41 | run: |
42 | ls -l *.deb
43 | echo "Package information:"
44 | dpkg -I *.deb
45 | echo "Package contents:"
46 | dpkg -c *.deb
47 | - name: Upload DPKG artifact
48 | uses: actions/upload-artifact@v2
49 | with:
50 | name: artifact-deb
51 | path: |
52 | ./*.deb
53 | build-rpm-package:
54 | runs-on: ubuntu-latest
55 | steps:
56 | - uses: actions/checkout@v1
57 | - uses: FranzDiebold/github-env-vars-action@v2
58 | - name: Install RPM tools
59 | run: |
60 | sudo apt update
61 | sudo apt install -y rpm
62 | - name: Create package structure
63 | run: |
64 | mkdir -p rpm_pkg/usr/share/fetch
65 | mkdir -p rpm_pkg/usr/local/bin
66 | mkdir -p rpm_pkg/usr/share/man/man.1
67 | cp -r ascii lib rpm_pkg/usr/share/fetch/
68 | cp LICENSE README.md sample.config.conf rpm_pkg/usr/share/fetch/
69 | cp fetch rpm_pkg/usr/local/bin/
70 | cp fetch.1 /usr/share/man/man.1/
71 | - name: Build some variables to use
72 | run: |
73 | PVERSION=${{ env.CI_REF_NAME }}
74 | echo "PVERSION=${PVERSION//v/}" >> ${GITHUB_ENV}
75 | echo PDEPENDS="-d 'bash>=4.0' -d 'awk' -d 'pciutils' -d 'coreutils' -d 'grep'" >> $GITHUB_ENV
76 | - name: Run NPM to create Red Hat package
77 | uses: bpicode/github-action-fpm@master
78 | id: rpm_build
79 | with:
80 | fpm_args: "./"
81 | fpm_opts: '--log warn -t rpm -a noarch -n ${{ env.APP_NAME }} -v ${{ env.PVERSION }} -m "${{ env.MAINTAINER }}" --description "${{ env.DESC }}" --url "${{ env.HOMEPAGE }}" --license MIT --category ''Productivity/Text/Utilities'' ${{ env.PDEPENDS }} -C rpm_pkg -s dir'
82 | - name: Check output files
83 | run: |
84 | ls -l *.rpm
85 | echo "Packing Information:"
86 | rpm -qip *.rpm
87 | echo "Packge Dependencies:"
88 | rpm -qRp *.rpm
89 | echo "Package Contents:"
90 | rpm -qlp *.rpm
91 | - name: Upload RPM artifact
92 | uses: actions/upload-artifact@v2
93 | with:
94 | name: artifact-rpm
95 | path: |
96 | ./*.rpm
97 |
98 | create-release:
99 | runs-on: ubuntu-latest
100 | needs:
101 | - build-debian-package
102 | - build-rpm-package
103 | steps:
104 | - uses: actions/checkout@v1
105 | - uses: FranzDiebold/github-env-vars-action@v2
106 | - name: Generate changelog
107 | run: |
108 | wget https://github.com/git-chglog/git-chglog/releases/download/0.9.1/git-chglog_linux_amd64
109 | chmod +x git-chglog_linux_amd64
110 | mv git-chglog_linux_amd64 git-chglog
111 | ./git-chglog --config .github/git-chglog/config.yml --output ./changelog $(git describe --tags $(git rev-list --tags --max-count=1))
112 | - uses: actions/download-artifact@v2
113 | name: Download package artifacts
114 | - name: Prepare release name
115 | run: |
116 | RELEASE=${{ github.ref }}
117 | echo "RELEASE=${RELEASE//refs\/tags\/v}" >> ${GITHUB_ENV}
118 | - name: Create release
119 | uses: softprops/action-gh-release@v1
120 | with:
121 | body_path: ./changelog
122 | tag_name: ${{ env.CI_REF_NAME }}
123 | name: Version ${{ env.RELEASE }}
124 | draft: false
125 | prerelease: false
126 | files: |
127 | artifact-rpm/*.rpm
128 | artifact-deb/*.deb
129 | env:
130 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131 |
--------------------------------------------------------------------------------
/.github/workflows/shiftleft-analysis.yml:
--------------------------------------------------------------------------------
1 | # This workflow integrates Scan with GitHub's code scanning feature
2 | # Scan is a free open-source security tool for modern DevOps teams from ShiftLeft
3 | # Visit https://slscan.io/en/latest/integrations/code-scan for help
4 | name: Shiftleft Analysis
5 |
6 | on:
7 | push:
8 | branches: [master]
9 | paths:
10 | - fetch
11 | - sample.config.conf
12 | - lib/*/*.sh
13 | - ascii/*.sh
14 | pull_request:
15 | # The branches below must be a subset of the branches above
16 | branches: [master]
17 | paths:
18 | - fetch
19 | - sample.config.conf
20 | - lib/*/*.sh
21 | - ascii/*.sh
22 | schedule:
23 | - cron: "33 0 * * 1"
24 |
25 | jobs:
26 | Scan-Build:
27 | # Scan runs on ubuntu, mac and windows
28 | runs-on: ubuntu-latest
29 | steps:
30 | - uses: actions/checkout@v2
31 | # Instructions
32 | # 1. Setup JDK, Node.js, Python etc depending on your project type
33 | # 2. Compile or build the project before invoking scan
34 | # Example: mvn compile, or npm install or pip install goes here
35 | # 3. Invoke Scan with the github token. Leave the workspace empty to use relative url
36 |
37 | - name: Perform Scan
38 | uses: ShiftLeftSecurity/scan-action@master
39 | env:
40 | WORKSPACE: ""
41 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 | SCAN_AUTO_BUILD: true
43 | with:
44 | output: reports
45 | # Scan auto-detects the languages in your project. To override uncomment the below variable and set the type
46 | # type: credscan,java
47 | # type: python
48 |
49 | - name: Upload report
50 | uses: github/codeql-action/upload-sarif@v1
51 | with:
52 | sarif_file: reports
53 |
--------------------------------------------------------------------------------
/.github/workflows/test-workflows.yaml:
--------------------------------------------------------------------------------
1 | name: "Output Tests - Workflow Tests"
2 | on:
3 | push:
4 | branches:
5 | - workflows
6 | workflow_dispatch:
7 |
8 | jobs:
9 | test-ubuntu:
10 | runs-on: ubuntu-20.04
11 | steps:
12 | - uses: actions/checkout@v2.3.4
13 | - name: Testing known Ubuntu output
14 | run: bash .github/tests/ubuntu.sh
15 | test-macos:
16 | runs-on: macos-latest
17 | steps:
18 | - uses: actions/checkout@v2.3.4
19 | - name: Testing known macOS output
20 | run: |
21 | brew install bash
22 | /usr/local/bin/bash .github/tests/macos.sh
23 | test-windows:
24 | runs-on: windows-2019
25 | steps:
26 | - uses: actions/checkout@v2.3.4
27 | - name: Testing known Windows output
28 | run: bash .github/tests/windows.sh
29 |
--------------------------------------------------------------------------------
/.github/workflows/tests.yaml:
--------------------------------------------------------------------------------
1 | name: "Output Tests"
2 | on:
3 | pull_request:
4 | branches: [master]
5 | push:
6 | branches:
7 | - master
8 | paths:
9 | - fetch
10 | - sample.config.conf
11 | - lib/*/*.sh
12 | - ascii/*.sh
13 | workflow_dispatch:
14 |
15 | jobs:
16 | test-ubuntu:
17 | runs-on: ubuntu-20.04
18 | steps:
19 | - uses: actions/checkout@v2.3.4
20 | - name: Testing known Ubuntu output
21 | run: bash .github/tests/ubuntu.sh
22 | test-macos:
23 | runs-on: macos-latest
24 | steps:
25 | - uses: actions/checkout@v2.3.4
26 | - name: Testing known macOS output
27 | run: |
28 | brew install bash
29 | /usr/local/bin/bash .github/tests/macos.sh
30 | test-windows:
31 | runs-on: windows-2019
32 | steps:
33 | - uses: actions/checkout@v2.3.4
34 | - name: Testing known Windows output
35 | run: bash .github/tests/windows.sh
36 |
--------------------------------------------------------------------------------
/.github/workflows/trunk-io.yaml:
--------------------------------------------------------------------------------
1 | name: "Trunk (Linting and Formatting)"
2 | on:
3 | pull_request:
4 | branches: [master]
5 | push:
6 | branches:
7 | - master
8 | - workflows
9 | workflow_dispatch:
10 |
11 | jobs:
12 | trunk-checks:
13 | runs-on: ubuntu-20.04
14 | steps:
15 | - uses: actions/checkout@v1
16 | - name: Trunk Check
17 | uses: trunk-io/trunk-action@v1.0.1
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | tools
--------------------------------------------------------------------------------
/.markdownlint.yaml:
--------------------------------------------------------------------------------
1 | # Autoformatter friendly markdownlint config (all formatting rules disabled)
2 | default: true
3 | blank_lines: false
4 | bullet: false
5 | html: false
6 | indentation: false
7 | line_length: false
8 | spaces: false
9 | url: false
10 | whitespace: false
11 |
--------------------------------------------------------------------------------
/.shellcheckrc:
--------------------------------------------------------------------------------
1 | enable=all
2 | source-path=SCRIPTDIR
3 | disable=SC2154
4 |
5 | # If you're having issues with shellcheck following source, disable the errors via:
6 | # disable=SC1090
7 | # disable=SC1091
8 |
--------------------------------------------------------------------------------
/.trunk/.gitignore:
--------------------------------------------------------------------------------
1 | *out
2 |
--------------------------------------------------------------------------------
/.trunk/trunk.yaml:
--------------------------------------------------------------------------------
1 | version: 0.1
2 | cli:
3 | version: 0.11.0-beta
4 | lint:
5 | enabled:
6 | - actionlint@1.6.9
7 | - gitleaks@8.3.0
8 | - markdownlint@0.31.1
9 | - prettier@2.5.1
10 | - shellcheck@0.8.0
11 | - shfmt@3.4.0
12 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.eol": "\n",
3 | "files.insertFinalNewline": true,
4 | "editor.detectIndentation": false,
5 | "editor.insertSpaces": true,
6 | "workbench.editor.highlightModifiedTabs": true,
7 | "[yaml]": {
8 | "editor.insertSpaces": true,
9 | "editor.tabSize": 2,
10 | "editor.autoIndent": "advanced",
11 | "gitlens.codeLens.scopes": ["document"]
12 | },
13 | "editor.tabSize": 2
14 | }
15 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Brett Bohnenkamper
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # fetch
2 |
3 | A BASH system information and distribution logo display tool.
4 |
5 |   
6 |
7 | [](https://github.com/KittyKatt/fetch/actions/workflows/tests.yaml) [](https://github.com/KittyKatt/fetch/actions/workflows/shellcheck.yml) [](https://github.com/KittyKatt/fetch/actions/workflows/shiftleft-analysis.yml) [](https://github.com/KittyKatt/fetch/actions/workflows/release.yaml)
8 |
9 | ## What is fetch?
10 |
11 | fetch is the spiritual successor to [screenFetch](https://github.com/KittyKatt/screenFetch). screenFetch was created over the course of 10 years and me learning BASH from nothing, now fetch has been created and worked on after all of that.
12 |
13 | fetch aims to keep the following philosophies:
14 |
15 | - Keep It Simple, Stupid. fetch does its best to follow this philosophy while also being complex enough to be modular and as light as you need it to be. While packaging fetch, if you really only wanted to package the necessary components for it to run on your distribution, you'd only need to package fetch, the manpage, the config, and the distro-specific ASCII (+ lib.sh where applicable). You wouldn't need the 100+ files that make up the full fetch installation.
16 | - If the user can't figure out how to use it, that's a bug. If it's not simple to use, that's a bug. If it's not readable, that's a bug.
17 | - Stay true to the original spirit of screenFetch as much as possible while still being a wholly different script.
18 |
19 | ## So...why make fetch?
20 |
21 | Over the past several years, I've received a couple of pretty repeatable complaints about screenFetch. Even had a hit piece wrote on it tearing it down line by line once upon a time. Some core complaints about screenFetch have been:
22 |
23 | - Totally unstandardized use of brackets, quotes, braces, you name it. As mentioned, screenFetch was first started in 2009, when I was a senior in high school. I knew very little about BASH aside from small shell scripts and just using it as my shell. I continued to grow and maintain it over the next 10 years learning much along the way. However, I almost never revisited older sections of the script, resulting in totally different coding styles and inefficient information gathering in the older sections. fetch aims to solve that by hopefully keeping an easy to use coding standard throughout.
24 | - Monolithic, 15k line BASH script. While this was done to keep one of screenFetch's original core functionalities in place (the ability to `wget` the raw file, `chmod +x` to it, and run it as a one-liner), it has become a bear of a script to maintain, work on, and read. fetch aims to fix some of that, while breaking the aforementioned functionality, by splitting ASCII art and distribution/OS specific code into mostly separate, sourceable lib files. This will keep fetch very packageable and only as big as it needs to be to get all the information about your running system.
25 | - No persistent configuration / have to run every single time with tons of flags if you wanna do off the wall stuff. screenFetch had a couple of nice, interesting flags to alter the output of the script. However, if you wanted to do several modifications to the output, you had to either 1) alias the one-liner to something shorter or 2) remember all those flags and values every time you wanted to run it. fetch solves that by implementing a configuration file that is well commented and easy to follow. As fetch grows and I work in most of the screenFetch functionality, that configuration will grow to include many more configurable things. You should not have to do any major, huge editing to the configuration logic to include new functions and configuration sections, either.
26 |
27 | ## License
28 |
29 | Components pulled from [screenFetch](https://github.com/KittyKatt/screenFetch) that were pulled in by external contributors are licensed under the GPLv3+ license. You can find this license at [LICENSE.gpl](LICENSE.gpl).
30 |
31 | Everything else here is licensed under the MIT license.
32 |
--------------------------------------------------------------------------------
/ascii/aldos.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 25
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light grey') # light grey
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} # ## #
12 | ${c1} # ######## #
13 | ${c1} # ### ######## #
14 | ${c1} # #### ######### #
15 | ${c1} # #### # # # # #### #
16 | ${c1} # ##### # ##### #
17 | ${c1} # ###### ##### #### #
18 | ${c1} # ############### #
19 | ${c1}
20 | ${c2} _ ___ ___ ___
21 | ${c2} __ _| | \ / _ \/ __|
22 | ${c2} / _' | | |) | (_) \__ \
23 | ${c2} \__,_|_|___/ \___/|___/
24 | ${c1}
25 | ${c1}
26 | EOF
27 |
--------------------------------------------------------------------------------
/ascii/alpine-linux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 34
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light blue
7 | c2=$(getColor 'blue') # Blue
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} ................
12 | ${c1} ∴::::::::::::::::∴
13 | ${c1} ∴::::::::::::::::::∴
14 | ${c1} ∴::::::::::::::::::::∴
15 | ${c1} ∴:::::::. :::::':::::::∴
16 | ${c1} ∴:::::::. ;::; ::::::::∴
17 | ${c1} ∴::::::; ∵ :::::::∴
18 | ${c1} ∴:::::. . .::::::∴
19 | ${c1} :::::: :::. . ::::::
20 | ${c1} ∵:::: ::::::. ::. ::::∵
21 | ${c1} ∵:.. .:;::::::: :::. :::∵
22 | ${c1} ∵::::::::::::::::::::::::∵
23 | ${c1} ∵::::::::::::::::::::::∵
24 | ${c1} ∵::::::::::::::::::::∵
25 | ${c1} ::::::::::::::::::::
26 | ${c1} ∵::::::::::::::::∵
27 | EOF
28 |
--------------------------------------------------------------------------------
/ascii/amazon-linux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 40
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor '214') # Light Orange (214/#ffaf00)
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} .,:cc:,.
11 | ${c1} .:okXWMMMMMMWXko:.
12 | ${c1} .:kNMMMMMMMMMMMMMMMMMMNkc.
13 | ${c1} cc,. `':ox0XWWXOxo:'` .,c;
14 | ${c1} KMMMMXOdc,. '' .,cdOXWMMMO
15 | ${c1} KMMMMMMMMMMWXO. .OXWMMMMMMMMMMO
16 | ${c1} KMMMMMMMMMMMMM, ,MMMMMMMMMMMMMO
17 | ${c1} KMMMMMMMMMMMMM, ,MMMMMMMMMMMMMO
18 | ${c1} KMMMMMMMMMMMMM, ,MMMMMMMMMMMMMO
19 | ${c1} KMMMMMMMMMMMMM, ,MMMMMMMMMMMMMO
20 | ${c1} KMMMMMMMMMMMMM, ,MMMMMMMMMMMMMO
21 | ${c1} KMMMMMMMMMMMMM, ,MMMMMMMMMMMMMk
22 | ${c1} KMMMMMMMMMMMMM, ,MMMMMMMMMMMMMd
23 | ${c1} `:lx0WMMMMMMMM, ,MMMMMMMMW0xl:`
24 | ${c1} `'lx0NMM, ,MMN0xc'`
25 | ${c1} `'' ''`
26 | EOF
27 |
--------------------------------------------------------------------------------
/ascii/android.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 24
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light green') # Bold Green
7 | fi
8 | startline="1"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} ╲ ▁▂▂▂▁ ╱
11 | ${c1} ▄███████▄
12 | ${c1} ▄██ ███ ██▄
13 | ${c1} ▄███████████▄
14 | ${c1} ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄ █▄
15 | ${c1} ██ █████████████ ██
16 | ${c1} ██ █████████████ ██
17 | ${c1} ██ █████████████ ██
18 | ${c1} ██ █████████████ ██
19 | ${c1} █████████████
20 | ${c1} ███████████
21 | ${c1} ██ ██
22 | ${c1} ██ ██
23 | EOF
24 |
--------------------------------------------------------------------------------
/ascii/arch-linux-old.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 37
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light blue') # Light Blue
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} __
12 | ${c1} _=(SDGJT=_
13 | ${c1} _GTDJHGGFCVS)
14 | ${c1} ,GTDJGGDTDFBGX0
15 | ${c1} JDJDIJHRORVFSBSVL${c2}-=+=,_
16 | ${c1} IJFDUFHJNXIXCDXDSV,${c2} "DEBL
17 | ${c1} [LKDSDJTDU=OUSCSBFLD.${c2} '?ZWX,
18 | ${c1} ,LMDSDSWH' `DCBOSI${c2} DRDS],
19 | ${c1} SDDFDFH' !YEWD,${c2} )HDROD
20 | ${c1} !KMDOCG &GSU|${c2}_GFHRGO'
21 | ${c1} HKLSGP'${c2} __${c1}TKM0${c2}GHRBV)'
22 | ${c1} JSNRVW'${c2} __+MNAEC${c1}IOI,${c2}BN'
23 | ${c1} HELK['${c2} __,=OFFXCBGHC${c1}FD)
24 | ${c1} ?KGHE ${c2}_-#DASDFLSV='${c1} 'EF
25 | ${c1} 'EHTI !H
26 | ${c1} `0F' '!
27 | ${c1}
28 | ${c1}
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/arch-linux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 38
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light cyan') # Light
7 | c2=$(getColor 'cyan') # Dark
8 | fi
9 | startline="1"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} -`
12 | ${c1} .o+`
13 | ${c1} `ooo/
14 | ${c1} `+oooo:
15 | ${c1} `+oooooo:
16 | ${c1} -+oooooo+:
17 | ${c1} `/:-:++oooo+:
18 | ${c1} `/++++/+++++++:
19 | ${c1} `/++++++++++++++:
20 | ${c1} `/+++o${c2}oooooooo${c1}oooo/`
21 | ${c2} ${c1}./${c2}ooosssso++osssssso${c1}+`
22 | ${c2} .oossssso-````/ossssss+`
23 | ${c2} -osssssso. :ssssssso.
24 | ${c2} :osssssss/ osssso+++.
25 | ${c2} /ossssssss/ +ssssooo/-
26 | ${c2} `/ossssso+/:- -:/+osssso+-
27 | ${c2} `+sso+:-` `.-/+oso:
28 | ${c2} `++:. `-/+/
29 | ${c2} .` `/
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/arcolinux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 41
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor '111') # Light Blue (#87afff,111)
7 | c2=$(getColor 'white') # White
8 | fi
9 | startline="1"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} /-
12 | ${c1} ooo:
13 | ${c1} yoooo/
14 | ${c1} yooooooo
15 | ${c1} yooooooooo
16 | ${c1} yooooooooooo
17 | ${c1} .yooooooooooooo
18 | ${c1} .oooooooooooooooo
19 | ${c1} .oooooooarcoooooooo
20 | ${c1} .ooooooooo-oooooooooo
21 | ${c1} .ooooooooo- oooooooooo
22 | ${c1} :ooooooooo. :ooooooooo
23 | ${c1} :ooooooooo. :ooooooooo
24 | ${c1} :oooarcooo .oooarcooo
25 | ${c1} :ooooooooy .ooooooooo
26 | ${c1} :ooooooooo ${c2}/ooooooooooooooooooo${c1}
27 | ${c1} :ooooooooo ${c2}.-ooooooooooooooooo.${c1}
28 | ${c1} ooooooooo- ${c2}-ooooooooooooo.${c1}
29 | ${c1} ooooooooo- ${c2}.-oooooooooo.${c1}
30 | ${c1}ooooooooo. ${c2}-ooooooooo${c1}
31 | EOF
32 |
--------------------------------------------------------------------------------
/ascii/artix-linux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 38
4 | # number of colors: 4
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'cyan') # Cyan
7 | c2=$(getColor 'blue') # Blue
8 | c3=$(getColor 'green') # Green
9 | c4=$(getColor 'dark grey') # Dark Grey
10 | fi
11 | startline="1"
12 | read -rd '' asciiLogo << 'EOF'
13 | ${c1} d${c2}c.
14 | ${c1} x${c2}dc.
15 | ${c1} '.${c4}.${c1} d${c2}dlc.
16 | ${c1} c${c2}0d:${c1}o${c2}xllc;
17 | ${c1} :${c2}0ddlolc,lc,
18 | ${c1} :${c1}ko${c4}.${c1}:${c2}0ddollc..dlc.
19 | ${c1} ;${c1}K${c2}kxoOddollc' cllc.
20 | ${c1} ,${c1}K${c2}kkkxdddllc, ${c4}.${c2}lll:
21 | ${c1} ,${c1}X${c2}kkkddddlll;${c3}...';${c1}d${c2}llll${c3}dxk:
22 | ${c1} ,${c1}X${c2}kkkddddllll${c3}oxxxddo${c2}lll${c3}oooo,
23 | ${c3} xxk${c1}0${c2}kkkdddd${c1}o${c2}lll${c1}o${c3}ooooooolooooc;${c1}.
24 | ${c3} ddd${c2}kkk${c1}d${c2}ddd${c1}ol${c2}lc:${c3}:;,'.${c3}... .${c2}lll;
25 | ${c1} .${c3}xd${c1}x${c2}kk${c1}xd${c2}dl${c1}'cl:${c4}. ${c2}.llc,
26 | ${c1} .${c1}0${c2}kkkxddl${c4}. ${c2};'${c4}. ${c2};llc.
27 | ${c1} .${c1}K${c2}Okdcddl${c4}. ${c2}cllc${c4}.
28 | ${c1} 0${c2}Okd''dc. .cll;
29 | ${c1} k${c2}Okd' .llc,
30 | ${c1} d${c2}Od, 'lc.
31 | ${c1} :,${c4}. ${c2}...
32 | ${c1}
33 | EOF
34 |
--------------------------------------------------------------------------------
/ascii/blackpanther-os.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 38
4 | # number of colors: 4
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'yellow') # Yellow
7 | c2=$(getColor 'white') # White
8 | c3=$(getColor 'light red') # Light Red
9 | c4=$(getColor 'dark grey') # Dark Grey
10 | fi
11 | startline="0"
12 | read -rd '' asciiLogo << 'EOF'
13 | ${c4} oxoo
14 | ${c4} ooooooxxxxxxxx
15 | ${c4} oooooxxxxxxxxxx${c3}O${c1}o.${c4}xx
16 | ${c4} oo# ###xxxxxxxxxxx###xxx
17 | ${c4} oo .oooooxxxxxxxxx## #oxx
18 | ${c4} o ##xxxxxxxxx###x## .o###
19 | ${c4} .oxxxxxxxx### ox .
20 | ${c4} ooxxxx#xxxxxx o##
21 | ${c4}.oxx# #oxxxxx#
22 | ${c4}ox# ooxxxxxx# o
23 | ${c4}x# ooxxxxxxxx ox ox
24 | ${c4}x# .oxxxxxxxxxxx o# oox
25 | ${c4}# oxxxxx##xxxxxxooooooo# o#
26 | ${c4} .oxxxxxooxxxxxx###### ox#
27 | ${c4} oxxxxxo oxxxxxxxx oox##
28 | ${c4} oxxxxxx oxxxxxxxxxo oooox##
29 | ${c4} o#xxxxx oxxxxxxxxxxxxxxxx##
30 | ${c4} ##xxxxx o#xxxxxxxxxxxxx##
31 | ${c4} ##xxxx o#xxxxxxxxx##
32 | ${c4} ###xo. o##xxx###
33 | ${c4}
34 | EOF
35 |
--------------------------------------------------------------------------------
/ascii/bunsenlabs.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 25
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'blue') # Blue
7 | fi
8 | startline="5"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} HC]
11 | ${c1} H]]]]
12 | ${c1} H]]]]]]4
13 | ${c1} @C]]]]]]]]*
14 | ${c1} @]]]]]]]]]]xd
15 | ${c1} @]]]]]]]]]]]]]d
16 | ${c1} 0]]]]]]]]]]]]]]]]
17 | ${c1} kx]]]]]]x]]x]]]]]%%
18 | ${c1} #x]]]]]]]]]]]]]x]]]d
19 | ${c1} #]]]]]]qW x]]x]]]]]4
20 | ${c1} k]x]]xg %%x]]]]]]%%
21 | ${c1} Wx]]]W x]]]]]]]
22 | ${c1} #]]]4 xx]]x]]
23 | ${c1} px] ]]]]]x
24 | ${c1} Wx] x]]x]]
25 | ${c1} &x x]]]]
26 | ${c1} m x]]]]
27 | ${c1} x]x]
28 | ${c1} x]]]
29 | ${c1} ]]]]
30 | ${c1} x]x
31 | ${c1} x]q
32 | ${c1} ]g
33 | ${c1} q
34 | EOF
35 |
--------------------------------------------------------------------------------
/ascii/centos.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 40
4 | # number of colors: 4
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'yellow') # Yellow
7 | c2=$(getColor 'light green') # Light Green
8 | c3=$(getColor 'light blue') # Light Blue
9 | c4=$(getColor 'light purple') # Light Purple
10 | fi
11 | startline="0"
12 | read -rd '' asciiLogo << 'EOF'
13 | ${c1} ..
14 | ${c1} .PLTJ.
15 | ${c1} <><><><>
16 | ${c2} KKSSV' 4KKK ${c1}LJ${c4} KKKL.'VSSKK
17 | ${c2} KKV' 4KKKKK ${c1}LJ${c4} KKKKAL 'VKK
18 | ${c2} V' ' 'VKKKK ${c1}LJ${c4} KKKKV' ' 'V
19 | ${c2} .4MA.' 'VKK ${c1}LJ${c4} KKV' '.4Mb.
20 | ${c4} . ${c2}KKKKKA.' 'V ${c1}LJ${c4} V' '.4KKKKK ${c3}.
21 | ${c4} .4D ${c2}KKKKKKKA.'' ${c1}LJ${c4} ''.4KKKKKKK ${c3}FA.
22 | ${c4}
23 | ${c4} 'VD ${c3}KKKKKKKK'.. ${c2}LJ ${c1}..'KKKKKKKK ${c3}FV
24 | ${c4} ' ${c3}VKKKKK'. .4 ${c2}LJ ${c1}K. .'KKKKKV ${c3}'
25 | ${c3} 'VK'. .4KK ${c2}LJ ${c1}KKA. .'KV'
26 | ${c3} A. . .4KKKK ${c2}LJ ${c1}KKKKA. . .4
27 | ${c3} KKA. 'KKKKK ${c2}LJ ${c1}KKKKK' .4KK
28 | ${c3} KKSSA. VKKK ${c2}LJ ${c1}KKKV .4SSKK
29 | ${c2} <><><><>
30 | ${c2} 'MKKM'
31 | ${c2} ''
32 | EOF
33 |
--------------------------------------------------------------------------------
/ascii/chakra.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 38
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} _ _ _ "kkkkkkkk.
11 | ${c1} ,kkkkkkkk., 'kkkkkkkkk,
12 | ${c1} ,kkkkkkkkkkkk., 'kkkkkkkkk.
13 | ${c1} ,kkkkkkkkkkkkkkkk,'kkkkkkkk,
14 | ${c1} ,kkkkkkkkkkkkkkkkkkk'kkkkkkk.
15 | ${c1} "''"''',;::,,"''kkk''kkkkk; __
16 | ${c1} ,kkkkkkkkkk, "k''kkkkk' ,kkkk
17 | ${c1} ,kkkkkkk' ., ' .: 'kkkk',kkkkkk
18 | ${c1} ,kkkkkkkk'.k' , ,kkkk;kkkkkkkkk
19 | ${c1} ,kkkkkkkk';kk 'k "'k',kkkkkkkkkkkk
20 | ${c1} .kkkkkkkkk.kkkk.'kkkkkkkkkkkkkkkkkk'
21 | ${c1} ;kkkkkkkk''kkkkkk;'kkkkkkkkkkkkk''
22 | ${c1} 'kkkkkkk; 'kkkkkkkk.,""''"''""
23 | ${c1} ''kkkk; 'kkkkkkkkkk.,
24 | ${c1} ';' 'kkkkkkkkkkkk.,
25 | ${c1} ';kkkkkkkkkk'
26 | ${c1} ';kkkkkk'
27 | ${c1} "''"
28 | EOF
29 |
--------------------------------------------------------------------------------
/ascii/chrome-os.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 38
4 | # number of colors: 5
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light green') # Green
7 | c2=$(getColor 'light red') # Light Red
8 | c3=$(getColor 'yellow') # Bold Yellow
9 | c4=$(getColor 'light blue') # Light Blue
10 | c5=$(getColor 'white') # White
11 | fi
12 | startline="0"
13 | read -rd '' asciiLogo << 'EOF'
14 | ${c2} .,:loool:,.
15 | ${c2} .,coooooooooooooc,.
16 | ${c2} .,lllllllllllllllllllll,.
17 | ${c2} ;ccccccccccccccccccccccccc;
18 | ${c1} '${c2}ccccccccccccccccccccccccccccc.
19 | ${c1} ,oo${c2}c::::::::okO${c5}000${c3}0OOkkkkkkkkkkk:
20 | ${c1} .ooool${c2};;;;:x${c5}K0${c4}kxxxxxk${c5}0X${c3}K0000000000.
21 | ${c1} :oooool${c2};,;O${c5}K${c4}ddddddddddd${c5}KX${c3}000000000d
22 | ${c1} lllllool${c2};l${c5}N${c4}dllllllllllld${c5}N${c3}K000000000
23 | ${c1} lllllllll${c2}o${c5}M${c4}dccccccccccco${c5}W${c3}K000000000
24 | ${c1} ;cllllllllX${c5}X${c4}c:::::::::c${c5}0X${c3}000000000d
25 | ${c1} .ccccllllllO${c5}Nk${c4}c;,,,;cx${c5}KK${c3}0000000000.
26 | ${c1} .cccccclllllxOO${c5}OOO${c1}Okx${c3}O0000000000;
27 | ${c1} .:ccccccccllllllllo${c3}O0000000OOO,
28 | ${c1} ,:ccccccccclllcd${c3}0000OOOOOOl.
29 | ${c1} '::ccccccccc${c3}dOOOOOOOkx:.
30 | ${c1} ..,::cccc${c3}xOOOkkko;.
31 | ${c1} ..,:${c3}dOkxl:.
32 | EOF
33 |
--------------------------------------------------------------------------------
/ascii/crux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 27
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light cyan') # Light Cyan
7 | c2=$(getColor 'yellow') # Yellow
8 | c3=$(getColor 'white') # White
9 | fi
10 | startline="1"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c1} odddd
13 | ${c1} oddxkkkxxdoo
14 | ${c1} ddcoddxxxdoool
15 | ${c1} xdclodod olol
16 | ${c1} xoc xdd olol
17 | ${c1} xdc ${c2}k00${c1}Okdlol
18 | ${c1} xxd${c2}kOKKKOkd${c1}ldd
19 | ${c1} xdco${c2}xOkdlo${c1}dldd
20 | ${c1} ddc:cl${c2}lll${c1}oooodo
21 | ${c1} odxxdd${c3}xkO000kx${c1}ooxdo
22 | ${c1} oxdd${c3}x0NMMMMMMWW0od${c1}kkxo
23 | ${c1} oooxd${c3}0WMMMMMMMMMW0o${c1}dxkx
24 | ${c1} docldkXW${c3}MMMMMMMWWN${c1}Odolco
25 | ${c1} xx${c2}dx${c1}kxxOKN${c3}WMMWN${c1}0xdoxo::c
26 | ${c2} xOkkO${c1}0oo${c3}odOW${c2}WW${c1}XkdodOxc:l
27 | ${c2} dkkkxkkk${c3}OKX${c2}NNNX0Oxx${c1}xc:cd
28 | ${c2} odxxdx${c3}xllod${c2}ddooxx${c1}dc:ldo
29 | ${c2} lodd${c1}dolccc${c2}ccox${c1}xoloo
30 | ${c1}
31 | EOF
32 |
--------------------------------------------------------------------------------
/ascii/debian.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 32
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light red') # Light Red
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} _,met$$$$$gg.
12 | ${c1} ,g$$$$$$$$$$$$$$$P.
13 | ${c1} ,g$$P"" """Y$$.".
14 | ${c1} ,$$P' `$$$.
15 | ${c1} ',$$P ,ggs. `$$b:
16 | ${c1} `d$$' ,$P"' ${c2}.${c1} $$$
17 | ${c1} $$P d$' ${c2},${c1} $$P
18 | ${c1} $$: $$. ${c2}-${c1} ,d$$'
19 | ${c1} $$; Y$b._ _,d$P'
20 | ${c1} Y$$. ${c2}`.${c1}`"Y$$$$P"'
21 | ${c1} `$$b ${c2}"-.__
22 | ${c1} `Y$$
23 | ${c1} `Y$$.
24 | ${c1} `$$b.
25 | ${c1} `Y$$b.
26 | ${c1} `"Y$b._
27 | ${c1} `""""
28 | ${c1}
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/deepin.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 41
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light cyan') # Light Cyan
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} ............
11 | ${c1} .';;;;;. .,;,.
12 | ${c1} .,;;;;;;;. ';;;;;;;.
13 | ${c1} .;::::::::' .,::;;,''''',.
14 | ${c1} ,'.:::::::: .;;'. ';
15 | ${c1} ;' 'cccccc, ,' :: '.. .:
16 | ${c1} ,, :ccccc. ;: .c, '' :. ,;
17 | ${c1} .l. cllll' ., .lc :; .l' l.
18 | ${c1} .c :lllc ;cl: .l' .ll. :'
19 | ${c1} .l 'looc. . ,o: 'oo' c,
20 | ${c1} .o. .:ool::coc' .ooo' o.
21 | ${c1} :: ..... .;dddo ;c
22 | ${c1} l:... .';lddddo. ,o
23 | ${c1} lxxxxxdoolllodxxxxxxxxxc :l
24 | ${c1} ,dxxxxxxxxxxxxxxxxxxl. 'o,
25 | ${c1} ,dkkkkkkkkkkkkko;. .;o;
26 | ${c1} .;okkkkkdl;. .,cl:.
27 | ${c1} .,:cccccccc:,.
28 | EOF
29 |
--------------------------------------------------------------------------------
/ascii/devuan.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 36
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light purple') # Light purple
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} ..,,;;;::;,..
12 | ${c1} `':ddd;:,.
13 | ${c1} `'dPPd:,.
14 | ${c1} `:b$$b`.
15 | ${c1} 'P$$$d`
16 | ${c1} .$$$$$`
17 | ${c1} ;$$$$$P
18 | ${c1} .:P$$$$$$`
19 | ${c1} .,:b$$$$$$$;'
20 | ${c1} .,:dP$$$$$$$$b:'
21 | ${c1} .,:;db$$$$$$$$$$Pd'`
22 | ${c1} ,db$$$$$$$$$$$$$$b:'`
23 | ${c1} :$$$$$$$$$$$$b:'`
24 | ${c1} `$$$$$bd:''`
25 | ${c1} `'''`
26 | ${c1}
27 | EOF
28 |
--------------------------------------------------------------------------------
/ascii/dragonflybsd.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 43
4 | # number of colors: 4
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light red') # Light Red
7 | c2=$(getColor 'white') # White
8 | c3=$(getColor 'yellow') # Yellow
9 | fi
10 | startline="0"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c1} |
13 | ${c1} .-.
14 | ${c3} ()${c1}I${c3}()
15 | ${c1} "==.__:-:__.=="
16 | ${c1} "==.__/~|~__.=="
17 | ${c1} "==._( Y )_.=="
18 | ${c2} .-'~~""~=--...,__${c1}/|/${c2}__,...--=~""~~'-.
19 | ${c2} ( ..=${c1}=${c1}/${c2}=.. )
20 | ${c2} `'-. ,.-"`;${c1}/=${c2} ;"-.,_ .-'`
21 | ${c2} `~"-=-~` .-~` ${c1}|=|${c2} `~-. `~-=-"~`
22 | ${c2} .-~` /${c1}|=|${c2} `~-.
23 | ${c2} .~` / ${c1}|=|${c2} `~.
24 | ${c2} .-~` .' ${c1}|=|${c2} `. `~-.
25 | ${c2} (` _,.-="` ${c1}|=|${c2} `"=-.,_ `)
26 | ${c2} `~"~"` ${c1}|=|${c2} `"~"~`
27 | ${c1} /=
28 | ${c1} =/
29 | ${c1} ^
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/draugeros.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 44
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'red') # Red
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} & &
12 | ${c1} %( (#
13 | ${c1} ((( (((
14 | ${c1} (((( ((((
15 | ${c1} (((( ((((
16 | ${c1} (((( ((((
17 | ${c1} (((( ((((
18 | ${c1} %(((( ((((%
19 | ${c1} (((( ((((
20 | ${c1} (((( ((((
21 | ${c1} (((( ((((
22 | ${c1} &(((( ((((&
23 | ${c1} #(((( ((((#
24 | ${c1} ((((( (((((
25 | ${c1} ((((# #((((
26 | ${c1} (# ((((((((((((((((((((((((((((((( #(
27 | ${c1} (((((((((((((((((((((((((((((((((((
28 | ${c1}
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/elementary-os.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 36
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} eeeeeeeeeeeeeeeee
12 | ${c1} eeeeeeeeeeeeeeeeeeeeeee
13 | ${c1} eeeee eeeeeeeeeeee eeeee
14 | ${c1} eeee eeeee eee eeee
15 | ${c1} eeee eeee eee eeee
16 | ${c1}eee eee eee eee
17 | ${c1}eee eee eee eee
18 | ${c1}ee eee eeee eeee
19 | ${c1}ee eee eeeee eeeeee
20 | ${c1}ee eee eeeee eeeee ee
21 | ${c1}eee eeee eeeeee eeeee eee
22 | ${c1}eee eeeeeeeeee eeeeee eee
23 | ${c1} eeeeeeeeeeeeeeeeeeeeeeee eeeee
24 | ${c1} eeeeeeee eeeeeeeeeeee eeee
25 | ${c1} eeeee eeeee
26 | ${c1} eeeeeee eeeeeee
27 | ${c1} eeeeeeeeeeeeeeeee
28 | EOF
29 |
--------------------------------------------------------------------------------
/ascii/endeavor.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 44
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'yellow') # Yellow
7 | c3=$(getColor 'purple') # Purple
8 | c5=$(getColor 'cyan') # Cyan
9 | fi
10 | startline="1"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c1}
13 | ${c1} +${c3}I${c5}+
14 | ${c1} +${c3}777${c5}+
15 | ${c1} +${c3}77777${c5}++
16 | ${c1} +${c3}7777777${c5}++
17 | ${c1} +${c3}7777777777${c5}++
18 | ${c1} ++${c3}7777777777777${c5}++
19 | ${c1} ++${c3}777777777777777${c5}+++
20 | ${c1} ++${c3}77777777777777777${c5}++++
21 | ${c1} ++${c3}7777777777777777777${c5}++++
22 | ${c1} +++${c3}777777777777777777777${c5}++++
23 | ${c1} ++++${c3}7777777777777777777777${c5}+++++
24 | ${c1} ++++${c3}77777777777777777777777${c5}+++++
25 | ${c1} +++++${c3}777777777777777777777777${c5}+++++
26 | ${c5} +++++++${c3}7777777777777777${c5}++++++
27 | ${c5} +++++++++++++++++++++++++++++
28 | ${c5} +++++++++++++++++++++++++++
29 | ${c1}
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/eurolinux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 39
4 | # number of colors: 1
5 | # TODO: this logo is vertically huge. Condense, perhaps?
6 | if [[ ${config_text[color]} != "off" ]]; then
7 | c1=$(getColor 'light blue') # Light Blue
8 | fi
9 | startline="3"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1}
12 | ${c1} DZZZZZZZZZZZZZ
13 | ${c1} ZZZZZZZZZZZZZZZZZZZ
14 | ${c1} ZZZZZZZZZZZZZZZZZZZZ
15 | ${c1} OZZZZZZZZZZZZZZZZZZZZ
16 | ${c1} Z ZZZ 8ZZZZZZZZZZZZ
17 | ${c1} ZZZ ZZZZZZZZZZ
18 | ${c1} ZZZZZN ZZZZZZZZZ
19 | ${c1} ZZZZZZZ ZZZZZZZZ
20 | ${c1}ZZZZZZZZ OZZZZZZZ
21 | ${c1}ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
22 | ${c1}ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
23 | ${c1}ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
24 | ${c1}ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
25 | ${c1}ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
26 | ${c1}ZZZZZZZZ
27 | ${c1} ZZZZZZZZ
28 | ${c1} OZZZZZZZZO
29 | ${c1} ZZZZZZZZZZZ
30 | ${c1} OZZZZZZZZZZZZZZZN
31 | ${c1} ZZZZZZZZZZZZZZZZ
32 | ${c1} DZZZZZZZZZZZZZZZ
33 | ${c1} ZZZZZZZZZZZZZ
34 | ${c1} NZZZZZZZZ
35 | ${c1}
36 | EOF
37 |
--------------------------------------------------------------------------------
/ascii/exherbo.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 46
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'dark grey') # Dark Grey
7 | c2=$(getColor 'light blue') # Light Blue
8 | c3=$(getColor 'light red') # Light Red
9 | fi
10 | startline="0"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c1} ,
13 | ${c1} OXo.
14 | ${c1} NXdX0: .cok0KXNNXXK0ko:.
15 | ${c1} KX '0XdKMMK;.xMMMk, .0MMMMMXx; ...
16 | ${c1} 'NO..xWkMMx kMMM cMMMMMX,NMWOxOXd.
17 | ${c1} cNMk NK .oXM. OMMMMO. 0MMNo kW.
18 | ${c1} lMc o: ., .oKNk; ;NMMWlxW'
19 | ${c1} ;Mc .. .,,' .0M${c2}g;${c1}WMN'dWMMMMMMO
20 | ${c1} XX ,WMMMMW. cM${c2}cfli${c1}WMKlo. .kMk
21 | ${c1} .Mo .WM${c2}GD${c1}MW. XM${c2}WO0${c1}MMk oMl
22 | ${c1} ,M: ,XMMWx::,''oOK0x; NM.
23 | ${c1} 'Ml ,kNKOxxxxxkkO0XXKOd:. oMk
24 | ${c1} NK .0Nxc${c3}:::::::::::::::${c1}fkKNk, .MW
25 | ${c1} ,Mo .NXc${c3}::${c1}qXWXb${c3}::::::::::${c1}oo${c3}::${c1}lNK. .MW
26 | ${c1} ;Wo oMd${c3}:::${c1}oNMNP${c3}::::::::${c1}oWMMMx${c3}:${c1}c0M; lMO
27 | ${c1} 'NO;W0c${c3}:::::::::::::::${c1}dMMMMO${c3}::${c1}lMk .WM'
28 | ${c1} xWONXdc${c3}::::::::::::::${c1}oOOo${c3}::${c1}lXN. ,WMd
29 | ${c1} 'KWWNXXK0Okxxo,${c3}:::::::${c1},lkKNo xMMO
30 | ${c1} :XMNxl,';:lodxkOO000Oxc. .oWMMo
31 | ${c1} 'dXMMXkl;,. .,o0MMNo'
32 | ${c1} ':d0XWMMMMWNNNNMMMNOl'
33 | ${c1} ':okKXWNKkl'
34 | EOF
35 |
--------------------------------------------------------------------------------
/ascii/fedora.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 37
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light blue') # Light Blue
8 | fi
9 | startline=0
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c2} .',;::::;,'.
12 | ${c2} .';:cccccccccccc:;,.
13 | ${c2} .;cccccccccccccccccccccc;.
14 | ${c2} .:cccccccccccccccccccccccccc:.
15 | ${c2} .;ccccccccccccc;${c1}.:dddl:.${c2};ccccccc;.
16 | ${c2} .:ccccccccccccc;${c1}OWMKOOXMWd${c2};ccccccc:.
17 | ${c2}.:ccccccccccccc;${c1}KMMc${c2};cc;${c1}xMMc${c2}:ccccccc:.
18 | ${c2},cccccccccccccc;${c1}MMM.${c2};cc;${c1};WW:${c2}:cccccccc,
19 | ${c2}:cccccccccccccc;${c1}MMM.${c2};cccccccccccccccc:
20 | ${c2}:ccccccc;${c1}oxOOOo${c2};${c1}MMM0OOk.${c2};cccccccccccc:
21 | ${c2}cccccc:${c1}0MMKxdd:${c2};${c1}MMMkddc.${c2};cccccccccccc;
22 | ${c2}ccccc:${c1}XM0'${c2};cccc;${c1}MMM.${c2};cccccccccccccccc'
23 | ${c2}ccccc;${c1}MMo${c2};ccccc;${c1}MMW.${c2};ccccccccccccccc;
24 | ${c2}ccccc;${c1}0MNc.${c2}ccc${c1}.xMMd${c2}:ccccccccccccccc;
25 | ${c2}cccccc;${c1}dNMWXXXWM0:${c2}:cccccccccccccc:,
26 | ${c2}cccccccc;${c1}.:odl:.${c2};cccccccccccccc:,.
27 | ${c2}:cccccccccccccccccccccccccccc:'.
28 | ${c2}.:cccccccccccccccccccccc:;,..
29 | ${c2} '::cccccccccccccc::;,.
30 | ${c2}
31 | EOF
32 |
--------------------------------------------------------------------------------
/ascii/freebsd-old.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 34
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light red') # Light Red
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c2} , ,
12 | ${c2} /( )`
13 | ${c2} ___ / |
14 | ${c2} /- ${c1}_${c2} `-/ '
15 | ${c2} (${c1}// ${c2} /
16 | ${c1} / / |${c2} `
17 | ${c1} O O )${c2} / |
18 | ${c1} `-^--'`${c2}< '
19 | ${c2} (_.) _ ) /
20 | ${c2} `.___/` /
21 | ${c2} `-----' /
22 | ${c1} <----. ${c2}__/ __
23 | ${c1} <----|====${c2}O}}}${c1}==${c2}} } /${c1}====
24 | ${c1} <----' ${c2}`--' `.__,'
25 | ${c2} | |
26 | ${c2} / /
27 | ${c2} ______( (_ / ______/
28 | ${c2} ,' ,-----' |
29 | ${c2} `--{__________)
30 | ${c2}
31 | EOF
32 |
--------------------------------------------------------------------------------
/ascii/freebsd.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 37
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light red') # Light Red
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1}
12 | ${c1} ``` ${c2}`
13 | ${c1} ` `.....---...${c2}....--.``` -/
14 | ${c1} +o .--` ${c2}/y:` +.
15 | ${c1} yo`:. ${c2}:o `+-
16 | ${c1} y/ ${c2}-/` -o/
17 | ${c1} .- ${c2}::/sy+:.
18 | ${c1} / ${c2}`-- /
19 | ${c1} `: ${c2}:`
20 | ${c1} `: ${c2}:`
21 | ${c1} / ${c2}/
22 | ${c1} .- ${c2}-.
23 | ${c1} -- ${c2}-.
24 | ${c1} `:` ${c2}`:`
25 | ${c2} .-- `--.
26 | ${c2} .---.....----.
27 | ${c2}
28 | ${c2}
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/frugalware.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 50
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light blue') # Light Blue
8 | fi
9 | startline="3"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c2} `++/::-.`
12 | ${c2} /o+++++++++/::-.`
13 | ${c2} `o+++++++++++++++o++/::-.`
14 | ${c2} /+++++++++++++++++++++++oo++/:-.``
15 | ${c2} .o+ooooooooooooooooooosssssssso++oo++/:-`
16 | ${c2} ++osoooooooooooosssssssssssssyyo+++++++o:
17 | ${c2} -o+ssoooooooooooosssssssssssssyyo+++++++s`
18 | ${c2} o++ssoooooo++++++++++++++sssyyyyo++++++o:
19 | ${c2} :o++ssoooooo${c1}/-------------${c2}+syyyyyo+++++oo
20 | ${c2} `o+++ssoooooo${c1}/-----${c2}+++++ooosyyyyyyo++++os:
21 | ${c2} /o+++ssoooooo${c1}/-----${c2}ooooooosyyyyyyyo+oooss
22 | ${c2} .o++++ssooooos${c1}/------------${c2}syyyyyyhsosssy-
23 | ${c2} ++++++ssooooss${c1}/-----${c2}+++++ooyyhhhhhdssssso
24 | ${c2} -s+++++syssssss${c1}/-----${c2}yyhhhhhhhhhhhddssssy.
25 | ${c2} sooooooyhyyyyyh${c1}/-----${c2}hhhhhhhhhhhddddyssy+
26 | ${c2} :yooooooyhyyyhhhyyyyyyhhhhhhhhhhdddddyssy`
27 | ${c2} yoooooooyhyyhhhhhhhhhhhhhhhhhhhddddddysy/
28 | ${c2}-ysooooooydhhhhhhhhhhhddddddddddddddddssy
29 | ${c2} .-:/+osssyyyysyyyyyyyyyyyyyyyyyyyyyyssy:
30 | ${c2} ``.-/+oosysssssssssssssssssssssss
31 | ${c2} ``.:/+osyysssssssssssssh.
32 | ${c2} `-:/+osyyssssyo
33 | ${c2} .-:+++`
34 | EOF
35 |
--------------------------------------------------------------------------------
/ascii/funtoo.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo widht: 52
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light purple') # Light Purple
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1}
12 | ${c1}
13 | ${c1}
14 | ${c1}
15 | ${c1} _______ ____
16 | ${c1} /MMMMMMM/ /MMMM| _____ _____
17 | ${c1} __/M${c2}.MMM.${c1}M/_____________|M${c2}.M${c1}MM|/MMMMM/MMMMM
18 | ${c1}|MMMM${c2}MM'${c1}MMMMMMMMMMMMMMMMMMM${c2}MM${c1}MMMM${c2}.MMMM..MMMM.${c1}MM
19 | ${c1}|MM${c2}MMMMMMM${c1}/m${c2}MMMMMMMMMMMMMMMMMMMMMM${c1}MMMM${c2}MM${c1}MMMM${c2}MM${c1}MM|
20 | ${c1}|MMMM${c2}MM${c1}MMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MMMMM${c2}MMM${c1}MMM${c2}MM${c1}MMMM${c2}MM${c1}MMMM${c2}MM${c1}MM|
21 | ${c1} |MM${c2}MM${c1}MMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMM${c1}MMMM${c2}'MMMM''MMMM'${c1}MM/
22 | ${c1} |MM${c2}MM${c1}MMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMM${c1}MMMMMMMM/MMMMM/
23 | ${c1} |MM${c2}MM${c1}MMM${c2}MM${c1}MMMMMM${c2}MM${c1}MM${c2}MM${c1}MM${c2}MMMMM'${c1}M|
24 | ${c1} |MM${c2}MM${c1}MMM${c2}MMMMMMMMMMMMMMMMM MM'${c1}M/
25 | ${c1} |MMMMMMMMMMMMMMMMMMMMMMMMMMMM/
26 | ${c1}
27 | ${c1}
28 | ${c1}
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/gentoo.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 37
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light purple') # Light Purple
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c2} -/oyddmdhs+:.
12 | ${c2} -o${c1}dNMMMMMMMMNNmhy+${c2}-`
13 | ${c2} -y${c1}NMMMMMMMMMMMNNNmmdhy${c2}+-
14 | ${c2} `o${c1}mMMMMMMMMMMMMNmdmmmmddhhy${c2}/`
15 | ${c2} om${c1}MMMMMMMMMMMN${c2}hhyyyo${c1}hmdddhhhd${c2}o`
16 | ${c2}.y${c1}dMMMMMMMMMMd${c2}hs++so/s${c1}mdddhhhhdm${c2}+`
17 | ${c2} oy${c1}hdmNMMMMMMMN${c2}dyooy${c1}dmddddhhhhyhN${c2}d.
18 | ${c2} :o${c1}yhhdNNMMMMMMMNNNmmdddhhhhhyym${c2}Mh
19 | ${c2} .:${c1}+sydNMMMMMNNNmmmdddhhhhhhmM${c2}my
20 | ${c2} /m${c1}MMMMMMNNNmmmdddhhhhhmMNh${c2}s:
21 | ${c2} `o${c1}NMMMMMMMNNNmmmddddhhdmMNhs${c2}+`
22 | ${c2} `s${c1}NMMMMMMMMNNNmmmdddddmNMmhs${c2}/.
23 | ${c2} /N${c1}MMMMMMMMNNNNmmmdddmNMNdso${c2}:`
24 | ${c2}+M${c1}MMMMMMNNNNNmmmmdmNMNdso${c2}/-
25 | ${c2}yM${c1}MNNNNNNNmmmmmNNMmhs+/${c2}-`
26 | ${c2}/h${c1}MMNNNNNNNNMNdhs++/${c2}-`
27 | ${c2}`/${c1}ohdmmddhys+++/:${c2}.`
28 | ${c2} `-//////:--.
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/gnu-hurd.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 37
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light grey') # Light Grey
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} _-`````-, ,- '- .
11 | ${c1} .' .- - | | - -. `.
12 | ${c1} /.' / `.
13 | ${c1} :/ : _... ..._ `` :
14 | ${c1} :: : /._ .`:'_.._. || :
15 | ${c1} :: `._ ./ ,` : . _.'' .
16 | ${c1} `:. / | -. -. _ /
17 | ${c1} :._ _/ .' .@) @) ` ` ,.'
18 | ${c1} _/,--' .- .,-.`--`.
19 | ${c1} ,'/'' (( ` )
20 | ${c1} /'/' `-' (
21 | ${c1} '/'' `._,-----'
22 | ${c1} ''/' .,---'
23 | ${c1} ''/' ;:
24 | ${c1} ''/'' ''/
25 | ${c1} ''/''/''
26 | ${c1} '/'/'
27 | ${c1} `;
28 | EOF
29 |
--------------------------------------------------------------------------------
/ascii/grombyang.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 35
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | c2=$(getColor 'light green') # Light Green
8 | c3=$(getColor 'light red') # Light Red
9 | fi
10 | startline="0"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c1}
13 | ${c1} eeeeeeeeeeee
14 | ${c1} eeeeeeeeeeeeeeeee
15 | ${c1} eeeeeeeeeeeeeeeeeeeeeee
16 | ${c1} eeeee ${c2}.o+ ${c1}eeee
17 | ${c1} eeee ${c2}`ooo/ ${c1}eeee
18 | ${c1} eeee ${c2}`+oooo: ${c1}eeee
19 | ${c1} eee ${c2}`+oooooo: ${c1}eee
20 | ${c1} eee ${c2}-+oooooo+: ${c1}eee
21 | ${c1} ee ${c2}`/:oooooooo+: ${c1}ee
22 | ${c1} ee ${c2}`/+ +++ +: ${c1}ee
23 | ${c1} ee ${c2}+o+ ${c1}ee
24 | ${c1} eee ${c2}+o+ ${c1}eee
25 | ${c1} eee ${c2}// ooo/ ${c1}eee
26 | ${c1} eee ${c2}//++++oooo++++ ${c1}eee
27 | ${c1} eeee ${c2}::::++oooo+::::: ${c1}eeee
28 | ${c1} eeeee ${c3}Grombyang OS ${c1} eeee
29 | ${c1} eeeeeeeeeeeeeeeeeeeeeee
30 | ${c1} eeeeeeeeeeeeeeeee
31 | ${c1}
32 | EOF
33 |
--------------------------------------------------------------------------------
/ascii/guix-system.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 40
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor '202') # Orange (202/#ff5f00)
7 | c2=$(getColor '214') # Light Orange (214/#ffaf00)
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} + ?
12 | ${c1} ?? ?I
13 | ${c1} ??I? I??N ${c2}??? ${c1}????
14 | ${c1} ?III7${c2}??????? ??????${c1}7III?Z
15 | ${c1} OI77$${c2}????? ?????${c1}$77IIII
16 | ${c1} ????? ${c2}????
17 | ${c1} ???ID ${c2}????
18 | ${c1} IIII ${c2}+????
19 | ${c1} IIIII ${c2}????
20 | ${c1} IIII ${c2}?????
21 | ${c1} IIIII ${c2}????
22 | ${c1} II77 ${c2}????$
23 | ${c1} 7777+${c2}????
24 | ${c1} 77++?${c2}??$
25 | ${c1} N?+???${c2}?
26 | EOF
27 |
--------------------------------------------------------------------------------
/ascii/haiku.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 36
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light grey') # Light Grey
7 | c2=$(getColor '16') # Black (16/#000000)
8 | c3=$(getColor 'green') # Green
9 | fi
10 | startline="0"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c1} :dc'
13 | ${c1} 'l:;'${c2},${c1}'ck. .;dc:.
14 | ${c1} co ${c2}..${c1}k. .;; ':o.
15 | ${c1} co ${c2}..${c1}k. ol ${c2}.${c1}0.
16 | ${c1} co ${c2}..${c1}k. oc ${c2}..${c1}0.
17 | ${c1} co ${c2}..${c1}k. oc ${c2}..${c1}0.
18 | ${c1}.Ol,. co ${c2}...''${c1}Oc;kkodxOdddOoc,.
19 | ${c1} ';lxxlxOdxkxk0kd${c3}oooll${c1}dl${c3}ccc:${c1}clxd;
20 | ${c1} ..${c3}oOolllllccccccc:::::${c1}od;
21 | ${c1} cx:ooc${c3}:::::::;${c1}cooolcX.
22 | ${c1} cd${c2}.${c1}''cloxdoollc' ${c2}...${c1}0.
23 | ${c1} cd${c2}......${c1}k;${c2}.${c1}xl${c2}.... .${c1}0.
24 | ${c1} .::c${c2};..${c1}cx;${c2}.${c1}xo${c2}..... .${c1}0.
25 | ${c1} '::c'${c2}...${c1}do${c2}..... .${c1}K,
26 | ${c1} cd,.${c2}....:${c1}O,${c2}......
27 | ${c1} ':clod:'${c2}......
28 | ${c1} ${c2}.
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/hyperbola.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 25
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light grey') # Light Grey
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} .. ,
12 | ${c1} a; ._#
13 | ${c1} )## _au#?
14 | ${c1} ]##s,.__a_w##e^
15 | ${c1} :###########(
16 | ${c1} ^!#####?!^
17 | ${c1} ._
18 | ${c1} _au######a,
19 | ${c1} sa###########,
20 | ${c1} _a##############o
21 | ${c1} .a#####?!^^^^^-####_
22 | ${c1} j####^ ~##i
23 | ${c1} _de!^ -#i
24 | ${c1} _#e^ ]+
25 | ${c1} ^ ^
26 | ${c1}
27 | EOF
28 |
--------------------------------------------------------------------------------
/ascii/kali-linux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 48
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | c2=$(getColor 'black') # Black
8 | fi
9 | startline="1"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1}..............
12 | ${c1} ..,;:ccc,.
13 | ${c1} ......''';lxO.
14 | ${c1}.....''''..........,:ld;
15 | ${c1} .';;;:::;,,.x,
16 | ${c1} ..'''. 0Xxoc:,. ...
17 | ${c1} .... ,ONkc;,;cokOdc',.
18 | ${c1} . OMo ':${c2}dd${c1}o.
19 | ${c1} dMc :OO;
20 | ${c1} 0M. .:o.
21 | ${c1} ;Wd
22 | ${c1} ;XO,
23 | ${c1} ,d0Odlc;,..
24 | ${c1} ..',;:cdOOd::,.
25 | ${c1} .:d;.':;.
26 | ${c1} 'd, .'
27 | ${c1} ;l ..
28 | ${c1} .o
29 | ${c1} c
30 | ${c1} .'
31 | ${c1} .
32 | EOF
33 |
--------------------------------------------------------------------------------
/ascii/kaos.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 35
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} ..
11 | ${c1} ..... ..OSSAAAAAAA..
12 | ${c1} .KKKKSS. .SSAAAAAAAAAAA.
13 | ${c1}.KKKKKSO. .SAAAAAAAAAA...
14 | ${c1}KKKKKKS. .OAAAAAAAA.
15 | ${c1}KKKKKKS. .OAAAAAA.
16 | ${c1}KKKKKKS. .SSAA..
17 | ${c1}.KKKKKS..OAAAAAAAAAAAA........
18 | ${c1} DKKKKO.=AA=========A===AASSSO..
19 | ${c1} AKKKS.==========AASSSSAAAAAASS.
20 | ${c1} .=KKO..========ASS.....SSSSASSSS.
21 | ${c1} .KK. .ASS..O.. =SSSSAOSS:
22 | ${c1} .OK. .ASSSSSSSO...=A.SSA.
23 | ${c1} .K ..SSSASSSS.. ..SSA.
24 | ${c1} .SSS.AAKAKSSKA.
25 | ${c1} .SSS....S..
26 | EOF
27 |
--------------------------------------------------------------------------------
/ascii/kde-neon.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 43
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light green') # Light Green
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} `..---+/---..`
11 | ${c1} `---.`` `` `.---.`
12 | ${c1} .--.` `` `-:-.
13 | ${c1} `:/: `.----//----.` :/-
14 | ${c1} .:. `---` `--.` .:`
15 | ${c1} .:` `--` .:- `:.
16 | ${c1} `/ `:. `.-::-.` -:` `/`
17 | ${c1} /. /. `:++++++++:` .: .:
18 | ${c1} `/ .: `+++++++++++/ /` `+`
19 | ${c1} /+` -- .++++++++++++` :. .+:
20 | ${c1} `/ .: `+++++++++++/ /` `+`
21 | ${c1} /` /. `:++++++++:` .: .:
22 | ${c1} ./ `:. `.:::-.` -:` `/`
23 | ${c1} .:` `--` .:- `:.
24 | ${c1} .:. `---` `--.` .:`
25 | ${c1} `:/: `.----//----.` :/-
26 | ${c1} .-:.` `` `-:-.
27 | ${c1} `---.`` `` `.---.`
28 | ${c1} `..---+/---..`
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/kogaion.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 41
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} ;; ,;
11 | ${c1} ;;; ,;;
12 | ${c1} ,;;;; ;;;;
13 | ${c1} ,;;;;;;;; ;;;;
14 | ${c1} ;;;;;;;;;;; ;;;;;
15 | ${c1} ,;;;;;;;;;;;; ';;;;;,
16 | ${c1} ;;;;;;;;;;;;;;, ';;;;;;;
17 | ${c1} ;;;;;;;;;;;;;;;;;, ';;;;;
18 | ${c1} ; ';;;;;;;;;;;;;;;;;;, ;;;
19 | ${c1} ;;;, ';;;;;;;;;;;;;;;;;;;,;;
20 | ${c1} ;;;;;, ';;;;;;;;;;;;;;;;;;,
21 | ${c1} ;;;;;;;;, ';;;;;;;;;;;;;;;;,
22 | ${c1} ;;;;;;;;;;;;, ';;;;;;;;;;;;;;
23 | ${c1} ';;;;;;;;;;;;; ';;;;;;;;;;;;;
24 | ${c1} ';;;;;;;;;;;;;, ';;;;;;;;;;;
25 | ${c1} ';;;;;;;;;;;;; ;;;;;;;;;;
26 | ${c1} ';;;;;;;;;;;; ;;;;;;;;
27 | ${c1} ';;;;;;;; ;;;;;;
28 | ${c1} ';;;;; ;;;;
29 | ${c1} ';;; ;;
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/linux-generic.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 28
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'dark grey') # Dark Grey
8 | c3=$(getColor 'yellow') # Yellow
9 | fi
10 | startline="0"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c2}
13 | ${c2}
14 | ${c2}
15 | ${c2} #####
16 | ${c2} #######
17 | ${c2} ##${c1}O${c2}#${c1}O${c2}##
18 | ${c2} #${c3}#####${c2}#
19 | ${c2} ##${c1}##${c3}###${c1}##${c2}##
20 | ${c2} #${c1}##########${c2}##
21 | ${c2} #${c1}############${c2}##
22 | ${c2} #${c1}############${c2}###
23 | ${c3} ##${c2}#${c1}###########${c2}##${c3}#
24 | ${c3} ######${c2}#${c1}#######${c2}#${c3}######
25 | ${c3} #######${c2}#${c1}#####${c2}#${c3}#######
26 | ${c3} #####${c2}#######${c3}#####
27 | ${c2}
28 | ${c2}
29 | ${c2}
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/lmde.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 31
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light green') # Light Green
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} `.-::---..
12 | ${c2} .:++++ooooosssoo:.
13 | ${c2} .+o++::. `.:oos+.
14 | ${c2} :oo:.` -+oo${c1}:
15 | ${c2} ${c1}`${c2}+o/` .${c1}::::::${c2}-. .++-${c1}`
16 | ${c2} ${c1}`${c2}/s/ .yyyyyyyyyyo: +o-${c1}`
17 | ${c2} ${c1}`${c2}so .ss ohyo` :s-${c1}:
18 | ${c2} ${c1}`${c2}s/ .ss h m myy/ /s`${c1}`
19 | ${c2} `s: `oo s m Myy+-o:`
20 | ${c2} `oo :+sdoohyoydyso/.
21 | ${c2} :o. .:////////++:
22 | ${c2} `/++ ${c1}-:::::-
23 | ${c2} ${c1}`${c2}++-
24 | ${c2} ${c1}`${c2}/+-
25 | ${c2} ${c1}.${c2}+/.
26 | ${c2} ${c1}.${c2}:+-.
27 | ${c2} `--.``
28 | ${c2}
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/mac-classic.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 39
4 | # number of colors: 4
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'blue') # Blue
7 | c2=$(getColor 'light blue') # Light blue
8 | c3=$(getColor 'light grey') # Light Gray
9 | c4=$(getColor 'dark grey') # Dark Grey
10 | fi
11 | startline=1
12 | read -rd '' asciiLogo << 'EOF'
13 | ${c3}
14 | ${c3} ..
15 | ${c3} dWc
16 | ${c3} ,X0'
17 | ${c1} ;;;;;;;;;;;;;;;;;;${c3}0Mk${c2}:::::::::::::::
18 | ${c1} ;;;;;;;;;;;;;;;;;${c3}KWo${c2}::::::::::::::::
19 | ${c1} ;;;;;;;;;${c4}NN${c1};;;;;${c3}KWo${c2}:::::${c3}NN${c2}::::::::::
20 | ${c1} ;;;;;;;;;${c4}NN${c1};;;;${c3}0Md${c2}::::::${c3}NN${c2}::::::::::
21 | ${c1} ;;;;;;;;;${c4}NN${c1};;;${c3}xW0${c2}:::::::${c3}NN${c2}::::::::::
22 | ${c1} ;;;;;;;;;;;;;;${c3}KMc${c2}:::::::::::::::::::
23 | ${c1} ;;;;;;;;;;;;;${c3}lWX${c2}::::::::::::::::::::
24 | ${c1} ;;;;;;;;;;;;;${c3}xWWXXXXNN7${c2}:::::::::::::
25 | ${c1} ;;;;;;;;;;;;;;;;;;;;${c3}WK${c2}::::::::::::::
26 | ${c1} ;;;;;${c4}TKX0ko.${c1};;;;;;;${c3}kMx${c2}:::${c3}.cOKNF${c2}:::::
27 | ${c1} ;;;;;;;;${c4}`kO0KKKKKKK${c3}NMNXK0OP*${c2}::::::::
28 | ${c1} ;;;;;;;;;;;;;;;;;;;${c3}kMx${c2}::::::::::::::
29 | ${c1} ;;;;;;;;;;;;;;;;;;;;${c3}WX${c2}::::::::::::::
30 | ${c3} lMc
31 | ${c3} kN.
32 | ${c3} o'
33 | ${c3}
34 | EOF
35 |
--------------------------------------------------------------------------------
/ascii/macos.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 31
4 | # number of colors: 6
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'green') # Green
7 | c2=$(getColor 'brown') # Yellow
8 | c3=$(getColor 'light red') # Light Red
9 | c4=$(getColor 'red') # Red
10 | c5=$(getColor 'purple') # Purple
11 | c6=$(getColor 'blue') # Blue
12 | fi
13 | startline=1
14 | read -rd '' asciiLogo << 'EOF'
15 | ${c1}
16 | ${c1} -/+:.
17 | ${c1} :++++.
18 | ${c1} /+++/.
19 | ${c1} .:-::- .+/:-``.::-
20 | ${c1} .:/++++++/::::/++++++/:`
21 | ${c2} .:///////////////////////:`
22 | ${c2} ////////////////////////`
23 | ${c3} -+++++++++++++++++++++++`
24 | ${c3} /++++++++++++++++++++++/
25 | ${c4} /sssssssssssssssssssssss.
26 | ${c4} :ssssssssssssssssssssssss-
27 | ${c5} osssssssssssssssssssssssso/`
28 | ${c5} `syyyyyyyyyyyyyyyyyyyyyyyy+`
29 | ${c6} `ossssssssssssssssssssss/
30 | ${c6} :ooooooooooooooooooo+.
31 | ${c6} `:+oo+/:-..-:/+o+/-
32 | ${c6}
33 | EOF
34 |
--------------------------------------------------------------------------------
/ascii/mageia.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 3
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light cyan') # Light Cyan
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c2} .°°.
12 | ${c2} °° .°°.
13 | ${c2} .°°°. °°
14 | ${c2} . .
15 | ${c2} °°° .°°°.
16 | ${c2} .°°°. '___'
17 | ${c1} .${c2}'___' ${c1} .
18 | ${c1} :dkxc;'. ..,cxkd;
19 | ${c1} .dkk. kkkkkkkkkk .kkd.
20 | ${c1} .dkk. ';cloolc;. .kkd
21 | ${c1} ckk. .kk;
22 | ${c1} xO: cOd
23 | ${c1} xO: lOd
24 | ${c1} lOO. .OO:
25 | ${c1} .k00. .00x
26 | ${c1} .k00; ;00O.
27 | ${c1} .lO0Kc;,,,,,,;c0KOc.
28 | ${c1} ;d00KKKKKK00d;
29 | ${c1} .,KKKK,.
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/manjaro-tree.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 33
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'green') # Green
7 | c2=$(getColor 'yellow') # Yellow
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} ###
12 | ${c1} ### ####
13 | ${c1} ### ####
14 | ${c1} ##### #####
15 | ${c1} #################
16 | ${c1} ### ##### ####
17 | ${c1} ## ${c2}OOO ${c1}###
18 | ${c1} # ${c2}WW ${c1}##
19 | ${c1} ${c2}WW ${c1}#
20 | ${c2} WW
21 | ${c2} WW
22 | ${c2} WW
23 | ${c2} WW
24 | ${c2} WW
25 | ${c2} WW
26 | ${c2} WW
27 | ${c2} WW
28 | ${c2}
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/manjaro.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 33
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light green') # Green
7 | fi
8 | startline="1"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} ██████████████████ ████████
12 | ${c1} ██████████████████ ████████
13 | ${c1} ██████████████████ ████████
14 | ${c1} ██████████████████ ████████
15 | ${c1} ████████ ████████
16 | ${c1} ████████ ████████ ████████
17 | ${c1} ████████ ████████ ████████
18 | ${c1} ████████ ████████ ████████
19 | ${c1} ████████ ████████ ████████
20 | ${c1} ████████ ████████ ████████
21 | ${c1} ████████ ████████ ████████
22 | ${c1} ████████ ████████ ████████
23 | ${c1} ████████ ████████ ████████
24 | ${c1} ████████ ████████ ████████
25 | ${c1}
26 | EOF
27 |
--------------------------------------------------------------------------------
/ascii/mint.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 38
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light green') # Bold Green
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c2}
12 | ${c2} MMMMMMMMMMMMMMMMMMMMMMMMMmds+.
13 | ${c2} MMm----::-://////////////oymNMd+`
14 | ${c2} MMd ${c1}/++ ${c2}-sNMd:
15 | ${c2} MMNso/` ${c1}dMM `.::-. .-::.` ${c2}.hMN:
16 | ${c2} ddddMMh ${c1}dMM :hNMNMNhNMNMNh: ${c2}`NMm
17 | ${c2} NMm ${c1}dMM .NMN/-+MMM+-/NMN` ${c2}dMM
18 | ${c2} NMm ${c1}dMM -MMm `MMM dMM. ${c2}dMM
19 | ${c2} NMm ${c1}dMM -MMm `MMM dMM. ${c2}dMM
20 | ${c2} NMm ${c1}dMM .mmd `mmm yMM. ${c2}dMM
21 | ${c2} NMm ${c1}dMM` ..` ... ydm. ${c2}dMM
22 | ${c2} hMM- ${c1}+MMd/-------...-:sdds ${c2}dMM
23 | ${c2} -NMm- ${c1}:hNMNNNmdddddddddy/` ${c2}dMM
24 | ${c2} -dMNs-${c1}``-::::-------.`` ${c2}dMM
25 | ${c2} `/dMNmy+/:-------------:/yMMM
26 | ${c2} ./ydNMMMMMMMMMMMMMMMMMMMMM
27 | ${c2} .MMMMMMMMMMMMMMMMMMM
28 | ${c2}
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/netbsd.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 60
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor '202') # Orange
7 | c2=$(getColor 'white') # White
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} __,gnnnOCCCCCOObaau,_
12 | ${c2} _._ ${c1}__,gnnCCCCCCCCOPF"''
13 | ${c2} (N${c1}XCbngg,._____.,gnnndCCCCCCCCCCCCF"___,,,,___
14 | ${c2} N${c1}XCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCOOOOPYvv.
15 | ${c2} N${c1}XCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCPF"''
16 | ${c2} N${c1}XCCCCCCCCCCCCCCCCCCCCCCCCCOF"'
17 | ${c2} N${c1}XCCCCCCCCCCCCCCCCCCCCOF"'
18 | ${c2} N${c1}XCCCCCCCCCCCCCCCPF"'
19 | ${c2} N${c1}"PCOCCCOCCFP""
20 | ${c2} N
21 | ${c2} N
22 | ${c2} N
23 | ${c2} NN
24 | ${c2} NN
25 | ${c2} NNA.
26 | ${c2} NNA,
27 | ${c2} NNN,
28 | ${c2} NNN
29 | ${c2} NNN
30 | ${c2} NNNA
31 | EOF
32 |
--------------------------------------------------------------------------------
/ascii/netrunner.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 43
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Blue
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1}
12 | ${c1} nnnnnnnnnn
13 | ${c1} nnnnnnnnnnnnnnnnnnnn
14 | ${c1} nnnnnnnnnnnnnnnnnnnnnnnnnn
15 | ${c1} nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
16 | ${c1} nnnnnnnnnnnnnnnnnnnnnn nnnnnnnn
17 | ${c1} nnnnnnnnnnnnnnnnn nnnnnnnnnn
18 | ${c1} nnnnnnnnnnn nnnnnnnnnnn
19 | ${c1} nnnnnn nnnnnnnnnnnn
20 | ${c1} nnnnnnnnnnn nnnnnnnnnnnn
21 | ${c1} nnnnnnnnnnnnn nnnnnnnnnnnn
22 | ${c1} nnnnnnnnnnnnnnnn nnnnnnnnnnnnn
23 | ${c1} nnnnnnnnnnnnnnnnn nnnnnnnnnnnnn
24 | ${c1} nnnnnnnnnnnnnnnnnn nnnnnnnnnnnn
25 | ${c1} nnnnnnnnnnnnnnnnn nnnnnnnnnnnn
26 | ${c1} nnnnnnnnnnnnnnn nnnnnnnnnnn
27 | ${c1} nnnnnnnnnnnnnn nnnnnnnnn
28 | ${c1} nnnnnnnnnnnnnnnnnnnn
29 | ${c1} nnnnnnnnnn
30 | ${c1}
31 | ${c1}
32 | EOF
33 |
--------------------------------------------------------------------------------
/ascii/nixos.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 45
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'blue') # Blue
7 | c2=$(getColor 'light blue') # Light Blue
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} ::::. ${c2}'::::: ::::'
12 | ${c1} '::::: ${c2}':::::. ::::'
13 | ${c1} ::::: ${c2}'::::.:::::
14 | ${c1} .......:::::..... ${c2}::::::::
15 | ${c1} ::::::::::::::::::. ${c2}:::::: ${c1}::::.
16 | ${c1} ::::::::::::::::::::: ${c2}:::::. ${c1}.::::'
17 | ${c2} ..... ::::' ${c1}:::::'
18 | ${c2} ::::: '::' ${c1}:::::'
19 | ${c2} ........::::: ' ${c1}:::::::::::.
20 | ${c2}::::::::::::: ${c1}:::::::::::::
21 | ${c2} ::::::::::: ${c1}.. :::::
22 | ${c2} .::::: ${c1}.::: :::::
23 | ${c2} .::::: ${c1}::::: ''''' ${c2}.....
24 | ${c2} ::::: ${c1}':::::. ${c2}......:::::::::::::'
25 | ${c2} ::: ${c1}::::::. ${c2}':::::::::::::::::'
26 | ${c1} .:::::::: ${c2}'::::::::::
27 | ${c1} .::::''::::. ${c2}'::::.
28 | ${c1} .::::' ::::. ${c2}'::::.
29 | ${c1} .:::: :::: ${c2}'::::.
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/openbsd.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 44
4 | # number of colors: 5
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'yellow') # Yellow
7 | c2=$(getColor 'brown') # Brown
8 | c3=$(getColor 'light cyan') # Light Cyan
9 | c4=$(getColor 'light red') # Light Red
10 | c5=$(getColor 'dark grey') # Dark Grey
11 | fi
12 | startline="3"
13 | read -rd '' asciiLogo << 'EOF'
14 | ${c3}
15 | ${c3} (_)
16 | ${c1}
17 | ${c1} . |L /| . ${c3} _
18 | ${c1} _ . | _| --+._/| . ${c3}(_)
19 | ${c1} / ||| Y J ) / |/| ./
20 | ${c1} J |)'( | ` F`.'/ ${c3} _
21 | ${c1} -<| F __ .-< ${c3}(_)
22 | ${c1} | / .-'${c3}. ${c1}`. /${c3}-. ${c1}L___
23 | ${c1} J < ${c3} ${c1} | | ${c5}O${c3}${c1}|.-' ${c3} _
24 | ${c1} _J .- ${c3}/ ${c5}O ${c3}| ${c1}| |${c1}F ${c3}(_)
25 | ${c1} '-F -<_. .-' `-' L__
26 | ${c1}__J _ _. >-' ${c2})${c4}._. ${c1}|-'
27 | ${c1} `-|.' /_. ${c4}_| ${c1} F
28 | ${c1} /.- . _.<
29 | ${c1} /' /.' .' `
30 | ${c1} /L /' |/ _.-'-
31 | ${c1} /'J ___.---'|
32 | ${c1} | .--' V | `. `
33 | ${c1} |/`. `-. `._)
34 | ${c1} / .-.
35 | ${c1} ( `
36 | ${c1} `.
37 | EOF
38 |
--------------------------------------------------------------------------------
/ascii/os-elbrus.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 33
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | fi
8 | startline="1"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
12 | ${c1} ██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
13 | ${c1} ██ ██
14 | ${c1} ██ ███████ ███████ ██
15 | ${c1} ██ ██ ██ ██ ██ ██
16 | ${c1} ██ ██ ██ ██ ██ ██
17 | ${c1} ██ ██ ██ ██ ██ ██
18 | ${c1} ██ ██ ██ ██ ██ ██
19 | ${c1} ██ ██ ███████ ███████
20 | ${c1} ██ ██ ██
21 | ${c1} ██ ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
22 | ${c1} ██ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
23 | ${c1} ██ ██
24 | ${c1} ███████████████████████████
25 | ${c1}
26 | EOF
27 |
--------------------------------------------------------------------------------
/ascii/parabola.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 33
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'purple') # Purple
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} _,, _
12 | ${c1} _, ,##' ,##;
13 | ${c1} _, ,##' ,##' ,#####;
14 | ${c1} _,;#',##' ,##' ,#######'
15 | ${c1} _,#**^' ` ,#########
16 | ${c1} .-^` `#########
17 | ${c1} ########
18 | ${c1} ;######
19 | ${c1} ;####*
20 | ${c1} ####'
21 | ${c1} ;###
22 | ${c1} ,##'
23 | ${c1} ##
24 | ${c1} #'
25 | ${c1} /
26 | ${c1} '
27 | ${c1}
28 | EOF
29 |
--------------------------------------------------------------------------------
/ascii/pardus.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 45
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'yellow') # Yellow
7 | c2=$(getColor 'light grey') # Light Grey
8 | fi
9 | startline="1"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1}
12 | ${c1} .smNdy+- `.:/osyyso+:.` -+ydmNs.
13 | ${c1} /Md- -/ymMdmNNdhso/::/oshdNNmdMmy/. :dM/
14 | ${c1} mN. oMdyy- -y `-dMo .Nm
15 | ${c1} .mN+` sMy hN+ -: yMs `+Nm.
16 | ${c1} `yMMddMs.dy `+` sMddMMy`
17 | ${c1} +MMMo .` . oMMM+
18 | ${c1} `NM/ `````.` `.````` +MN`
19 | ${c1} yM+ `.-:yhomy ymohy:-.` +My
20 | ${c1} yM: yo oy :My
21 | ${c1} +Ms .N` `N. +h sM+
22 | ${c1} `MN - -::::::- : :o:+`NM`
23 | ${c1} yM/ sh -dMMMMd- ho +y+My
24 | ${c1} .dNhsohMh-//: /mm/ ://-yMyoshNd`
25 | ${c1} `-ommNMm+:/. oo ./:+mMNmmo:`
26 | ${c1} `/o+.-somNh- :yy: -hNmos-.+o/`
27 | ${c1} ./` .s/`s+sMdd+``+ddMs+s`/s. `/.
28 | ${c1} : -y. -hNmddmNy. .y- :
29 | ${c1} -+ `..` +-
30 | ${c1}
31 | EOF
32 |
--------------------------------------------------------------------------------
/ascii/parrot-security.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 43
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} ,:oho/-.
11 | ${c1} mMMMMMMMMMMMNmmdhy-
12 | ${c1} dMMMMMMMMMMMMMMMMMMs.
13 | ${c1} +MMsohNMMMMMMMMMMMMMm/
14 | ${c1} .My .+dMMMMMMMMMMMMMh.
15 | ${c1} + :NMMMMMMMMMMMMNo
16 | ${c1} `yMMMMMMMMMMMMMm:
17 | ${c1} /NMMMMMMMMMMMMMy.
18 | ${c1} .hMMMMMMMMMMMMMN+
19 | ${c1} ``-NMMMMMMMMMd-
20 | ${c1} /MMMMMMMMMMMs.
21 | ${c1} mMMMMMMMsyNMN/
22 | ${c1} +MMMMMMMo :sNh.
23 | ${c1} `NMMMMMMm -o/
24 | ${c1} oMMMMMMM.
25 | ${c1} `NMMMMMM+
26 | ${c1} +MMd/NMh
27 | ${c1} mMm -mN`
28 | ${c1} /MM `h:
29 | ${c1} dM` .
30 | ${c1} :M-
31 | ${c1} d:
32 | ${c1} -+
33 | ${c1} -
34 | EOF
35 |
--------------------------------------------------------------------------------
/ascii/pclinuxos.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 50
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'blue') # Blue
7 | c2=$(getColor 'light grey') # Light Grey
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1}
12 | ${c1}
13 | ${c1} --. ((
15 | ${c1} Aoooooooooooo>--.
16 | ${c1} AooodNNNNNNNNNNNNNNNN>--. ))
17 | ${c2} (${c1} AoodNNNNNNNNNNNNNNNNNNNNNNN>-///'
18 | ${c2} ${c1}AodNNNNNNNNNNNNNNNNNNNNNNNNNNNY/
19 | ${c1} AodNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
20 | ${c1} AdNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNA
21 | ${c1} (${c2}/)${c1}NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNA
22 | ${c2} //${c1}
19 | ${c1} -Y#m#! 4###m#r -$##mBm#Z`
20 | ${c1} - _as,. "???~ _aawa,.!S##Z?`
21 | ${c1} ym= 3h. <##' -Wo
22 | ${c1} $#mm#D` ]B#qww##
23 | ${c1} "?!"` _s,.-?#m##T'
24 | ${c1} _dZ""4a --
25 | ${c1} 3Wmaam#;
26 | ${c1} -9###Z!
27 | EOF
28 |
--------------------------------------------------------------------------------
/ascii/solus.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 36
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'blue') # Blue
8 | c3=$(getColor 'black') # Black
9 | fi
10 | startline="0"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c3} ......
13 | ${c3} .'${c1}D${c3}lddddddddddd'.
14 | ${c3} .'ddd${c1}XM${c3}xdddddddddddddd.
15 | ${c3} .dddddx${c1}MMM0${c3};dddddddddddddd.
16 | ${c3} 'dddddl${c1}MMMMMN${c3}cddddddddddddddd.
17 | ${c3} ddddddc${c1}WMMMMMMW${c3}lddddddddddddddd.
18 | ${c3} ddddddc${c1}WMMMMMMMMO${c3}ddoddddddddddddd.
19 | ${c3}.ddddd:${c1}NMMMMMMMMMK${c3}dd${c1}NX${c3}od;c${c1}lxl${c3}dddddd
20 | ${c3}dddddc${c1}WMMMMMMMMMMNN${c3}dd${c1}MMXl${c3};d${c1}00xl;${c3}ddd.
21 | ${c3}ddddl${c1}WMMMMMMMMMMMMM${c3}d;${c1}MMMM0${c3}:dl${c1}XMMXk:${c3}'
22 | ${c3}dddo${c1}WMMMMMMMMMMMMMM${c3}dd${c1}MMMMMW${c3}od${c3};${c1}XMMMOd
23 | ${c3}.dd${c1}MMMMMMMMMMMMMMMM${c3}d:${c1}MMMMMMM${c3}kd${c1}lMKll
24 | ${c3}.;dk0${c1}KXNWWMMMMMMMMM${c3}dx${c1}MMMMMMM${c3}Xl;lxK;
25 | ${c3} 'dddddddd;:cclodcddxddolloxO0O${c1}d'
26 | ${c1} ckkxxxddddddddxxkOOO000Okdool.
27 | ${c2} .lddddxxxxxxddddooooooooood
28 | ${c2} .:oooooooooooooooooooc'
29 | ${c2} .,:looooooooooc;.
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/sourcemage.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 40
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'dark grey') # Dark Grey
7 | fi
8 | startline="1"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} -sdNMNds:
12 | ${c1} .shmNMMMMMMNNNNh.
13 | ${c1} ` ':sNNNNNNNNNNm-
14 | ${c1} .NNNNNNmmmmmdo.
15 | ${c1} -mNmmmmmmmmmmddd:
16 | ${c1} +mmmmmmmddddddddh-
17 | ${c1} :mmdddddddddhhhhhy.
18 | ${c1} -ddddddhhhhhhhhyyyo
19 | ${c1} .hyhhhhhhhyyyyyyyys:
20 | ${c1} .`shyyyyyyyyyssssso
21 | ${c1} `/yyyysssssssoooo.
22 | ${c1} .osssssooooo+++/
23 | ${c1} `:+oooo+++++///.
24 | ${c1} `://++//////::-
25 | ${c1} ..-/// .//::::::--.
26 | ${c1} ```` ``` :::--------`
27 | ${c1} `------....`
28 | ${c1} `.........`
29 | ${c1} `......`
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/sparkylinux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 48
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light grey') # Light Grey
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} . `-:-`
11 | ${c1} .o` .-///-`
12 | ${c1} `oo` .:/++:.
13 | ${c1} os+` -/+++:` ``.........```
14 | ${c1} /ys+`./+++/-.-::::::----......``
15 | ${c1} `syyo`++o+--::::-::/+++/-``
16 | ${c1} -yyy+.+o+`:/:-:sdmmmmmmmmdy+-`
17 | ${c1} ::-` :yyy/-oo.-+/`ymho++++++oyhdmdy/`
18 | ${c1} `/yy+-`.syyo`+o..o--h..osyhhddhs+//osyy/`
19 | ${c1} -ydhs+-oyy/.+o.-: ` ` :/::+ydhy+```-os-
20 | ${c1} .sdddy::syo--/:. `.:dy+-ohhho ./:
21 | ${c1} :yddds/:+oo+//:-`- /+ +hy+.shhy: ``
22 | ${c1} `:ydmmdysooooooo-.ss`/yss--oyyo
23 | ${c1} `./ossyyyyo+:-/oo:.osso- .oys
24 | ${c1} ``..-------::////.-oooo/ :so
25 | ${c1} `...----::::::::--.`/oooo: .o:
26 | ${c1} ``````` ++o+:` `:`
27 | ${c1} ./+/-` `
28 | ${c1} `-:-.
29 | ${c1} ``
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/steamos.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 37
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'dark grey') # Dark Grey
7 | c2=$(getColor 'purple') # Dark Purple
8 | c3=$(getColor 'light purple') # Light Purple
9 | fi
10 | startline="0"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c2} .,,,,.
13 | ${c2} .,'onNMMMMMNNnn',.
14 | ${c2} .'oNM${c3}ANK${c2}MMMMMMMMMMMNNn'.
15 | ${c3} .'ANMMMMMMMXK${c2}NNWWWPFFWNNMNn.
16 | ${c3} ;NNMMMMMMMMMMNWW'' ${c2},.., 'WMMM,
17 | ${c3} ;NMMMMV+##+VNWWW' ${c3}.+;'':+, 'WM${c2}W,
18 | ${c3} ,VNNWP+${c1}######${c3}+WW, ${c1}+: ${c3}:+, +MMM,
19 | ${c3} '${c1}+#############, +. ,+' ${c3}+NMMM
20 | ${c1} '*#########*' '*,,*' ${c3}.+NMMMM.
21 | ${c1} `'*###*' ,.,;###${c3}+WNM,
22 | ${c1} .,;;, .;##########${c3}+W
23 | ${c1} ,',. '; ,+##############'
24 | ${c1} '###+. :,. .,; ,###############'
25 | ${c1} '####.. `'' .,###############'
26 | ${c1} '#####+++################'
27 | ${c1} '*##################*'
28 | ${c1} ''*##########*''
29 | ${c1} ''''''
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/sulin.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 45
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light grey') # Light Grey
7 | fi
8 | startline="1"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1} ++ +++
12 | ${c1} ++::+ ++:+:
13 | ${c1} +:~:~: +:~:~:+
14 | ${c1} +:~::~:+ +~:::::
15 | ${c1} +:~:::~~+:~. ..~::.::+:~+
16 | ${c1} +~:::. .::~:+
17 | ${c1} +::. . .~:+
18 | ${c1} :~:~+~..~ ~: ~++~++~+
19 | ${c1} :++++++++:++:+++++++:
20 | ${c1} ++++ +:+++.+++++++++++.+++:
21 | ${c1} :. ~ :+++.+++++++++++~+++:
22 | ${c1} +~ .++++++++++ ++ ++++:+
23 | ${c1} +: ~ :~+ +~+ ~+ +~+
24 | ${c1} ++:+++++ +++
25 | ${c1} +::~:++++++++++++++
26 | ${c1} +++++++++++++++:
27 | ${c1} +:++++++++++++::
28 | ${c1} :.~+++:++:++++..+
29 | ${c1} +~::++::+~::+:.+
30 | ${c1} :~~~~~:+~:~~~:+
31 | EOF
32 |
--------------------------------------------------------------------------------
/ascii/suse.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 44
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light green') # Light Green
7 | c2=$(getColor 'white') # White
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c2} .;ldkO0000Okdl;.
12 | ${c2} .;d00xl:^''''''^:ok00d;.
13 | ${c2} .d00l' 'o00d.
14 | ${c2} .d0K^'${c1} Okxoc;:,. ${c2}^O0d.
15 | ${c2} .OVV${c1}AK0kOKKKKKKKKKKOxo:, ${c2}lKO.
16 | ${c2} ,0VV${c1}AKKKKKKKKKKKKK0P^${c2},,,${c1}^dx:${c2} ;00,
17 | ${c2} .OVV${c1}AKKKKKKKKKKKKKk'${c2}.oOPPb.${c1}'0k.${c2} cKO.
18 | ${c2} :KV${c1}AKKKKKKKKKKKKKK: ${c2}kKx..dd ${c1}lKd${c2} 'OK:
19 | ${c2} lKl${c1}KKKKKKKKKOx0KKKd ${c2}^0KKKO' ${c1}kKKc${c2} lKl
20 | ${c2} lKl${c1}KKKKKKKKKK;.;oOKx,..${c2}^${c1}..;kKKK0.${c2} lKl
21 | ${c2} :KA${c1}lKKKKKKKKK0o;...^cdxxOK0O/^^' ${c2}.0K:
22 | ${c2} kKA${c1}VKKKKKKKKKKKK0x;,,......,;od ${c2}lKP
23 | ${c2} '0KA${c1}VKKKKKKKKKKKKKKKKKK00KKOo^ ${c2}c00'
24 | ${c2} 'kKA${c1}VOxddxkOO00000Okxoc;'' ${c2}.dKV'
25 | ${c2} l0Ko. .c00l'
26 | ${c2} 'l0Kk:. .;xK0l'
27 | ${c2} 'lkK0xc;:,,,,:;odO0kl'
28 | ${c2} '^:ldxkkkkxdl:^
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/trisquel.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 38
4 | # number of colors: 2
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | c2=$(getColor 'light cyan') # Light Cyan
8 | fi
9 | startline="0"
10 | read -rd '' asciiLogo << 'EOF'
11 | ${c1} ▄▄▄▄▄▄
12 | ${c1} ▄█████████▄
13 | ${c1} ▄▄▄▄▄▄ ████▀ ▀████
14 | ${c1} ▄██████████▄ ████▀ ▄▄ ▀███
15 | ${c1} ▄███▀▀ ▀▀████ ███▄ ▄█ ███
16 | ${c1} ▄███ ▄▄▄ ████▄ ▀██████ ▄███
17 | ${c1} ███ █▀▀██▄ █████▄ ▀▀ ▄████
18 | ${c1} ▀███ ███ ███████▄▄ ▄▄██████
19 | ${c1} ▀███▄ ▄███ █████████████${c2}████▀
20 | ${c1} ▀█████████ ███████${c2}███▀▀▀
21 | ${c1} ▀▀███▀▀ ██${c2}████▀▀
22 | ${c2} ██████▀ ▄▄▄▄
23 | ${c2} █████▀ ████████
24 | ${c2} █████ ███▀ ▀███
25 | ${c2} ████▄ ██▄▄▄ ███
26 | ${c2} █████▄ ▀▀ ▄██
27 | ${c2} ██████▄▄▄████
28 | ${c2} █████▀▀
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/ubuntu.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 38
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'white') # White
7 | c2=$(getColor 'light red') # Light Red
8 | c3=$(getColor 'yellow') # Yellow
9 | fi
10 | startline=0
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c2} ./+o+-
13 | ${c1} yyyyy- ${c2}-yyyyyy+
14 | ${c1} ${c1}://+//////${c2}-yyyyyyo
15 | ${c3} .++ ${c1}.:/++++++/-${c2}.+sss/`
16 | ${c3} .:++o: ${c1}/++++++++/:--:/-
17 | ${c3} o:+o+:++.${c1}`..```.-/oo+++++/
18 | ${c3} .:+o:+o/.${c1} `+sssoo+/
19 | ${c1} .++/+:${c3}+oo+o:`${c1} /sssooo.
20 | ${c1} /+++//+:${c3}`oo+o${c1} /::--:.
21 | ${c1} +/+o+++${c3}`o++o${c2} ++////.
22 | ${c1} .++.o+${c3}++oo+:`${c2} /dddhhh.
23 | ${c3} .+.o+oo:.${c2} `oddhhhh+
24 | ${c3} +.++o+o`${c2}`-````.:ohdhhhhh+
25 | ${c3} `:o+++ ${c2}`ohhhhhhhhyo++os:
26 | ${c3} .o:${c2}`.syhhhhhhh/${c3}.oo++o`
27 | ${c2} /osyyyyyyo${c3}++ooo+++/
28 | ${c2} ````` ${c3}+oo+++o:
29 | ${c3} `oo++.
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/unix-generic.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 44
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light green') # Light Green
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1}
11 | ${c1}
12 | ${c1}
13 | ${c1} UUU UUU NNN NNN IIIII XXX XXXX
14 | ${c1} UUU UUU NNNN NNN III XX xXX
15 | ${c1} UUU UUU NNNNN NNN III XX xXX
16 | ${c1} UUU UUU NNN NN NNN III XXXX
17 | ${c1} UUU UUU NNN NN NNN III xXX
18 | ${c1} UUU UUU NNN NN NNN III xXXXX
19 | ${c1} UUU UUU NNN NNNNN III xXX XX
20 | ${c1} UUUuuuUUU NNN NNNN III xXX XX
21 | ${c1} UUUUU NNN NNN IIIII xXXx xXXx
22 | ${c1}
23 | ${c1}
24 | ${c1}
25 | EOF
26 |
--------------------------------------------------------------------------------
/ascii/unknown.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | startline=0
4 | read -rd '' asciiLogo << 'EOF'
5 | ${c1} -------${c2}--------${c3}-------
6 | ${c1} | ${c2}404: ${c3}distro ${c4}not ${c5}found |
7 | ${c1} -------${c2}--------${c3}-------
8 | ${c1} /
9 | ${c1} \
10 | ${c1} ____
11 | ${c1} / ${c2}> ${c3}>
12 | ${c1} | ${c2}_ ${c3}_|
13 | ${c1} / `${c2}==_${c3}x_${c4}==
14 | ${c1} / ${c3}|
15 | ${c1} / ${c2}\ ${c3}/
16 | ${c1} ___| ${c2}| ${c3}| |
17 | ${c1} / __| ${c2}| ${c3}| |
18 | ${c1} | (__\___${c2}\__)${c3}__)
19 | ${c1} \____)
20 | ${c1}
21 | EOF
22 |
--------------------------------------------------------------------------------
/ascii/void-linux.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 47
4 | # number of colors: 3
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'green') # Green
7 | c2=$(getColor 'light green') # Light Green
8 | c3=$(getColor 'dark grey') # Dark Grey
9 | fi
10 | startline="0"
11 | read -rd '' asciiLogo << 'EOF'
12 | ${c2} __.;=====;.__
13 | ${c2} _.=+==++=++=+=+===;.
14 | ${c2} -=+++=+===+=+=+++++=_
15 | ${c1} . ${c2}-=:`` `--==+=++==.
16 | ${c1} _vi, ${c2}` --+=++++:
17 | ${c1} .uvnvi. ${c2}_._ -==+==+.
18 | ${c1} .vvnvnI` ${c2}.;==|==;. :|=||=|.
19 | ${c3} +QmQQm${c1}pvvnv; ${c3}_yYsyQQWUUQQQm #QmQ#${c2}:${c3}QQQWUV$QQmL
20 | ${c3} -QQWQW${c1}pvvo${c3}wZ?.wQQQE${c2}==<${c3}QWWQ/QWQW.QQWW${c2}(: ${c3}jQWQE
21 | ${c3} -$QQQQmmU' jQQQ@${c2}+=<${c3}QWQQ)mQQQ.mQQQC${c2}+;${c3}jWQQ@'
22 | ${c3} -$WQ8Y${c1}nI: ${c3}QWQQwgQQWV${c2}`${c3}mWQQ.jQWQQgyyWW@!
23 | ${c1} -1vvnvv. ${c2}`~+++` ++|+++
24 | ${c1} +vnvnnv, ${c2}`-|===
25 | ${c1} +vnvnvns. . ${c2}:=-
26 | ${c1} -Invnvvnsi..___..=sv=. ${c2}`
27 | ${c1} +Invnvnvnnnnnnnnvvnn;.
28 | ${c1} ~|Invnvnvvnvvvnnv}+`
29 | ${c1} -~"|{*l}*|""~
30 | EOF
31 |
--------------------------------------------------------------------------------
/ascii/windows-classic.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 37
4 | # number of colors: 4
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light red') # Light Red
7 | c2=$(getColor 'light green') # Light Green
8 | c3=$(getColor 'light blue') # Light Blue
9 | c4=$(getColor 'yellow') # Yellow
10 | fi
11 | startline=1
12 | read -rd '' asciiLogo << 'EOF'
13 | ${c1} ,.=:!!t3Z3z.,
14 | ${c1} :tt:::tt333EE3
15 | ${c1} Et:::ztt33EEEL${c2} @Ee., ..,
16 | ${c1} ;tt:::tt333EE7${c2} ;EEEEEEttttt33#
17 | ${c1} :Et:::zt333EEQ.${c2} $EEEEEttttt33QL
18 | ${c1} it::::tt333EEF${c2} @EEEEEEttttt33F
19 | ${c1} ;3=*^```"*4EEV${c2} :EEEEEEttttt33@.
20 | ${c3} ,.=::::!t=., ${c1}`${c2} @EEEEEEtttz33QF
21 | ${c3} ;::::::::zt33)${c2} "4EEEtttji3P*
22 | ${c3} :t::::::::tt33.${c4}:Z3z..${c2} ``${c4} ,..g.
23 | ${c3} i::::::::zt33F${c4} AEEEtttt::::ztF
24 | ${c3} ;:::::::::t33V${c4} ;EEEttttt::::t3
25 | ${c3} E::::::::zt33L${c4} @EEEtttt::::z3F
26 | ${c3}{3=*^```"*4E3)${c4} ;EEEtttt:::::tZ`
27 | ${c3} `${c4} :EEEEtttt::::z7
28 | ${c4} "VEzjt:;;z>*`
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/windows.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 38
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | fi
8 | startline=1
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} ..,
11 | ${c1} ....,,:;+ccllll
12 | ${c1} ...,,+:; cllllllllllllllllll
13 | ${c1} ,cclllllllllll lllllllllllllllllll
14 | ${c1} llllllllllllll lllllllllllllllllll
15 | ${c1} llllllllllllll lllllllllllllllllll
16 | ${c1} llllllllllllll lllllllllllllllllll
17 | ${c1} llllllllllllll lllllllllllllllllll
18 | ${c1} llllllllllllll lllllllllllllllllll
19 | ${c1}
20 | ${c1} llllllllllllll lllllllllllllllllll
21 | ${c1} llllllllllllll lllllllllllllllllll
22 | ${c1} llllllllllllll lllllllllllllllllll
23 | ${c1} llllllllllllll lllllllllllllllllll
24 | ${c1} llllllllllllll lllllllllllllllllll
25 | ${c1} `'ccllllllllll lllllllllllllllllll
26 | ${c1} `'""*:: :ccllllllllllllllll
27 | ${c1} ````''"*::cll
28 | ${c1} ``
29 | EOF
30 |
--------------------------------------------------------------------------------
/ascii/zorin-os.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | # logo width: 40
4 | # number of colors: 1
5 | if [[ ${config_text[color]} != "off" ]]; then
6 | c1=$(getColor 'light blue') # Light Blue
7 | fi
8 | startline="0"
9 | read -rd '' asciiLogo << 'EOF'
10 | ${c1} ...................
11 | ${c1} :ooooooooooooooooooo/
12 | ${c1} /ooooooooooooooooooooo+
13 | ${c1} ''''''''''''''''''''''''
14 | ${c1}
15 | ${c1} .++++++++++++++++++/. :++-
16 | ${c1} -oooooooooooooooo/- :+ooooo:
17 | ${c1} :oooooooooooooo/- :+ooooooooo:
18 | ${c1} .oooooooooooo+- :+ooooooooooooo-
19 | ${c1} -oooooooo/- -+ooooooooooooooo:
20 | ${c1} .oooo+- -+ooooooooooooooooo-
21 | ${c1} .-- .-------------------.
22 | ${c1}
23 | ${c1} .//////////////////////-
24 | ${c1} :oooooooooooooooooooo/
25 | ${c1} :oooooooooooooooooo:
26 | ${c1} ''''''''''''''''''
27 | EOF
28 |
--------------------------------------------------------------------------------
/fetch:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # variables: script global
3 | # script version
4 | FETCH_VERSION="0.8.1"
5 | # directory where fetch library/ascii files live
6 | # (configurable with -l/--lib)
7 | FETCH_DATA_DIR="/usr/share/fetch"
8 | # default directory and filename where fetch config lives
9 | # (config locdation configurable with --config/-c)
10 | FETCH_DATA_USER_DIR="${XDG_CONFIG_HOME:-${HOME}}/.config/fetch"
11 | FETCH_CONFIG_FILENAME="config"
12 | LC_ALL=C
13 | LANG=C
14 |
15 | # static colorized phrases
16 | verboseStyle="\033[1;31m:: \033[0m"
17 | reset="\033[0m"
18 |
19 | # https://github.com/KittyKatt/screenFetch/issues/549
20 | if [[ ${OSTYPE} =~ linux || ${OSTYPE} == gnu ]]; then
21 | # issue seems to affect Ubuntu; add LSB directories if it appears on other distros too
22 | export GIO_EXTRA_MODULES="/usr/lib/x86_64-linux-gnu/gio/modules/:${GIO_MODULES}"
23 | fi
24 |
25 | # Set shopt extglob for filename-like globbing in case statements.
26 | # Check if exttglob was set before and store that as a variable.
27 | shopt -q extglob
28 | extglob_set=$?
29 | ((extglob_set)) && shopt -s extglob
30 |
31 | # functions: script output
32 | verboseOut() {
33 | [[ ${config_text[color]} == "off" ]] && reset=""
34 | [[ ${config_text[color]} == "off" ]] && verboseStyle=":: "
35 | # shellcheck disable=SC2154
36 | verbose+="${verboseStyle}${1}\n"
37 | }
38 | errorOut() {
39 | printf '\033[1;37m[[ \033[1;31m! \033[1;37m]] \033[0m%b\n' "${1}"
40 | }
41 |
42 | # functions: text
43 | strip_sequences() {
44 | strip="${1//$'\e['3[0-9]m/}"
45 | strip="${strip//$'\e['[0-9]m/}"
46 | strip="${strip//\\e\[[0-9]m/}"
47 | strip="${strip//$'\e['38\;5\;[0-9]m/}"
48 | strip="${strip//$'\e['38\;5\;[0-9][0-9]m/}"
49 | strip="${strip//$'\e['38\;5\;[0-9][0-9][0-9]m/}"
50 |
51 | printf '%s\n' "${strip}"
52 | }
53 | trim() {
54 | set -f
55 | # shellcheck disable=SC2086,SC2048
56 | set -- $*
57 | printf '%s\n' "${*//[[:space:]]/}"
58 | set +f
59 | }
60 |
61 | # functions: color
62 | # variables: color
63 | reset='\e[0m'
64 | colorize() {
65 | case ${1} in
66 | *bold)
67 | local color="${1//\,bold/}"
68 | printf $'\033[1m\033[38;5;%bm' "${color}"
69 | ;;
70 | *) printf $'\033[0m\033[38;5;%bm' "${1}" ;;
71 | esac
72 | }
73 | getColor() {
74 | local tmp_color=""
75 | if [[ -n ${1} ]]; then
76 | if [[ ${BASH_VERSINFO[0]} -ge '4' ]]; then
77 | if [[ ${BASH_VERSINFO[0]} -eq '4' && ${BASH_VERSINFO[1]} -gt '1' ]] \
78 | || [[ ${BASH_VERSINFO[0]} -gt '4' ]]; then
79 | tmp_color=${1,,}
80 | else
81 | tmp_color="$(tr '[:upper:]' '[:lower:]' <<< "${1}")"
82 | fi
83 | else
84 | tmp_color="$(tr '[:upper:]' '[:lower:]' <<< "${1}")"
85 | fi
86 |
87 | case "${tmp_color}" in
88 | 'black') color_ret='\033[0m\033[30m' ;;
89 | 'red') color_ret='\033[0m\033[31m' ;;
90 | 'green') color_ret='\033[0m\033[32m' ;;
91 | 'brown') color_ret='\033[0m\033[33m' ;;
92 | 'blue') color_ret='\033[0m\033[34m' ;;
93 | 'purple') color_ret='\033[0m\033[35m' ;;
94 | 'cyan') color_ret='\033[0m\033[36m' ;;
95 | 'yellow') color_ret='\033[0m\033[1;33m' ;;
96 | 'white') color_ret='\033[0m\033[1;37m' ;;
97 | 'dark grey') color_ret='\033[0m\033[1;30m' ;;
98 | 'light red') color_ret='\033[0m\033[1;31m' ;;
99 | 'light green') color_ret='\033[0m\033[1;32m' ;;
100 | 'light blue') color_ret='\033[0m\033[1;34m' ;;
101 | 'light purple') color_ret='\033[0m\033[1;35m' ;;
102 | 'light cyan') color_ret='\033[0m\033[1;36m' ;;
103 | 'light grey' | 'bold white') color_ret='\033[0m\033[37m' ;;
104 | ?([1])?([0-9])[0-9]?(,bold)) color_ret=$(colorize "${tmp_color}") ;;
105 | ?([2])?([0-4])[0-9]?(,bold)) color_ret=$(colorize "${tmp_color}") ;;
106 | ?([2])?([5])[0-6]?(,bold)) color_ret=$(colorize "${tmp_color}") ;;
107 | 'rand')
108 | _color=$((RANDOM % 255))
109 | # shellcheck disable=SC2248
110 | color_ret="$(colorize ${_color})"
111 | ;;
112 | *)
113 | errorOut "That color will not work"
114 | exit 1
115 | ;;
116 | esac
117 |
118 | [[ -n ${color_ret} ]] && printf '%b' "${color_ret}"
119 | fi
120 | }
121 |
122 | ###############################
123 | # functions: output
124 | get_info() {
125 | # Check for subtitle
126 | local info info_subtitle path output
127 | info="$(trim "${1}")"
128 | info_subtitle="config_${1}[subtitle]"
129 |
130 | # Unset printed to start fresh
131 | unset -v printed
132 |
133 | # Store library file path to variable
134 | path="${FETCH_DATA_DIR}/lib/detection/${info}.sh"
135 |
136 | # Check if library file exists
137 | if [[ -f ${path} ]]; then
138 | # source library file and run detection
139 | # shellcheck disable=SC1090
140 | . "${path}"
141 | "detect_${info}"
142 |
143 | # build variable name
144 | infodisplay="my_${info}"
145 |
146 | # if print_info was called manually, break
147 | [[ -n ${printed} ]] && return
148 |
149 | # Use shell expansion to trim function detection variable
150 | output="$(trim "${!infodisplay}")"
151 |
152 | if [[ -n ${!info_subtitle} ]]; then
153 | print_info "${!info_subtitle}" "${output}"
154 | else
155 | print_info "${output}"
156 | fi
157 | fi
158 | }
159 | print_info() {
160 | local info subtitle
161 | info="${1}"
162 |
163 | if [[ -n ${2} ]]; then
164 | subtitle="$(trim "${1}")"
165 | info="${2}"
166 | fi
167 |
168 | if [[ -n ${info} ]]; then
169 | if [[ -n ${subtitle} ]]; then
170 | # shellcheck disable=SC2154
171 | printf '%b\n' "${text_padding}${subtitle}${config_text[info_separator]} ${info}"
172 | else
173 | printf '%b\n' "${text_padding}${info}"
174 | fi
175 | fi
176 |
177 | printed="1"
178 |
179 | ((info_height++))
180 | }
181 | print_ascii() {
182 | local logo="${1}"
183 |
184 | # Random coloring support
185 | if [[ ${config_ascii['colors']} == "random" ]]; then
186 | declare _randc
187 | local n=1
188 | while [[ ${logo} =~ \$\{[c][1-6]\} ]]; do
189 | _randc="$(getColor 'rand')"
190 | logo="${logo//\$\{c${n}\}/${_randc}}"
191 | ((n++))
192 | done
193 | unset -v n
194 | fi
195 |
196 | # Expand color variables
197 | # shellcheck disable=SC2250
198 | {
199 | logo="${logo//\$\{c1\}/$c1}"
200 | logo="${logo//\$\{c2\}/$c2}"
201 | logo="${logo//\$\{c3\}/$c3}"
202 | logo="${logo//\$\{c4\}/$c4}"
203 | logo="${logo//\$\{c5\}/$c5}"
204 | logo="${logo//\$\{c6\}/$c6}"
205 | }
206 |
207 | # Let's output!
208 | if [[ ${config_text[display]} == "on" ]]; then
209 | # shellcheck disable=SC2154
210 | gap=${config_ascii[gap]}
211 |
212 | # Format line with gap after ASCII for info display
213 | ((text_padding = ascii_len + gap))
214 | text_padding="\e[${text_padding}C"
215 | # logo="$(printf "%b \e[%sC" "${logo}" "${text_padding}")"
216 |
217 | # Display ASCII art and detected info
218 | # shellcheck disable=SC2154
219 | if [[ ${config_text[color]} != "off" ]]; then
220 | printf '%b\n' "${logo} ${reset}"
221 | else
222 | printf '%b\n' "${logo}"
223 | fi
224 |
225 | # Cleanup
226 | # shellcheck disable=SC2031
227 | unset _tmp
228 | else
229 | if [[ ${config_text[color]} != "off" ]]; then
230 | printf '%b\n' "${logo} ${reset}"
231 | else
232 | printf '%b\n' "${logo}"
233 | fi
234 | fi
235 | }
236 |
237 | #############################
238 | # function: Usage
239 | usage() {
240 | printf "Help!\n"
241 | }
242 |
243 | ##############################
244 | # function: Version
245 | versioninfo() {
246 | printf 'fetch %s\n' "${FETCH_VERSION}"
247 | }
248 |
249 | ###############################
250 | # function: Cache uname
251 | # cache uname output to not spawn more than one
252 | # shellcheck disable=SC2034
253 | cache_uname() {
254 | # Cache the output of uname so we don't
255 | # have to spawn it multiple times.
256 | # shellcheck disable=SC2312
257 | IFS=" " read -ra uname <<< "$(uname -srm)"
258 |
259 | kernel_name="${uname[0]}"
260 | kernel_version="${uname[1]}"
261 | kernel_machine="${uname[2]}"
262 |
263 | if [[ ${kernel_name} == "Darwin" ]]; then
264 | # macOS can report incorrect versions unless this is 0.
265 | # https://github.com/dylanaraps/neofetch/issues/1607
266 | export SYSTEM_VERSION_COMPAT=0
267 | # shellcheck disable=SC2312
268 | IFS=$'\n' read -d "" -ra sw_vers <<< "$(awk -F'<|>' '/key|string/ {print $3}' \
269 | "/System/Library/CoreServices/SystemVersion.plist")"
270 | for ((i = 0; i < ${#sw_vers[@]}; i += 2)); do
271 | case ${sw_vers[i]} in
272 | ProductName) darwin_name=${sw_vers[i + 1]} ;;
273 | ProductVersion) osx_version=${sw_vers[i + 1]} ;;
274 | ProductBuildVersion) osx_build=${sw_vers[i + 1]} ;;
275 | *) osx_build= ;;
276 | esac
277 | done
278 | fi
279 | }
280 |
281 | main() {
282 | # cache uname output to use later
283 | cache_uname
284 |
285 | # get simple info
286 | # shellcheck disable=SC1090
287 | {
288 | . "${FETCH_DATA_DIR}/lib/detection/os.sh"
289 | . "${FETCH_DATA_DIR}/lib/detection/distro.sh"
290 | }
291 | detect_os
292 | detect_distro
293 |
294 | if [[ ${config_text[color]} != "off" ]]; then
295 | # TRAP script exit, unhide cursor
296 | trap 'printf "\e[?25h\e[?7h"' EXIT
297 | # hide cursor, disable line wrap
298 | printf '\e[?25l\e[?7l'
299 | fi
300 |
301 | # ascii display
302 | if [[ ${config_ascii[display]} == "on" ]]; then
303 | # Get logo max width
304 | # shellcheck disable=SC2154
305 | while IFS=$'\n' read -r line; do
306 | line=${line//\\\\/\\}
307 | line=${line//█/ }
308 | ((++lines, ${#line} > ascii_len)) && ascii_len="${#line}"
309 | done <<< "${asciiLogo//\$\{??\}/}"
310 | # Loop over logo and output
311 | # shellcheck disable=SC2154
312 | while IFS=$'\n' read -r line; do
313 | print_ascii "${line}"
314 | done <<< "${asciiLogo}"
315 |
316 | # reset cursor back to top to print info
317 | [[ ${config_text[display]} == "on" ]] && printf '\e[%sA\e[9999999D' "${lines:-0}"
318 | fi
319 |
320 | # info display
321 | if [[ ${config_text[display]} == "on" ]]; then
322 | # shellcheck disable=SC2154
323 | [[ ${config_ascii[display]} == "on" ]] \
324 | && until ((startline < 1)); do
325 | printf '%b' '\n'
326 | ((startline--))
327 | done
328 |
329 | IFS=" " read -ra display_array <<< "${config_global[info]}"
330 | for g in "${display_array[@]}"; do
331 | subtitle="config_${g}[subtitle]"
332 | get_info "${g}"
333 | done
334 |
335 | [[ ${config_ascii[display]} == "on" ]] \
336 | && if ((lines > info_height)); then
337 | # If the ascii art is taller than the info.
338 | lines=$((lines - info_height - startline))
339 | fi
340 |
341 | printf -v nlines "%${lines}s"
342 | printf "%b" "${nlines// /\\n}"
343 | fi
344 |
345 | if [[ ${config_global[verbose]} == "on" ]]; then
346 | [[ ${config_text[color]} == "off" ]] && reset=""
347 | [[ ${config_text[color]} == "off" ]] && verboseStyle=""
348 | printf '%b\n' "${verboseStyle}Current fetch version: ${FETCH_VERSION}${reset}"
349 | printf '%b\n' "${verboseStyle}Configuration sourced: ${FETCH_CONFIG}${reset}"
350 | printf '%b\n' "${verboseStyle}Libraries sourced from: ${FETCH_DATA_DIR}${reset}"
351 | printf '%b' "${verbose}${reset}"
352 | fi
353 | }
354 |
355 | # Catch configuration flag
356 | [[ $* != *--config* ]] && FETCH_CONFIG="${FETCH_DATA_USER_DIR}/${FETCH_CONFIG_FILENAME}"
357 |
358 | # Execution flag detection
359 | while [[ $* =~ (--help|-h|--version|-V|--config|-c|--lib|-l) ]]; do
360 | case ${1} in
361 | --help | -h)
362 | usage
363 | exit 0
364 | ;;
365 | --version | -V)
366 | versioninfo
367 | exit 0
368 | ;;
369 | --config | -c)
370 | FETCH_CONFIG="${2}"
371 | shift 2
372 | ;;
373 | --lib | -l)
374 | FETCH_DATA_DIR="${2}"
375 | shift 2
376 | ;;
377 | *) break ;;
378 | esac
379 | done
380 |
381 | if [[ -f ${FETCH_DATA_DIR:-/usr/share/fetch}/lib/config.sh ]]; then
382 | # shellcheck disable=SC1090
383 | . "${FETCH_DATA_DIR:-/usr/share/fetch}/lib/config.sh"
384 | else
385 | errorOut "Error: Could not find config.sh library in ${FETCH_DATA_DIR:-/usr/share/fetch}/lib/"
386 | exit 1
387 | fi
388 |
389 | fetchConfig "${FETCH_CONFIG}"
390 |
391 | # shellcheck disable=SC2034
392 | while getopts ":hvVNRTLD:A:" flags; do
393 | # shellcheck disable=SC2154
394 | case ${flags} in
395 | v) config_global[verbose]="on" ;;
396 | D) my_distro="${OPTARG}" ;;
397 | A) ascii_distro="${OPTARG}" ;;
398 | N) config_text[color]="off" ;;
399 | T) config_ascii[display]="off" ;;
400 | L) config_text[display]="off" ;;
401 | R) config_ascii['colors']="random" ;;
402 | :)
403 | errorOut "Error: You're missing an argument somewhere. Exiting."
404 | exit 1
405 | ;;
406 | ?)
407 | errorOut "Error: Invalid flag somewhere. Exiting."
408 | exit 1
409 | ;;
410 | *)
411 | errorOut "Error"
412 | exit 1
413 | ;;
414 | esac
415 | done
416 |
417 | main
418 |
419 | ((extglob_set)) && shopt -u extglob
420 |
--------------------------------------------------------------------------------
/fetch.1:
--------------------------------------------------------------------------------
1 | .TH FETCH "1" "March 2021" "0.7.2" "User Commands"
2 |
3 | .SH NAME
4 | fetch \- A BASH system information and distribution logo display tool.
5 |
6 | .SH SYNOPSIS
7 | .B fetch \fR[OPTIONAL FLAGS]
8 |
9 | .SH DESCRIPTION
10 | fetch is a script written in Bash 4.0+ and is used to generate
11 | a block of system and setup info, with an optional included ASCII
12 | logo of your detected distribution (or the logo of your choice).
13 | It will detect your current running OS, distribution, shell,
14 | themes, and a multitude of hardware information to display in a
15 | nicely formatted and readable block of text. Easily extendable and
16 | configurable, fetch aims to be as user friendly as possible.
17 | .PP
18 | Supported GNU/Linux Distributions:
19 | .IP
20 | .\" @supported_distros_start@
21 | ALDOS, Alpine Linux, Amazon Linux, Arch Linux, Artix Linux,
22 | blackPanther OS, BunsenLabs, CentOS, Chakra, Chrome/Chromium OS, CRUX,
23 | Debian, Deepin, Devuan, DraugerOS, elementary OS, Exherbo, Fedora,
24 | Frugalware, Funtoo, Gentoo, Guix System, Hyperbola GNU/Linux-libre,
25 | Kali Linux, KaOS, KDE neon, Kogaion, Linux Mint, LMDE, Mageia,Manjaro,
26 | Netrunner, NixOS, openSUSE, OS Elbrus, Parabola GNU/Linux-libre, Pardus,
27 | Parrot Security, PCLinuxOS, PeppermintOS, Proxmox VE, PureOS, Qubes OS,
28 | Raspbian, Red Hat Enterprise Linux, ROSA, Sabayon, SailfishOS, Scientific Linux,
29 | Siduction, Solus, Source Mage GNU/Linux, SparkyLinux, SteamOS,
30 | SUSE Linux Enterprise, TinyCore, Trisquel, Ubuntu, Void and Zorin OS.
31 | .\" @supported_distros_end@
32 | .PP
33 | Other Supported Systems:
34 | .IP
35 | .\" @supported_other_start@
36 | Dragonfly/Free/Open/Net BSD, Haiku, Mac OS X, Windows, and GNU/Hurd.
37 | .\" @supported_other_end@
38 | .PP
39 | In additiont to the above, the following extra ASCII art is included:
40 | .IP
41 | .\" @additiona_ascii_start@
42 | Manjaro (tree), Arch Linux (older Trek-like logo), Windows classic logo,
43 | FreeBSD (older logo), Linux generic Tux, UNIX generic (ASCII "UNIX"),
44 | Mac classic logo, and a custom Unknown distro cat art.
45 | .\" @additiona_ascii_end@
46 |
47 | .SH OPTIONS
48 | .TP
49 | .B \--lib / -l /path/to/directory
50 | Specify prefix path for fetch library files. The default
51 | for this is /usr/share/fetch
52 | .TP
53 | .B \--config/ -c /path/to/file
54 | Specify a configuratio file to use. The default for this is
55 | ~/.config/fetch/config
56 | .TP
57 | .B \-v
58 | Verbose output.
59 | .TP
60 | .B \-N
61 | Strip all color from output.
62 | .TP
63 | .B \-D 'DISTRO'
64 | Here you can specify your distribution for the script
65 | to use. Surrounding quotes are required.
66 | .TP
67 | .B \-A 'DISTRO ART'
68 | Here you can specify the distribution art that you want
69 | displayed. This is for when you want your distro
70 | detected but want to display a different logo.
71 | .TP
72 | .B \-T
73 | Display text only output.
74 | .TP
75 | .B \-L
76 | Display logo only output.
77 | .TP
78 | .B \-R
79 | Display randomly colored logo output.
80 | .TP
81 | .B \-V, \-\-version
82 | Display current script version.
83 | .TP
84 | .B \-h, \-\-help
85 | Display this help.
86 |
87 | .SH "SEE ALSO"
88 | http://github.com/KittyKatt/fetch
89 |
90 | .SH AUTHOR
91 | Created and licensed by Brett Bohnenkamper
92 | under the MIT license. Portions of this code that were pulled from
93 | screenFetch contributions are licensed under GPLv3. You should have
94 | received a copy of both of these licenses with this source.
95 |
96 | .SH REPORTING BUGS
97 | Report bugs to
98 |
99 | .SH COPYRIGHT
100 | This is free software; you can redistribute it and/or modify it under
101 | the terms of the MIT license.
102 |
--------------------------------------------------------------------------------
/lib/config.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154
3 | fetchConfig() {
4 | if [[ -f ${1} ]]; then
5 | while read -r line; do
6 | if [[ ${line} =~ ^\[[[:alnum:]]+\] ]]; then
7 | arrname="config_${line//[^[:alnum:]]/}"
8 | declare -gA "${arrname}"
9 | elif [[ ${line} =~ ^([_[:alpha:]][_[:alnum:]]*)"="(.*) ]]; then
10 | # shellcheck disable=SC2086
11 | {
12 | _arr=${arrname}[${BASH_REMATCH[1]}]
13 | [[ -z ${!_arr} ]] && declare -g ${arrname}[${BASH_REMATCH[1]}]="${BASH_REMATCH[2]//\"/}"
14 | unset _arr
15 | }
16 | fi
17 | done < "${1}"
18 | else
19 | errorOut "No user configuration found, looking for sample config..."
20 | if [[ -f ${FETCH_DATA_DIR:-/usr/share/fetch}/sample.config.conf ]]; then
21 | errorOut "Found sample configuration at ${FETCH_DATA_DIR:-/usr/share/fetch}/sample.config.conf. Copying to default path..."
22 | cp "${FETCH_DATA_DIR:-/usr/share/fetch}/sample.config.conf" "${FETCH_DATA_USER_DIR}/${FETCH_CONFIG_FILENAME}"
23 | if [[ -f ${FETCH_DATA_USER_DIR}/${FETCH_CONFIG_FILENAME} ]]; then
24 | errorOut "Copied configuration file to ${FETCH_DATA_USER_DIR}/${FETCH_CONFIG_FILENAME}"
25 | errorOut "Please run fetch again."
26 | exit 0
27 | else
28 | errorOut "Failed to copy configuration. Please open a bug report at ${FETCH_SRC_LOCATION}"
29 | exit 1
30 | fi
31 | else
32 | errorOut "Could not find sample configuration file...did you install fetch correctly?"
33 | errorOut" Please consult ${FETCH_SRC_LOCATION} or your package manager for installation instructions"
34 | exit 1
35 | fi
36 |
37 | fi
38 | }
39 |
--------------------------------------------------------------------------------
/lib/detection/cpu.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154
3 | detect_cpu() {
4 | case ${my_os} in
5 | "Mac OS X" | "macOS")
6 | my_cpu="$(sysctl -n machdep.cpu.brand_string)"
7 | _cores=$(sysctl -n hw.logicalcpu_max)
8 | ;;
9 | "Linux" | "Windows")
10 | _file="/proc/cpuinfo"
11 | case ${kernel_machine} in
12 | "frv" | "hppa" | "m68k" | "openrisc" | "or"* | "powerpc" | "ppc"* | "sparc"*)
13 | my_cpu="$(awk -F':' '/^cpu\t|^CPU/ {printf $2; exit}' "${_file}")"
14 | ;;
15 | "s390"*)
16 | my_cpu="$(awk -F'=' '/machine/ {print $4; exit}' "${_file}")"
17 | ;;
18 | "ia64" | "m32r")
19 | my_cpu="$(awk -F':' '/model/ {print $2; exit}' "${_file}")"
20 | [[ -z ${my_cpu} ]] && my_cpu="$(awk -F':' '/family/ {printf $2; exit}' "${_file}")"
21 | ;;
22 | *)
23 | my_cpu="$(awk -F '\\s*: | @' \
24 | '/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {
25 | cpu=$2; if ($1 == "Hardware") exit } END { print cpu }' "${_file}")"
26 | ;;
27 | esac
28 |
29 | _speed_dir="/sys/devices/system/cpu/cpu0/cpufreq"
30 |
31 | # Select the right temperature file.
32 | _temperature_files="$(ls -A /sys/class/hwmon)"
33 | [[ -d /sys/class/hwmon && -n ${_temperature_files} ]] \
34 | && for temp_dir in /sys/class/hwmon/*; do
35 | if [[ -n ${temp_dir} ]]; then
36 | [[ "$(< "${temp_dir}/name")" =~ (cpu_thermal|coretemp|fam15h_power|k10temp) ]] && {
37 | temp_dirs=("${temp_dir}"/temp*_input)
38 | temp_dir=${temp_dirs[0]}
39 | break
40 | }
41 | fi
42 | done
43 |
44 | # Get CPU speed.
45 | if [[ -d ${_speed_dir} ]]; then
46 | _speed="$(< "${_speed_dir}/bios_limit")" \
47 | || _speed="$(< "${_speed_dir}/scaling_max_freq")" \
48 | || _speed="$(< "${_speed_dir}/cpuinfo_max_freq")"
49 | _speed="$((_speed / 1000))"
50 | else
51 | _speed="$(awk -F ': |\\.' '/cpu MHz|^clock/ {printf $2; exit}' "${_file}")"
52 | _speed="${_speed/MHz/}"
53 | fi
54 |
55 | # Get CPU temp.
56 | [[ -f ${temp_dir} ]] && _deg="$(($(< "${temp_dir}") * 100 / 10000))"
57 |
58 | # Get CPU cores.
59 | _cores="$(grep -c "^processor" "${_file}")"
60 | ;;
61 | *) return ;;
62 | esac
63 |
64 | # Remove un-needed patterns from cpu output.
65 | my_cpu="${my_cpu//(TM)/}"
66 | my_cpu="${my_cpu//(tm)/}"
67 | my_cpu="${my_cpu//(R)/}"
68 | my_cpu="${my_cpu//(r)/}"
69 | my_cpu="${my_cpu//?([+[:space:]])CPU/}"
70 | my_cpu="${my_cpu//Processor/}"
71 | my_cpu="${my_cpu//Dual-Core/}"
72 | my_cpu="${my_cpu//Quad-Core/}"
73 | my_cpu="${my_cpu//Six-Core/}"
74 | my_cpu="${my_cpu//Eight-Core/}"
75 | my_cpu="${my_cpu//[1-9][0-9]-Core/}"
76 | my_cpu="${my_cpu//[0-9]-Core/}"
77 | my_cpu="${my_cpu//, * Compute Cores/}"
78 | my_cpu="${my_cpu//Core / }"
79 | my_cpu="${my_cpu//(\"AuthenticAMD\"*)/}"
80 | my_cpu="${my_cpu//with Radeon * Graphics/}"
81 | my_cpu="${my_cpu// with Radeon * Gfx/}"
82 | my_cpu="${my_cpu//, altivec supported/}"
83 | my_cpu="${my_cpu//FPU*/}"
84 | my_cpu="${my_cpu//Chip Revision*/}"
85 | my_cpu="${my_cpu//Technologies, Inc/}"
86 | my_cpu="${my_cpu//Core2/Core 2}"
87 |
88 | # Trim spaces from core and speed output
89 | _cores="${_cores//[[:space:]]/}"
90 | _speed="${_speed//[[:space:]]/}"
91 |
92 | # Remove CPU brand from the output.
93 | # shellcheck disable=SC2154
94 | if [[ ${config_cpu[brand]} == "off" ]]; then
95 | my_cpu="${my_cpu/AMD /}"
96 | my_cpu="${my_cpu/Intel /}"
97 | my_cpu="${my_cpu/Core? Duo /}"
98 | my_cpu="${my_cpu/Qualcomm /}"
99 | fi
100 |
101 | # Add CPU cores to the output.
102 | # shellcheck disable=SC2154
103 | [[ ${config_cpu[cores]} != "off" && -n ${_cores} ]] \
104 | && case ${my_os} in
105 | "Mac OS X" | "macOS") my_cpu="${my_cpu/@/(${_cores}) @}" ;;
106 | *) my_cpu="${my_cpu} (${_cores})" ;;
107 | esac
108 |
109 | # Add CPU speed to the output.
110 | # shellcheck disable=SC2154
111 | if [[ ${config_cpu[speed]} != "off" && -n ${_speed} ]]; then
112 | if ((_speed < 1000)); then
113 | my_cpu="${my_cpu} @ ${_speed}MHz"
114 | else
115 | _speed="${_speed:0:1}.${_speed:1}"
116 | my_cpu="${my_cpu} @ ${_speed}GHz"
117 | fi
118 | fi
119 |
120 | # Add CPU temp to the output.
121 | # shellcheck disable=SC2154
122 | {
123 | if [[ ${config_cpu[temp]} != "off" && -n ${_deg} ]]; then
124 | _deg="${_deg//./}"
125 | # Convert to Fahrenheit if enabled
126 | [[ ${config_cpu[temp]} == "F" ]] && _deg="$((_deg * 90 / 50 + 320))"
127 | # Format the output
128 | _deg="[${_deg/${_deg: -1}/}.${_deg: -1}°${config_cpu[temp]:-C}]"
129 | my_cpu="${my_cpu} ${_deg}"
130 | fi
131 | }
132 |
133 | # Return my_cpu value for print_info()
134 | #printf '%b' "$(trim "${my_cpu}")"
135 |
136 | # TODO: check verbosity here instead of in function, save function call
137 | verboseOut "Finding CPU...found as '${my_cpu}'."
138 | }
139 |
--------------------------------------------------------------------------------
/lib/detection/distro.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154
3 | detect_distro() {
4 | [[ -n ${my_distro} ]] && return
5 |
6 | local distro_detect=
7 | my_distro="Unknown"
8 | if [[ ${my_os} == "Linux" ]] && [[ ${my_distro} == "Unknown" ]]; then
9 | # LSB Release Check
10 | if type -p lsb_release > /dev/null 2>&1; then
11 | distro_detect="$(lsb_release -si)"
12 | distro_release="$(lsb_release -sr)"
13 | distro_codename="$(lsb_release -sc)"
14 | case ${distro_detect} in
15 | "archlinux" | "Arch Linux" | "arch" | "Arch" | "archarm")
16 | my_distro="Arch Linux"
17 | unset distro_release
18 | ;;
19 | "ALDOS" | "Aldos")
20 | my_distro="ALDOS"
21 | ;;
22 | "ArcoLinux")
23 | my_distro="ArcoLinux"
24 | unset distro_release
25 | ;;
26 | "artixlinux" | "Artix Linux" | "artix" | "Artix" | "Artix release")
27 | my_distro="Artix"
28 | ;;
29 | "blackPantherOS" | "blackPanther" | "blackpanther" | "blackpantheros")
30 | # shellcheck disable=SC2034,SC1091,SC2153
31 | {
32 | my_distro=$(
33 | source /etc/lsb-release
34 | printf '%s' "${DISTRIB_ID}"
35 | )
36 | distro_release=$(
37 | source /etc/lsb-release
38 | printf '%s' "${DISTRIB_RELEASE}"
39 | )
40 | distro_codename=$(
41 | source /etc/lsb-release
42 | printf '%s' "${DISTRIB_CODENAME}"
43 | )
44 | }
45 | ;;
46 | "Chakra")
47 | my_distro="Chakra"
48 | unset distro_release
49 | ;;
50 | "CentOSStream")
51 | my_distro="CentOS Stream"
52 | ;;
53 | "BunsenLabs")
54 | # shellcheck disable=SC2034,SC1091,SC2153
55 | {
56 | my_distro=$(
57 | source /etc/lsb-release
58 | printf '%s' "${DISTRIB_ID}"
59 | )
60 | distro_release=$(
61 | source /etc/lsb-release
62 | printf '%s' "${DISTRIB_RELEASE}"
63 | )
64 | distro_codename=$(
65 | source /etc/lsb-release
66 | printf '%s' "${DISTRIB_CODENAME}"
67 | )
68 | }
69 | ;;
70 | "Debian")
71 | my_distro="Debian"
72 | ;;
73 | "Deepin")
74 | my_distro="Deepin"
75 | ;;
76 | "elementary" | "elementary OS")
77 | my_distro="elementary OS"
78 | ;;
79 | "EvolveOS")
80 | my_distro="Evolve OS"
81 | ;;
82 | "Sulin")
83 | my_distro="Sulin"
84 | distro_release=$(awk -F'=' '/^ID_LIKE=/ {print $2}' /etc/os-release)
85 | distro_codename="Roolling donkey" # this is not wrong :D
86 | ;;
87 | "KaOS" | "kaos")
88 | my_distro="KaOS"
89 | ;;
90 | "frugalware")
91 | my_distro="Frugalware"
92 | unset distro_codename
93 | unset distro_release
94 | ;;
95 | "Gentoo")
96 | my_distro="Gentoo"
97 | ;;
98 | "Hyperbola GNU/Linux-libre" | "Hyperbola")
99 | my_distro="Hyperbola GNU/Linux-libre"
100 | unset distro_codename
101 | unset distro_release
102 | ;;
103 | "Kali" | "Debian Kali Linux")
104 | my_distro="Kali Linux"
105 | if [[ ${distro_codename} =~ "kali-rolling" ]]; then
106 | unset distro_codename
107 | unset distro_release
108 | fi
109 | ;;
110 | "Lunar Linux" | "lunar")
111 | my_distro="Lunar Linux"
112 | ;;
113 | "ManjaroLinux")
114 | my_distro="Manjaro"
115 | ;;
116 | "neon" | "KDE neon")
117 | my_distro="KDE neon"
118 | unset distro_codename
119 | unset distro_release
120 | ;;
121 | "Ol" | "ol" | "Oracle Linux")
122 | my_distro="Oracle Linux"
123 | [[ -f /etc/oracle-release ]] && distro_release="$(sed 's/Oracle Linux //' /etc/oracle-release)"
124 | ;;
125 | "LinuxMint")
126 | my_distro="Mint"
127 | ;;
128 | "openSUSE" | "openSUSE project" | "SUSE LINUX" | "SUSE" | *SUSELinuxEnterprise*)
129 | my_distro="openSUSE"
130 | ;;
131 | "Parabola GNU/Linux-libre" | "Parabola")
132 | my_distro="Parabola GNU/Linux-libre"
133 | unset distro_codename
134 | unset distro_release
135 | ;;
136 | "Parrot" | "Parrot Security")
137 | my_distro="Parrot Security"
138 | ;;
139 | "PCLinuxOS")
140 | my_distro="PCLinuxOS"
141 | unset distro_codename
142 | unset distro_release
143 | ;;
144 | "Peppermint")
145 | my_distro="Peppermint"
146 | unset distro_codename
147 | ;;
148 | "rhel" | *RedHatEnterprise*)
149 | my_distro="Red Hat Enterprise Linux"
150 | ;;
151 | "RosaDesktopFresh")
152 | my_distro="ROSA"
153 | # shellcheck disable=SC2312
154 | {
155 | distro_release=$(grep 'VERSION=' /etc/os-release | cut -d ' ' -f3 | cut -d '"' -f1)
156 | distro_codename=$(grep 'PRETTY_NAME=' /etc/os-release | cut -d ' ' -f4,4)
157 | }
158 | ;;
159 | "SailfishOS")
160 | my_distro="SailfishOS"
161 | ;;
162 | "Sparky" | "SparkyLinux")
163 | my_distro="SparkyLinux"
164 | ;;
165 | "Ubuntu")
166 | my_distro="Ubuntu"
167 | ;;
168 | "Void" | "VoidLinux")
169 | my_distro="Void Linux"
170 | unset distro_codename
171 | unset distro_release
172 | ;;
173 | "Zorin")
174 | my_distro="Zorin OS"
175 | unset distro_codename
176 | ;;
177 | *)
178 | my_distro="Unknown"
179 | ;;
180 | esac
181 | fi
182 |
183 | # Existing File Check
184 | # TODO: Lots of optimization with these if statements to do
185 | if [[ ${my_distro} == "Unknown" ]]; then
186 | if [[ -f "/etc/mcst_version" ]]; then
187 | my_distro="OS Elbrus"
188 | distro_release="$(tail -n 1 /etc/mcst_version)"
189 | if [[ -n ${distro_release} ]]; then
190 | distro_more="${distro_release}"
191 | fi
192 | fi
193 | # shellcheck disable=SC2312
194 | if [[ -n "$(uname -o 2> /dev/null)" ]]; then
195 | os="$(uname -o)"
196 | case ${os} in
197 | "EndeavourOS") my_distro="EndeavourOS" ;;
198 | "GNU/Linux")
199 | if type -p crux > /dev/null 2>&1; then
200 | my_distro="CRUX"
201 | distro_more="$(crux | awk '{print $3}')"
202 | fi
203 | if type -p nixos-version > /dev/null 2>&1; then
204 | my_distro="NixOS"
205 | distro_more="$(nixos-version)"
206 | fi
207 | if type -p sorcery > /dev/null 2>&1; then
208 | my_distro="SMGL"
209 | fi
210 | if (type -p guix && type -p herd) > /dev/null 2>&1; then
211 | my_distro="Guix System"
212 | fi
213 | ;;
214 | *) return ;;
215 | esac
216 | fi
217 |
218 | if [[ ${my_distro} == "Unknown" ]]; then
219 | if [[ -f /etc/os-release ]]; then
220 | os_release="/etc/os-release"
221 | elif [[ -f /usr/lib/os-release ]]; then
222 | os_release="/usr/lib/os-release"
223 | fi
224 | if [[ -n ${os_release} ]]; then
225 | # shellcheck disable=SC2248
226 | distrib_id="$(< ${os_release})"
227 | for l in ${distrib_id}; do
228 | if [[ ${l} =~ ^ID= ]]; then
229 | distrib_id=${l//*=/}
230 | distrib_id=${distrib_id//\"/}
231 | break 1
232 | fi
233 | done
234 | if [[ -n ${distrib_id} ]]; then
235 | if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
236 | distrib_id=$(for d in ${distrib_id}; do printf '%s' "${d^} "; done)
237 | my_distro=${distrib_id% }
238 | unset distrib_id
239 | else
240 | distrib_id=$(
241 | for d in ${distrib_id}; do
242 | FIRST_LETTER=$(printf '%s' "${d:0:1}" | tr "[:lower:]" "[:upper:]")
243 | printf '%s' "${FIRST_LETTER}${d:1} "
244 | done
245 | )
246 | my_distro=${distrib_id% }
247 | unset distrib_id
248 | fi
249 | fi
250 |
251 | # Hotfixes
252 | [[ ${my_distro} == "Opensuse-tumbleweed" ]] && my_distro="openSUSE" && distro_more="Tumbleweed"
253 | [[ ${my_distro} == "Opensuse-leap" ]] && my_distro="openSUSE"
254 | [[ ${my_distro} == "void" ]] && my_distro="Void Linux"
255 | [[ ${my_distro} == "evolveos" ]] && my_distro="Evolve OS"
256 | [[ ${my_distro} == "Sulin" ]] && my_distro="Sulin"
257 | [[ ${my_distro} == "Arch" || ${my_distro} == "Archarm" || ${my_distro} == "archarm" ]] && my_distro="Arch Linux"
258 | [[ ${my_distro} == "elementary" ]] && my_distro="elementary OS"
259 | [[ ${my_distro} == "Fedora" && -d /etc/qubes-rpc ]] && my_distro="qubes" # Inner VM
260 | [[ ${my_distro} == "Ol" || ${my_distro} == "ol" ]] && my_distro="Oracle Linux"
261 | if [[ ${my_distro} == "Oracle Linux" && -f /etc/oracle-release ]]; then
262 | distro_more="$(sed 's/Oracle Linux //' /etc/oracle-release)"
263 | fi
264 | # Upstream problem, SL and so EL is using rhel ID in os-release
265 | if [[ ${my_distro} == "rhel" ]] || [[ ${my_distro} == "Rhel" ]]; then
266 | my_distro="Red Hat Enterprise Linux"
267 | if grep -q 'Scientific' /etc/os-release; then
268 | my_distro="Scientific Linux"
269 | elif grep -q 'EuroLinux' /etc/os-release; then
270 | my_distro="EuroLinux"
271 | fi
272 | fi
273 |
274 | [[ ${my_distro} == "Neon" ]] && my_distro="KDE neon"
275 | [[ ${my_distro} == "SLED" || ${my_distro} == "sled" || ${my_distro} == "SLES" || ${my_distro} == "sles" ]] && my_distro="SUSE Linux Enterprise"
276 | if [[ ${my_distro} == "SUSE Linux Enterprise" ]] && [[ -f /etc/os-release ]]; then
277 | # shellcheck disable=SC2312
278 | distro_more="$(awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release | tr -d '"')"
279 | fi
280 | if [[ ${my_distro} == "Debian" ]] && [[ -f /usr/bin/pveversion ]]; then
281 | my_distro="Proxmox VE"
282 | unset distro_codename
283 | # shellcheck disable=SC2312
284 | distro_release="$(/usr/bin/pveversion | grep -oP 'pve-manager\/\K\d+\.\d+')"
285 | fi
286 | fi
287 | fi
288 |
289 | if [[ ${my_distro} == "Unknown" && ${OSTYPE} =~ "linux" && -f /etc/lsb-release ]]; then
290 | LSB_RELEASE=$(< /etc/lsb-release)
291 | my_distro=$(printf '%s' "${LSB_RELEASE}" | awk 'BEGIN {
292 | distro = "Unknown"
293 | }
294 | {
295 | if ($0 ~ /[Uu][Bb][Uu][Nn][Tt][Uu]/) {
296 | distro = "Ubuntu"
297 | exit
298 | }
299 | else if ($0 ~ /[Mm][Ii][Nn][Tt]/ && $0 ~ /[Dd][Ee][Bb][Ii][Aa][Nn]/) {
300 | distro = "LMDE"
301 | exit
302 | }
303 | else if ($0 ~ /[Mm][Ii][Nn][Tt]/) {
304 | distro = "Mint"
305 | exit
306 | }
307 | } END {
308 | print distro
309 | }')
310 | fi
311 |
312 | if [[ ${my_distro} == "Unknown" ]] && [[ ${OSTYPE} =~ "linux" || ${OSTYPE} == "gnu" ]]; then
313 | for di in arch chakra evolveos exherbo fedora \
314 | frugalware gentoo kogaion mageia obarun oracle pardus \
315 | pclinuxos redhat rosa SuSe; do
316 | # shellcheck disable=SC2248
317 | if [[ -f /etc/${di}-release ]]; then
318 | my_distro=${di}
319 | break
320 | fi
321 | done
322 | if [[ ${my_distro} == "oracle" ]]; then
323 | distro_more="$(sed 's/Oracle Linux //' /etc/oracle-release)"
324 | elif [[ ${my_distro} == "SuSe" ]]; then
325 | my_distro="openSUSE"
326 | if [[ -f /etc/os-release ]]; then
327 | if grep -q -i 'SUSE Linux Enterprise' /etc/os-release; then
328 | my_distro="SUSE Linux Enterprise"
329 | # shellcheck disable=SC2312
330 | distro_more=$(awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release | tr -d '"')
331 | fi
332 | fi
333 | if [[ ${distro_more} =~ "Tumbleweed" ]]; then
334 | distro_more="Tumbleweed"
335 | fi
336 | elif [[ ${my_distro} == "redhat" ]]; then
337 | grep -q -i 'CentOS' /etc/redhat-release && my_distro="CentOS"
338 | grep -q -i 'Scientific' /etc/redhat-release && my_distro="Scientific Linux"
339 | grep -q -i 'EuroLinux' /etc/redhat-release && my_distro="EuroLinux"
340 | grep -q -i 'PCLinuxOS' /etc/redhat-release && my_distro="PCLinuxOS"
341 | fi
342 | fi
343 |
344 | if [[ ${my_distro} == "Unknown" ]]; then
345 | if [[ ${OSTYPE} =~ "linux" || ${OSTYPE} == "gnu" ]]; then
346 | if [[ -f /etc/debian_version ]]; then
347 | if [[ -f /etc/issue ]]; then
348 | if grep -q -i 'gNewSense' /etc/issue; then
349 | my_distro="gNewSense"
350 | elif grep -q -i 'KDE neon' /etc/issue; then
351 | my_distro="KDE neon"
352 | distro_more="$(cut -d ' ' -f3 /etc/issue)"
353 | else
354 | my_distro="Debian"
355 | fi
356 | fi
357 | if grep -q -i 'Kali' /etc/debian_version; then
358 | my_distro="Kali Linux"
359 | fi
360 | elif [[ -f /etc/NIXOS ]]; then
361 | my_distro="NixOS"
362 | elif [[ -f /etc/dragora-version ]]; then
363 | my_distro="Dragora"
364 | distro_more="$(cut -d, -f1 /etc/dragora-version)"
365 | elif [[ -f /etc/slackware-version ]]; then
366 | my_distro="Slackware"
367 | elif [[ -f /usr/share/doc/tc/release.txt ]]; then
368 | my_distro="TinyCore"
369 | distro_more="$(cat /usr/share/doc/tc/release.txt)"
370 | elif [[ -f /etc/sabayon-edition ]]; then
371 | my_distro="Sabayon"
372 | fi
373 | fi
374 | fi
375 |
376 | if [[ ${my_distro} == "Unknown" ]] && [[ ${OSTYPE} =~ "linux" || ${OSTYPE} == "gnu" ]]; then
377 | if [[ -f /etc/issue ]]; then
378 | my_distro=$(awk 'BEGIN {
379 | distro = "Unknown"
380 | }
381 | {
382 | if ($0 ~ /"Hyperbola GNU\/Linux-libre"/) {
383 | distro = "Hyperbola GNU/Linux-libre"
384 | exit
385 | }
386 | else if ($0 ~ /"Obarun"/) {
387 | distro = "Obarun"
388 | exit
389 | }
390 | else if ($0 ~ /"Parabola GNU\/Linux-libre"/) {
391 | distro = "Parabola GNU/Linux-libre"
392 | exit
393 | }
394 | else if ($0 ~ /"Solus"/) {
395 | distro = "Solus"
396 | exit
397 | }
398 | else if ($0 ~ /"ALDOS"/) {
399 | distro = "ALDOS"
400 | exit
401 | }
402 | } END {
403 | print distro
404 | }' /etc/issue)
405 | fi
406 | fi
407 |
408 | if [[ ${my_distro} == "Unknown" ]] && [[ ${OSTYPE} =~ "linux" || ${OSTYPE} == "gnu" ]]; then
409 | if [[ -f /etc/system-release ]]; then
410 | if grep -q -i 'Scientific Linux' /etc/system-release; then
411 | my_distro="Scientific Linux"
412 | elif grep -q -i 'Oracle Linux' /etc/system-release; then
413 | my_distro="Oracle Linux"
414 | fi
415 | elif [[ -f /etc/lsb-release ]]; then
416 | if grep -q -i 'CHROMEOS_RELEASE_NAME' /etc/lsb-release; then
417 | my_distro="$(awk -F'=' '/^CHROMEOS_RELEASE_NAME=/ {print $2}' /etc/lsb-release)"
418 | distro_more="$(awk -F'=' '/^CHROMEOS_RELEASE_VERSION=/ {print $2}' /etc/lsb-release)"
419 | fi
420 | fi
421 | fi
422 | fi
423 | elif [[ ${my_os} == "Windows" ]]; then
424 | my_distro=$(wmic os get Caption)
425 | my_distro=${my_distro/Caption/}
426 | my_distro=$(trim "${my_distro/Microsoft /}")
427 | my_distro=${my_distro%%+([[:space:]])}
428 | [[ ${my_distro} =~ [[:space:]](.*) ]] && my_distro=${BASH_REMATCH[1]}
429 | elif [[ ${my_os} =~ [Mm]ac ]]; then
430 | case ${osx_version} in
431 | 10.4*) my_distro="Mac OS X Tiger" ;;
432 | 10.5*) my_distro="Mac OS X Leopard" ;;
433 | 10.6*) my_distro="Mac OS X Snow Leopard" ;;
434 | 10.7*) my_distro="Mac OS X Lion" ;;
435 | 10.8*) my_distro="OS X Mountain Lion" ;;
436 | 10.9*) my_distro="OS X Mavericks" ;;
437 | 10.10*) my_distro="OS X Yosemite" ;;
438 | 10.11*) my_distro="OS X El Capitan" ;;
439 | 10.12*) my_distro="macOS Sierra" ;;
440 | 10.13*) my_distro="macOS High Sierra" ;;
441 | 10.14*) my_distro="macOS Mojave" ;;
442 | 10.15*) my_distro="macOS Catalina" ;;
443 | 10.16*) my_distro="macOS Big Sur" ;;
444 | 11.0*) my_distro="macOS Big Sur" ;;
445 | *) my_distro="macOS" ;;
446 | esac
447 | fi
448 |
449 | # shellcheck disable=SC1090,SC2034
450 | {
451 | case ${my_distro,,} in
452 | aldos) my_distro="ALDOS" ;;
453 | alpine) my_distro="Alpine Linux" ;;
454 | amzn | amazon | amazon*linux) my_distro="Amazon Linux" ;;
455 | arch | arch*linux) my_distro="Arch Linux" ;;
456 | arch32)
457 | my_distro="Arch Linux 32"
458 | [[ -z ${ascii_distro} ]] && ascii_distro="Arch Linux"
459 | ;;
460 | arcolinux | arcolinux*) my_distro="ArcoLinux" ;;
461 | artix | artix*linux) my_distro="Artix Linux" ;;
462 | blackpantheros | black*panther*) my_distro="blackPanther OS" ;;
463 | bunsenlabs) my_distro="BunsenLabs" ;;
464 | centos) my_distro="CentOS" ;;
465 | centos*stream)
466 | my_distro="CentOS Stream"
467 | [[ -z ${ascii_distro} ]] && ascii_distro="CentOS"
468 | ;;
469 | chakra) my_distro="Chakra" ;;
470 | chrome* | chromium*) my_distro="Chrome OS" ;;
471 | crux) my_distro="CRUX" ;;
472 | debian)
473 | my_distro="Debian"
474 | . "${FETCH_DATA_DIR}/lib/distro/debian/lib.sh"
475 | ;;
476 | devuan) my_distro="Devuan" ;;
477 | deepin) my_distro="Deepin" ;;
478 | dragonflybsd) my_distro="DragonFlyBSD" ;;
479 | dragora) my_distro="Dragora" ;;
480 | drauger*) my_distro="DraugerOS" ;;
481 | elementary | 'elementary os') my_distro="elementary OS" ;;
482 | endeavour*) my_distro="EndeavourOS" ;;
483 | eurolinux) my_distro="EuroLinux" ;;
484 | evolveos) my_distro="Evolve OS" ;;
485 | exherbo | exherbo*linux) my_distro="Exherbo" ;;
486 | fedora)
487 | my_distro="Fedora"
488 | . "${FETCH_DATA_DIR}/lib/distro/fedora/lib.sh"
489 | ;;
490 | freebsd) my_distro="FreeBSD" ;;
491 | frugalware) my_distro="Frugalware" ;;
492 | funtoo) my_distro="Funtoo" ;;
493 | gentoo)
494 | my_distro="Gentoo"
495 | . "${FETCH_DATA_DIR}/lib/distro/gentoo/lib.sh"
496 | ;;
497 | gnewsense) my_distro="gNewSense" ;;
498 | guix*system) my_distro="Guix System" ;;
499 | haiku) my_distro="Haiku" ;;
500 | hyperbolagnu | hyperbolagnu/linux-libre | 'hyperbola gnu/linux-libre' | hyperbola)
501 | my_distro="Hyperbola GNU/Linux-libre"
502 | [[ -z ${ascii_distro} ]] && ascii_distro="Hyperbola"
503 | ;;
504 | kali*linux) my_distro="Kali Linux" ;;
505 | kaos) my_distro="KaOS" ;;
506 | kde*neon | neon)
507 | my_distro="KDE neon"
508 | . "${FETCH_DATA_DIR}/lib/distro/kde-neon/lib.sh"
509 | ;;
510 | kogaion) my_distro="Kogaion" ;;
511 | lmde) my_distro="LMDE" ;;
512 | lunar | lunar*linux) my_distro="Lunar Linux" ;;
513 | *"macos"* | *"mac os x"*)
514 | [[ -z ${ascii_distro} ]] && ascii_distro="macOS"
515 | ;;
516 | manjaro) my_distro="Manjaro" ;;
517 | mageia) my_distro="Mageia" ;;
518 | mer) my_distro="Mer" ;;
519 | mint | linux*mint)
520 | my_distro="Mint"
521 | . "${FETCH_DATA_DIR}/lib/distro/mint/lib.sh"
522 | ;;
523 | netbsd) my_distro="NetBSD" ;;
524 | netrunner) my_distro="Netrunner" ;;
525 | nix | nix*os) my_distro="NixOS" ;;
526 | obarun) my_distro="Obarun" ;;
527 | ol | oracle*linux) my_distro="Oracle Linux" ;;
528 | openbsd) my_distro="OpenBSD" ;;
529 | os*elbrus) my_distro="OS Elbrus" ;;
530 | parabolagnu | parabolagnu/linux-libre | 'parabola gnu/linux-libre' | parabola)
531 | my_distro="Parabola GNU/Linux-libre"
532 | [[ -z ${ascii_distro} ]] && ascii_distro="Parabola"
533 | ;;
534 | parrot | parrot*security) my_distro="Parrot Security" ;;
535 | pclinuxos | pclos) my_distro="PCLinuxOS" ;;
536 | peppermint) my_distro="Peppermint" ;;
537 | proxmox | proxmox*ve) my_distro="Proxmox VE" ;;
538 | pureos) my_distro="PureOS" ;;
539 | qubes) my_distro="Qubes OS" ;;
540 | raspbian) my_distro="Raspbian" ;;
541 | red*hat* | rhel)
542 | my_distro="Red Hat Enterprise Linux"
543 | [[ -z ${ascii_distro} ]] && ascii_distro="RHEL"
544 | ;;
545 | rosa) my_distro="ROSA" ;;
546 | sabayon) my_distro="Sabayon" ;;
547 | sailfish | sailfish*os)
548 | my_distro="SailfishOS"
549 | . "${FETCH_DATA_DIR}/lib/distro/sailfish/lib.sh"
550 | ;;
551 | scientific*) my_distro="Scientific Linux" ;;
552 | siduction) my_distro="Siduction" ;;
553 | smgl | source*mage | source*mage*gnu*linux)
554 | my_distro="Source Mage GNU/Linux"
555 | [[ -z ${ascii_distro} ]] && ascii_distro="SourceMage"
556 | ;;
557 | solus) my_distro="Solus" ;;
558 | sparky | sparky*linux) my_distro="SparkyLinux" ;;
559 | steam | steam*os) my_distro="SteamOS" ;;
560 | sulin) my_distro="Sulin" ;;
561 | *suse*)
562 | my_distro="openSUSE"
563 | . "${FETCH_DATA_DIR}/lib/distro/suse/lib.sh"
564 | [[ -z ${ascii_distro} ]] && ascii_distro="SUSE"
565 | ;;
566 | tinycore | tinycore*linux) my_distro="TinyCore" ;;
567 | trisquel) my_distro="Trisquel" ;;
568 | ubuntu)
569 | my_distro="Ubuntu"
570 | . "${FETCH_DATA_DIR}/lib/distro/ubuntu/lib.sh"
571 | ;;
572 | void*linux) my_distro="Void Linux" ;;
573 | *"windows"*)
574 | [[ -z ${ascii_distro} ]] && ascii_distro="Windows"
575 | ;;
576 | zorin*) my_distro="Zorin OS" ;;
577 | *)
578 | ascii_distro="Unknown"
579 | config_ascii['colors']="random"
580 | ;;
581 | esac
582 | }
583 |
584 | [[ -z ${ascii_distro} ]] && ascii_distro="${my_distro}"
585 |
586 | [[ -n ${ascii_distro} ]] && ascii_distro="${ascii_distro// /-}"
587 |
588 | if [[ -f "${FETCH_DATA_DIR}/ascii/${ascii_distro,,}.sh" ]]; then
589 | # shellcheck source=/dev/null
590 | . "${FETCH_DATA_DIR}/ascii/${ascii_distro,,}.sh"
591 | else
592 | # shellcheck disable=SC1094,SC1090
593 | . "${FETCH_DATA_DIR}/ascii/unknown.sh"
594 | fi
595 |
596 | # shellcheck disable=SC2154
597 | case ${config_distro[short]} in
598 | on)
599 | :
600 | ;;
601 | version)
602 | [[ -n ${distro_release} ]] && my_distro+=" ${distro_release}"
603 | ;;
604 | codename)
605 | [[ -n ${distro_codename} ]] && my_distro+=" ${distro_codename}"
606 | ;;
607 |
608 | full)
609 | [[ -n ${distro_release} ]] && my_distro+=" ${distro_release}"
610 | [[ -n ${distro_codename} ]] && my_distro+=" ${distro_codename}"
611 | ;;
612 | auto | *)
613 | # shellcheck disable=SC2154
614 | if [[ ${config_global[short]} =~ 'on' ]]; then
615 | :
616 | else
617 | [[ -n ${distro_release} ]] && my_distro+=" ${distro_release}"
618 | [[ -n ${distro_codename} ]] && my_distro+=" ${distro_codename}"
619 | fi
620 | ;;
621 | esac
622 |
623 | # TODO: turn into case
624 | [[ ${config_distro[os_arch]} =~ 'on' ]] && my_distro+=" ${kernel_machine}"
625 |
626 | # Return my_distro value for print_info()
627 | #printf '%b' "$(trim "${my_distro}")"
628 |
629 | # TODO: check verbosity here instead of in function, save function call
630 | verboseOut "Finding distribution...found as '${my_distro}'."
631 | }
632 |
--------------------------------------------------------------------------------
/lib/detection/kernel.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154,SC2034
3 | detect_kernel() {
4 | # shellcheck disable=SC2154
5 | case ${config_kernel[short]} in
6 | on)
7 | my_kernel="${kernel_version}"
8 | ;;
9 | off)
10 | my_kernel="${kernel_name} ${kernel_version}"
11 | ;;
12 | auto)
13 | # shellcheck disable=SC2154
14 | if [[ ${config_global[short]} =~ 'on' ]]; then
15 | my_kernel="${kernel_version}"
16 | else
17 | my_kernel="${kernel_name} ${kernel_version}"
18 | fi
19 | ;;
20 | *) return ;;
21 | esac
22 |
23 | # Return my_kernel value for print_info()
24 | #printf '%b' "$(trim "${my_kernel}")"
25 |
26 | # TODO: check verbosity here instead of in function, save function call
27 | verboseOut "Finding kernel...found as '${my_kernel}'."
28 | }
29 |
--------------------------------------------------------------------------------
/lib/detection/memory.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154
3 | # shellcheck disable=SC2312
4 | detect_memory() {
5 | case ${my_os} in
6 | "Linux" | "Windows")
7 | # MemUsed = Memtotal + Shmem - MemFree - Buffers - Cached - SReclaimable
8 | # Source: https://github.com/KittyKatt/screenFetch/issues/386#issuecomment-249312716
9 | while IFS=":" read -r a b; do
10 | case ${a} in
11 | "MemTotal")
12 | ((mem_used += ${b/kB/}))
13 | mem_total="${b/kB/}"
14 | ;;
15 | "Shmem") ((mem_used += ${b/kB/})) ;;
16 | "MemFree" | "Buffers" | "Cached" | "SReclaimable")
17 | mem_used="$((mem_used -= ${b/kB/}))"
18 | ;;
19 | "MemAvailable")
20 | mem_avail=${b/kB/}
21 | ;;
22 | *) ;;
23 | esac
24 | done < /proc/meminfo
25 |
26 | if [[ -n ${mem_avail} ]]; then
27 | mem_used=$(((mem_total - mem_avail) / 1024))
28 | else
29 | mem_used="$((mem_used / 1024))"
30 | fi
31 |
32 | mem_total="$((mem_total / 1024))"
33 | ;;
34 | "BSD")
35 | case ${kernel_name} in
36 | "NetBSD"*) mem_total="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
37 | *) mem_total="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
38 | esac
39 |
40 | case ${kernel_name} in
41 | "NetBSD"*)
42 | mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))"
43 | ;;
44 | "FreeBSD"* | "DragonFly"*)
45 | hw_pagesize="$(sysctl -n hw.pagesize)"
46 | mem_inactive="$(($(sysctl -n vm.stats.vm.v_inactive_count) * hw_pagesize))"
47 | mem_unused="$(($(sysctl -n vm.stats.vm.v_free_count) * hw_pagesize))"
48 | mem_cache="$(($(sysctl -n vm.stats.vm.v_cache_count) * hw_pagesize))"
49 | mem_free="$(((mem_inactive + mem_unused + mem_cache) / 1024 / 1024))"
50 | ;;
51 | "OpenBSD"*) ;;
52 | *) mem_free="$(($(vmstat | awk 'END {printf $5}') / 1024))" ;;
53 | esac
54 |
55 | case ${kernel_name} in
56 | "OpenBSD"*)
57 | mem_used="$(vmstat | awk 'END {printf $3}')"
58 | mem_used="${mem_used/M/}"
59 | ;;
60 | *) mem_used="$((mem_total - mem_free))" ;;
61 | esac
62 | ;;
63 | "Mac OS X" | "macOS")
64 | mem_total="$(($(sysctl -n hw.memsize) / 1024 / 1024))"
65 | mem_wired="$(vm_stat | awk '/ wired/ { print $4 }')"
66 | mem_active="$(vm_stat | awk '/ active/ { printf $3 }')"
67 | mem_compressed="$(vm_stat | awk '/ occupied/ { printf $5 }')"
68 | mem_compressed="${mem_compressed:-0}"
69 | mem_used="$(((${mem_wired//./} + ${mem_active//./} + ${mem_compressed//./}) * 4 / 1024))"
70 | ;;
71 | "Haiku")
72 | mem_total="$(($(sysinfo -mem | awk -F '\\/ |)' '{print $2; exit}') / 1024 / 1024))"
73 | mem_used="$(sysinfo -mem | awk -F '\\/|)' '{print $2; exit}')"
74 | mem_used="$((${mem_used/max/} / 1024 / 1024))"
75 | ;;
76 | *)
77 | mem_total=
78 | mem_used=
79 | ;;
80 | esac
81 |
82 | # shellcheck disable=SC2154
83 | [[ ${config_memory[percent]} == "on" ]] && ((mem_perc = mem_used * 100 / mem_total))
84 |
85 | my_memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB} ${mem_perc:+(${mem_perc}%)}"
86 |
87 | # Return my_memory value for print_info()
88 | #printf '%b' "$(trim "${my_memory}")"
89 |
90 | # TODO: check verbosity here instead of in function, save function call
91 | verboseOut "Finding memory usage...found as '${my_memory}'."
92 | }
93 |
--------------------------------------------------------------------------------
/lib/detection/os.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154
3 | detect_os() {
4 | case "${kernel_name}" in
5 | Darwin) my_os=${darwin_name} ;;
6 | SunOS) my_os=Solaris ;;
7 | Haiku) my_os=Haiku ;;
8 | MINIX) my_os=MINIX ;;
9 | AIX) my_os=AIX ;;
10 | IRIX*) my_os=IRIX ;;
11 | FreeMiNT) my_os=FreeMiNT ;;
12 | Linux | GNU*)
13 | my_os=Linux
14 | ;;
15 | *BSD | DragonFly | Bitrig)
16 | my_os=BSD
17 | ;;
18 | CYGWIN* | MSYS* | MINGW*)
19 | my_os=Windows
20 | ;;
21 | *)
22 | errorOut "Unknown OS detected, please report this issue."
23 | ;;
24 | esac
25 |
26 | # TODO: check verbosity here instead of in function, save function call
27 | verboseOut "Finding OS...found as '${my_os}'."
28 | }
29 |
--------------------------------------------------------------------------------
/lib/detection/packages.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154
3 | detect_packages() {
4 | # most of this is pulled from neofetch with small edits to line up with
5 | # previous screenfetch functionality
6 |
7 | # to adjust the number of pkgs per pkg manager
8 | pkgs_h=0
9 |
10 | # _has: Check if package manager installed.
11 | # _dir: Count files or dirs in a glob.
12 | # _pac: If packages > 0, log package manager name.
13 | # _tot: Count lines in command output.
14 | _has() { type -p "${1}" > /dev/null && manager=${1}; }
15 | _dir() {
16 | ((my_packages += $#))
17 | _pac "$(($# - pkgs_h))"
18 | }
19 | _pac() {
20 | ((${1} > 0)) && {
21 | managers+=("${1} (${manager})")
22 | manager_string+="${manager}, "
23 | }
24 | }
25 | _tot() {
26 | # shellcheck disable=SC2312
27 | IFS=$'\n' read -d "" -ra pkgs <<< "$("$@" 2> /dev/null)"
28 | ((my_packages += ${#pkgs[@]}))
29 | _pac "$((${#pkgs[@]} - pkgs_h))"
30 | }
31 |
32 | # Redefine _tot() for Bedrock Linux.
33 | [[ -f /bedrock/etc/bedrock-release && ${PATH} == */bedrock/cross/* ]] && {
34 | _tot() {
35 | # shellcheck disable=SC2312
36 | IFS=$'\n' read -d "" -ra pkgs <<< "$(for s in $(brl list); do strat -r "${s}" "${@}"; done)"
37 | ((my_packages += "${#pkgs[@]}"))
38 | _pac "$((${#pkgs[@]} - pkgs_h))"
39 | }
40 | br_prefix="/bedrock/strata/*"
41 | }
42 |
43 | # get total packages based on OS value
44 | case ${my_os} in
45 | Linux | BSD | Solaris)
46 | # simple commands
47 | _has kiss && _tot kiss 1
48 | _has cpt-list && _tot cpt-list
49 | _has pacman-key && _tot pacman -Qq --color never
50 | _has apt && _tot dpkg-query -W # dpkg-query is much faster than apt
51 | _has xbps-query && _tot xbps-query -list
52 | _has apk && _tot apk info
53 | _has opkg && _tot opkg list-installed
54 | _has pacman-g2 && _tot pacman-g2 -q
55 | _has lvu && _tot lvu installed
56 | _has tce-status && _tot tce-status -lvu
57 | _has pkg_info && _tot pkg_info
58 | _has tazpkg && pkgs_h=6 _tot tazpkg list && ((my_packages -= 6))
59 | _has sorcery && _tot gaze installed
60 | _has alps && _tot alps showinstalled
61 | _has butch && _tot butch list
62 | _has swupd && _tot swupd bundle-list --quiet
63 | _has pisi && _tot pisi list-installed
64 | _has inary && _tot inary li
65 |
66 | if _has dnf && type -p sqlite3 > /dev/null && [[ -f /var/cache/dnf/packages.db ]]; then
67 | # shellcheck disable=SC2312
68 | _pac "$(sqlite3 /var/cache/dnf/packages.db "SELECT count(pkg) FROM installed")"
69 | else
70 | _has rpm && _tot rpm -qa
71 | fi
72 |
73 | # 'mine' conflicts with minesweeper games.
74 | [[ -f /etc/SDE-VERSION ]] && _has mine && _tot mine -q
75 |
76 | # file/dir count
77 | # $br_prefix is apparently fixed and won't change based on user input
78 | # shellcheck disable=SC2086
79 | {
80 | shopt -s nullglob
81 | # shellcheck disable=SC2312
82 | _has brew && _dir "$(brew --cellar)"/*
83 | _has emerge && _dir ${br_prefix}/var/db/pkg/*/*/
84 | _has Compile && _dir ${br_prefix}/Programs/*/
85 | _has eopkg && _dir ${br_prefix}/var/lib/eopkg/package/*
86 | _has crew && _dir ${br_prefix}/usr/local/etc/crew/meta/*.filelist
87 | _has pkgtool && _dir ${br_prefix}/var/log/packages/*
88 | _has scratch && _dir ${br_prefix}/var/lib/scratchpkg/index/*/.pkginfo
89 | _has kagami && _dir ${br_prefix}/var/lib/kagami/pkgs/*
90 | _has cave && _dir ${br_prefix}/var/db/paludis/repositories/cross-installed/*/data/*/ \
91 | ${br_prefix}/var/db/paludis/repositories/installed/data/*/
92 | shopt -u nullglob
93 | }
94 |
95 | # Complex commands
96 | # shellcheck disable=SC2312
97 | _has kpm-pkg && ((my_packages += $(kpm --get-selections | grep -cv deinstall$)))
98 | _has guix && {
99 | manager=guix-system && _tot guix package -p "/run/current-system/profile" -I
100 | manager=guix-user && _tot guix package -I
101 | }
102 | _has nix-store && {
103 | nix-user-pkgs() {
104 | nix-store -qR ~/.nix-profile
105 | nix-store -qR /etc/profiles/per-user/"${USER}"
106 | }
107 | manager=nix-system && _tot nix-store -qR /run/current-system/sw
108 | manager=nix-user && _tot nix-user-pkgs
109 | manager=nix-default && _tot nix-store -qR /nix/var/nix/profiles/default
110 | }
111 |
112 | # pkginfo is also the name of a python package manager which is painfully slow.
113 | # TODO: Fix this somehow. (neofetch)
114 | _has pkginfo && _tot pkginfo -i
115 |
116 | # BSD-like package detection
117 | case ${kernel_name} in
118 | FreeBSD | DragonFly) _has pkg && _tot pkg info ;;
119 | *)
120 | _has pkg && _dir /var/db/pkg/*
121 | ((my_packages == 0)) && _has pkg && _tot pkg list
122 | ;;
123 | esac
124 |
125 | # list these last as they accompany regular package managers.
126 | # TODO: flatpak takes forever to list
127 | _has flatpak && _tot flatpak list
128 | _has spm && _tot spm list -i
129 | _has puyo && _dir ~/.puyo/installed
130 |
131 | # Snap hangs if the command is run without the daemon running.
132 | # Only run snap if the daemon is also running.
133 | _has snap && pgrep -x snapd > /dev/null \
134 | && pkgs_h=1 _tot snap list && ((my_packages -= 1))
135 |
136 | # This is the only standard location for appimages.
137 | # See: https://github.com/AppImage/AppImageKit/wiki
138 | manager=appimage && _has appimaged && _dir ~/.local/bin/*.appimage
139 | ;;
140 | "Mac OS X" | "macOS")
141 | _has port && pkgs_h=1 _tot port installed && ((my_packages -= 1))
142 | _has brew && _dir /usr/local/Cellar/*
143 | _has nix-store && {
144 | nix-user-pkgs() {
145 | nix-store -qR ~/.nix-profile
146 | nix-store -qR /etc/profiles/per-user/"${USER}"
147 | }
148 | manager=nix-system && _tot nix-store -qR /run/current-system/sw
149 | manager=nix-user && _tot nix-store -qR nix-user-pkgs
150 | }
151 | ;;
152 | Windows)
153 | case ${kernel_name} in
154 | CYGWIN*) _has cygcheck && _tot cygcheck -cd ;;
155 | MSYS*) _has pacman && _tot pacman -Qq --color never ;;
156 | *) : ;;
157 | esac
158 |
159 | # Scoop environment throws errors if `tot scoop list` is used
160 | _has scoop && pkgs_h=1 _dir ~/scoop/apps/* && ((my_packages -= 1))
161 |
162 | # Count chocolatey packages.
163 | _has choco && _dir /c/ProgramData/chocolatey/lib/*
164 | [[ -d /cygdrive/c/ProgramData/chocolatey/lib ]] \
165 | && manager=choco _dir /cygdrive/c/ProgramData/chocolatey/lib/*
166 | ;;
167 | Haiku)
168 | _has pkgman && _dir /boot/system/package-links/*
169 | my_packages=${my_packages/pkgman/depot}
170 | ;;
171 | *) return ;;
172 | esac
173 |
174 | if ((my_packages == 0)); then
175 | unset my_packages
176 | else
177 | # shellcheck disable=SC2154
178 | case ${config_packages[managers]} in
179 | off)
180 | :
181 | ;;
182 | split)
183 | printf -v my_packages '%s, ' "${managers[@]}"
184 | my_packages=${my_packages%,*}
185 | ;;
186 | on | *)
187 | my_packages+=" (${manager_string%,*})"
188 | ;;
189 | esac
190 | # replace pacman-key with pacman
191 | my_packages=${my_packages/pacman-key/pacman}
192 | fi
193 |
194 | # Return my_packages value for print_info()
195 | #printf '%b' "$(trim "${my_packages}")"
196 |
197 | # TODO: check verbosity here instead of in function, save function call
198 | verboseOut "Finding current package count...found as '${my_packages}'."
199 | }
200 |
--------------------------------------------------------------------------------
/lib/detection/shell.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154
3 | detect_shell() {
4 | # get configuration on whether full shell path should be displayed
5 | # shellcheck disable=SC2154
6 | case ${config_shell[path]} in
7 | on) shell_type="${SHELL}" ;;
8 | off | *) shell_type="${SHELL##*/}" ;;
9 | esac
10 |
11 | # if version_info is off, then return what we have now
12 | # shellcheck disable=SC2154
13 | [[ ${config_shell[version]} != "on" ]] && my_shell="${shell_type}" && return
14 |
15 | # Possible Windows problem
16 | [[ ${my_os} == "Windows" ]] && shell_name="${shell_type//\.exe/}"
17 |
18 | # get shell versions
19 | my_shell="${shell_name:=${shell_type}} "
20 |
21 | case ${shell_name:=${SHELL##*/}} in
22 | bash)
23 | # shellcheck disable=SC2016
24 | [[ -n ${BASH_VERSION} ]] || BASH_VERSION=$("${SHELL}" -c 'printf %s "$BASH_VERSION"')
25 | my_shell+="${BASH_VERSION/-*/}"
26 | ;;
27 | sh | ash | dash | es) ;;
28 | *ksh)
29 | # shellcheck disable=SC2154,SC2016
30 | my_shell+=$("${SHELL}" -c 'printf %s "$KSH_VERSION"')
31 | my_shell=${my_shell/ * KSH/}
32 | my_shell=${my_shell/version/}
33 | ;;
34 | osh)
35 | # shellcheck disable=SC2016
36 | {
37 | if [[ -n ${OIL_VERSION} ]]; then
38 | my_shell+=${OIL_VERSION}
39 | else
40 | my_shell+=$("${SHELL}" -c 'printf %s "$OIL_VERSION"')
41 | fi
42 | }
43 | ;;
44 | tcsh)
45 | # shellcheck disable=SC2016
46 | my_shell+=$("${SHELL}" -c 'printf %s "$tcsh"')
47 | ;;
48 | yash)
49 | my_shell+=$("${SHELL}" --version 2>&1)
50 | my_shell=${my_shell/ ${shell_name}/}
51 | my_shell=${my_shell/ Yet another shell/}
52 | my_shell=${my_shell/Copyright*/}
53 | ;;
54 | fish)
55 | # shellcheck disable=SC2016
56 | [[ -n ${FISH_VERSION} ]] || FISH_VERSION=$("${SHELL}" -c 'printf %s "$FISH_VERSION"')
57 | my_shell+="${FISH_VERSION}"
58 | ;;
59 | *)
60 | my_shell+=$("${SHELL}" --version 2>&1)
61 | my_shell=${my_shell/ ${shell_name}/}
62 | ;;
63 | esac
64 |
65 | # remove unwanted
66 | my_shell=${my_shell/, version/}
67 | my_shell=${my_shell/xonsh\//xonsh }
68 | my_shell=${my_shell/options*/}
69 | my_shell=${my_shell/\(*\)/}
70 |
71 | # Return my_shell value for print_info()
72 | #printf '%b' "$(trim "${my_shell}")"
73 |
74 | # TODO: check verbosity here instead of in function, save function call
75 | verboseOut "Finding current shell...found as '${my_shell}'."
76 | }
77 |
--------------------------------------------------------------------------------
/lib/detection/uptime.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154
3 | detect_uptime() {
4 | # get seconds up since boot
5 | case ${my_os} in
6 | "Mac OS X" | "macOS" | BSD)
7 | boot=$(sysctl -n kern.boottime)
8 | [[ ${boot} =~ [0-9]+ ]] && boot=${BASH_REMATCH[0]}
9 | now=$(date +%s)
10 | _seconds=$((now - boot))
11 | ;;
12 | Linux | Windows | [G | g][N | n][U | u])
13 | if [[ -f /proc/uptime ]]; then
14 | _seconds=$(< /proc/uptime)
15 | _seconds=${_seconds//.*/}
16 | else
17 | # shellcheck disable=SC2312
18 | boot=$(date -d"$(uptime -s)" +%s)
19 | now=$(date +%s)
20 | _seconds=$((now - boot))
21 | fi
22 | ;;
23 | Haiku)
24 | _seconds=$(($(system_time) / 1000000))
25 | ;;
26 | *) return ;;
27 | esac
28 |
29 | # math!
30 | _mins="$((_seconds / 60 % 60)) minutes"
31 | _hours="$((_seconds / 3600 % 24)) hours"
32 | _days="$((_seconds / 86400)) days"
33 |
34 | # get rid of plurals
35 | ((${_mins/ */} == 1)) && _mins=${_mins/s/}
36 | ((${_hours/ */} == 1)) && _hours=${_hours/s/}
37 | ((${_days/ */} == 1)) && _days=${_days/s/}
38 |
39 | # don't output if field is empty
40 | ((${_mins/ */} == 0)) && unset _mins
41 | ((${_hours/ */} == 0)) && unset _hours
42 | ((${_days/ */} == 0)) && unset _days
43 |
44 | # build the uptime line
45 | my_uptime=${_days:+${_days}, }${_hours:+${_hours}, }${_mins}
46 | my_uptime=${my_uptime%', '}
47 | my_uptime=${my_uptime:-${_seconds} seconds}
48 |
49 | # shorthand
50 | # shellcheck disable=SC2154
51 | case ${config_uptime[short]} in
52 | on)
53 | my_uptime=${my_uptime/ minutes/ mins}
54 | my_uptime=${my_uptime/ minute/ min}
55 | my_uptime=${my_uptime/ seconds/ secs}
56 | ;;
57 | tiny)
58 | my_uptime=${my_uptime/ days/d}
59 | my_uptime=${my_uptime/ day/d}
60 | my_uptime=${my_uptime/ hours/h}
61 | my_uptime=${my_uptime/ hour/h}
62 | my_uptime=${my_uptime/ minutes/m}
63 | my_uptime=${my_uptime/ minute/m}
64 | my_uptime=${my_uptime/ seconds/s}
65 | my_uptime=${my_uptime//,/}
66 | ;;
67 | off)
68 | :
69 | ;;
70 | auto | *)
71 | # shellcheck disable=SC2154
72 | if [[ ${config_global[short]} == "on" ]]; then
73 | my_uptime=${my_uptime/ minutes/ mins}
74 | my_uptime=${my_uptime/ minute/ min}
75 | my_uptime=${my_uptime/ seconds/ secs}
76 | fi
77 | ;;
78 | esac
79 |
80 | # Return my_uptime value for print_info()
81 | #printf '%b' "$(trim "${my_uptime}")"
82 |
83 | # TODO: check verbosity here instead of in function, save function call
84 | verboseOut "Finding current uptime...found as '${my_uptime}'."
85 | }
86 |
--------------------------------------------------------------------------------
/lib/detection/userinfo.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2154
3 | detect_userinfo() {
4 | # shellcheck disable=SC2154
5 | if [[ ${config_userinfo[display_user]} == "on" ]]; then
6 | my_user=${USER}
7 | if [[ -z ${USER} ]]; then
8 | my_user=$(whoami)
9 | fi
10 | my_userinfo="${my_user}"
11 | fi
12 |
13 | # shellcheck disable=SC2154
14 | if [[ ${config_userinfo[display_hostname]} == "on" ]]; then
15 | my_host="${HOSTNAME}"
16 | if [[ ${my_distro} == "Mac OS X" ]] || [[ ${my_distro} == "macOS" ]]; then
17 | my_host=${my_host/.local/}
18 | fi
19 | if [[ -n ${my_userinfo} ]]; then
20 | my_userinfo="${my_userinfo}@${my_host}"
21 | else
22 | my_userinfo="${my_host}"
23 | fi
24 | fi
25 |
26 | # Return my_userinfo value for print_info()
27 | #printf '%b' "$(trim "${my_userinfo}")"
28 |
29 | # TODO: check verbosity here instead of in function, save function call
30 | verboseOut "Finding user info...found as '${my_userinfo}'."
31 | }
32 |
--------------------------------------------------------------------------------
/lib/distro/debian/lib.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154,SC2312
3 | if [[ -f /etc/siduction-version ]]; then
4 | my_distro="Siduction"
5 | distro_release="(Debian Sid)"
6 | distro_codename=
7 | elif [[ -f /usr/bin/pveversion ]]; then
8 | my_distro="Proxmox VE"
9 | distro_codename=
10 | distro_release="$(/usr/bin/pveversion | grep -oP 'pve-manager\/\K\d+\.\d+')"
11 | elif [[ -f /etc/os-release ]]; then
12 | if grep -q -i 'Raspbian' /etc/os-release; then
13 | my_distro="Raspbian"
14 | distro_release=$(awk -F'=' '/^PRETTY_NAME=/ {print $2}' /etc/os-release)
15 | elif grep -q -i 'BlankOn' /etc/os-release; then
16 | my_distro='BlankOn'
17 | distro_release=$(awk -F'=' '/^PRETTY_NAME=/ {print $2}' /etc/os-release)
18 | else
19 | my_distro="Debian"
20 | fi
21 | fi
22 |
--------------------------------------------------------------------------------
/lib/distro/fedora/lib.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | if [[ -f /etc/os-release ]]; then
4 | _release=$(< /etc/os-release)
5 | [[ ${_release} =~ VERSION=+\"([^$'\n']*)\" ]] && distro_release="${BASH_REMATCH[1]}"
6 | fi
7 |
--------------------------------------------------------------------------------
/lib/distro/gentoo/lib.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154,SC2312
3 | if [[ "$(lsb_release -sd)" =~ Funtoo ]]; then
4 | my_distro="Funtoo"
5 | else
6 | my_distro="Gentoo"
7 | fi
8 | # detecting release stable/testing/experimental
9 | # shellcheck disable=SC1091,SC1090
10 | {
11 | if [[ -f /etc/portage/make.conf ]]; then
12 | source /etc/portage/make.conf
13 | elif [[ -d /etc/portage/make.conf ]]; then
14 | source /etc/portage/make.conf/*
15 | fi
16 | }
17 | # shellcheck disable=SC2154
18 | case ${ACCEPT_KEYWORDS} in
19 | [a-z]*) distro_release=stable ;;
20 | ~*) distro_release=testing ;;
21 | '**') distro_release=experimental ;; # experimental usually includes git-versions.
22 | *) : ;;
23 | esac
24 |
--------------------------------------------------------------------------------
/lib/distro/kde-neon/lib.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154,SC2312
3 | if [[ -f /etc/issue ]]; then
4 | if grep -q '^KDE neon' /etc/issue; then
5 | distro_release="$(grep '^KDE neon' /etc/issue | cut -d ' ' -f3)"
6 | fi
7 | fi
8 |
--------------------------------------------------------------------------------
/lib/distro/mint/lib.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154,SC2312
3 | if [[ ${distro_codename} == "debian" ]]; then
4 | my_distro="LMDE"
5 | distro_codename="n/a"
6 | distro_release="n/a"
7 | #adding support for LMDE 3
8 | elif [[ $(lsb_release -sd) =~ "LMDE" ]]; then
9 | my_distro="LMDE"
10 | fi
11 |
--------------------------------------------------------------------------------
/lib/distro/sailfish/lib.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154,SC2312
3 | if [[ -f /etc/os-release ]]; then
4 | distro_codename="$(grep 'VERSION=' /etc/os-release | cut -d '(' -f2 | cut -d ')' -f1)"
5 | distro_release="$(awk -F'=' '/^VERSION=/ {print $2}' /etc/os-release)"
6 | fi
7 |
--------------------------------------------------------------------------------
/lib/distro/suse/lib.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154,SC2312
3 | if [[ -f /etc/os-release ]]; then
4 | if grep -q -i 'SUSE Linux Enterprise' /etc/os-release; then
5 | my_distro="SUSE Linux"
6 | distro_codename=
7 | distro_release=$(awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release | tr -d '"')
8 | fi
9 | fi
10 | if [[ ${distro_codename} == "Tumbleweed" ]]; then
11 | distro_release=
12 | fi
13 |
--------------------------------------------------------------------------------
/lib/distro/ubuntu/lib.sh:
--------------------------------------------------------------------------------
1 | # shellcheck shell=bash
2 | # shellcheck disable=SC2034,SC2154
3 | ubuntu_codenames=(
4 | '(Warty Warthog)' # 4.10
5 | '(Hoary Hedgehog)' # 5.04
6 | '(Breezy Badger)' # 5.10
7 | 'LTS (Dapper Drake)' # 6.06
8 | '(Edgy Eft)' # 6.10
9 | '(Feisty Fawn)' # 7.04
10 | '(Gutsy Gibbon)' # 7.10
11 | 'LTS (Hardy Heron)' # 8.04
12 | '(Intrepid Ibex)' # 8.10
13 | '(Jaunty Jackalope)' # 9.04
14 | '(Karmic Koala)' # 9.10
15 | 'LTS (Lucid Lynx)' # 10.04
16 | '(Maverick Meerkat)' # 10.10
17 | '(Natty Narwhal)' # 11.04
18 | '(Oneiric Ocelot)' # 11.10
19 | 'LTS (Precise Pangolin)' # 12.04
20 | '(Quantal Quetzal)' # 12.10
21 | '(Raring Ringtail)' # 13.04
22 | '(Saucy Salamander)' # 13.10
23 | 'LTS (Trusty Tahr)' # 14.04
24 | '(Utopic Unicorn)' # 14.10
25 | '(Vivid Vervet)' # 15.04
26 | '(Wily Werewolf)' # 15.10
27 | 'LTS (Xenial Xerus)' # 16.04
28 | '(Yakkety Yak)' # 16.10
29 | '(Zesty Zapus)' # 17.04
30 | '(Artful Aardvark)' # 17.10
31 | 'LTS (Bionic Beaver)' # 18.04
32 | '(Cosmic Cuttlefish)' # 18.10
33 | '(Disco Dingo)' # 19.04
34 | '(Eoan Ermine)' # 19.10
35 | 'LTS (Focal Fossa)' # 20.04
36 | '(Groovy Gorilla)' # 20.10
37 | '(Hirsute Hippo)' # 21.04
38 | )
39 |
40 | for each in "${ubuntu_codenames[@]}"; do
41 | if [[ ${each,,} =~ ${distro_codename,,} ]]; then
42 | distro_codename="${each}"
43 | fi
44 | done
45 |
--------------------------------------------------------------------------------
/sample.config.conf:
--------------------------------------------------------------------------------
1 | [global]
2 | # display extra verbose output when running fetch
3 | # options: on, off
4 | # default: off
5 | verbose="off"
6 | # system directory where fetch distribution and extra files live
7 | # default: /usr/share/fetch
8 | data_dir="/usr/share/fetch"
9 | # globally set shorthand on all fields
10 | # options: off, on
11 | # default: off
12 | short="off"
13 | # controls info display
14 | # space delimited list of detections to run and display
15 | # detections: userinfo, distro, kernel, uptime, shell, packages
16 | # cpu, memory
17 | # default: userinfo distro kernel uptime shell packages cpu memory
18 | info="userinfo distro kernel uptime shell packages cpu memory"
19 |
20 | [text]
21 | # control whether text information is displayed
22 | # options: on, off
23 | # default: on
24 | display="on"
25 | bold="on"
26 | underline_enabled="on"
27 | underline_character="-"
28 | # controls if output is colored
29 | # options: on, off
30 | # default: on
31 | color="on"
32 | # character that displays between info title and info data
33 | # default: :
34 | # example: "DE : GNOME"
35 | info_separator=":"
36 |
37 | # ASCII Logo Display Options
38 | [ascii]
39 | # control whether ASCII logo is displayed
40 | # options: on, off
41 | # default: on
42 | display="on"
43 | # select which distro logo to display
44 | # options: auto, distroname
45 | # default: auto
46 | # (auto pulls the ascii logo from the detected os/distribution)
47 | # (for full list of distribution names, please refer to man fetch)
48 | ascii_distro="auto"
49 | # select colorization of ascii logo
50 | # options: distro, random, 'c1 c2 c3 c4 c5 c6'
51 | # default: distro
52 | # ( fill this variable with up to 6 color names or 256 color number
53 | # definitions. note that only the number of color definitions up to the
54 | # number enabled by default in the ascii logo will be displayed.)
55 | colors="distro"
56 | # display ascii logo with bold text
57 | # options: on, off
58 | # default: on
59 | ascii_bold="on"
60 | # column gap between end of logo, horizontally, and start of information
61 | # options: N (where N is any number)
62 | # default: 2
63 | # (note that the higher N is, the more width will be required by your terminal)
64 | gap="2"
65 |
66 | # User@Host Display Options
67 | [userinfo]
68 | # display userinfo (ie kittykatt@kelemvor): controls entire userinfo line
69 | # options: on, off
70 | # default: on
71 | display="on"
72 | # display hostname (ie *@kelemvor)
73 | # options: on, off
74 | # default: on
75 | display_hostname="on"
76 | # display username (ie kittykatt@*)
77 | # options: on, off
78 | # default: on
79 | display_user="on"
80 | # underline user@host line
81 | # options: on, off
82 | # default: on
83 | underline="on"
84 |
85 | # Distribution Informat ionDisplay Options
86 | [distro]
87 | # display distribution name (ie Ubuntu)
88 | # options: on, off
89 | # default: on
90 | display="on"
91 | # shorthand for distro
92 | # options: auto, on, off, codename, version
93 | # default: auto (off)
94 | # examples:
95 | # on : Ubuntu
96 | # version : Ubuntu 20.10
97 | # codename : Ubuntu (Groovy Gorilla)
98 | # off : Ubuntu 20.10 (Groovy Gorilla)
99 | short="auto"
100 | # display OS architecture (ie x86_64)
101 | # options: on, off
102 | # default: on
103 | os_arch="on"
104 | # subtitle for distro line
105 | # default: OS
106 | # to turn off subtitle display, set this variable to empty
107 | subtitle="OS"
108 |
109 | # Kernel Information Display Options
110 | [kernel]
111 | # display kernel (ie Linux 5.8.0-1023-gc)
112 | # options: on, off
113 | # default: on
114 | display="on"
115 | # kernel shorthand
116 | # options: auto, on, off
117 | # default: auto (off)
118 | # examples:
119 | # on : 5.8.0-1023-gcp
120 | # off : Linux 5.8.0-1023-gcp
121 | short="auto"
122 | # subtitle for kernel line
123 | # default: Kernel
124 | # to turn off subtitle display, set this variable to empty
125 | subtitle="Kernel"
126 |
127 | # Uptime Information Display Options
128 | [uptime]
129 | # display uptime information (ie 2 days, 10 hours, 3 minutes)
130 | # options: on, off
131 | # default: on
132 | display="on"
133 | # uptime shorthand
134 | # options: auto, on, off, tiny
135 | # default: auto (off)
136 | # examples:
137 | # on : 2 days, 10 hours, 3 mins
138 | # off : 2 days, 10 hours, 3 minutes
139 | # tiny : 2d 10h 3m
140 | short="auto"
141 | # subtitle for uptime line
142 | # default: Uptime
143 | # to turn off subtitle display, set this variable to empty
144 | subtitle="Uptime"
145 |
146 | # Installed Packages Information Display Options
147 | [packages]
148 | # display installed packages (ie 384)
149 | # options: on, off
150 | # default: on
151 | display="on"
152 | # display packages from different package managers
153 | # options: off, on, split
154 | # default: off
155 | # examples:
156 | # off : 373
157 | # on : 384 (apt, snap, flatpak)
158 | # split : 373 (apt), 7 (snap), 3 (flatpak)
159 | managers="split"
160 | # subtitle for packages line
161 | # default: Packages
162 | # to turn off subtitle display, set this variable to empty
163 | subtitle="Packages"
164 |
165 | # Current Shell Information Display Options
166 | [shell]
167 | # display current shell (ie bash)
168 | # options: on, off
169 | # default: on
170 | display="on"
171 | # dispaly current shell version info
172 | # options: on, off
173 | # default: on
174 | # examples:
175 | # on : bash 5.0.17
176 | # off : bash
177 | version="on"
178 | # display full path of shell in use (ie /bin/bash)
179 | # options: on, off
180 | # default: off
181 | path="off"
182 | # subtitle for shell line
183 | # default: Shell
184 | # to turn off subtitle display, set this variable to empty
185 | subtitle="Shell"
186 |
187 | # CPU Information Display Options
188 | [cpu]
189 | # display detected CPU (ie Intel Xeon E5-2650 v2 (16) @ 2.6GHz)
190 | # options: on, off
191 | # default: on
192 | display="on"
193 | # display brand of detected cpu
194 | # options: on, off
195 | # default: on
196 | # examples:
197 | # on : Intel Xeon E5-2650 v2
198 | # off : Xeon E5-2650 v2
199 | brand="on"
200 | # display speed of detected cpu
201 | # options: on, off
202 | # default: on
203 | # examples:
204 | # on : Xeon E5-2650 v2 @ 2.6GHz
205 | # off : Xeon E5-2650 v2
206 | speed="on"
207 | # display number of logical cores
208 | # options: on, off
209 | # default: on
210 | # examples:
211 | # on : Xeon E5-2650 v2 (16)
212 | # off : Xeon E5-2650 v2
213 | cores="on"
214 | # display cpu temp
215 | # options: on, F, C
216 | # default: off
217 | # examples:
218 | # C : Intel Xeon E5-2650 v2 (16) @ 2.6GHz [27.2°C]
219 | # F : Intel Xeon E5-2650 v2 (16) @ 2.6GHz [82.0°F]
220 | # off : Intel Xeon E5-2650 v2 (16) @ 2.6GHz
221 | temp="off"
222 | # subtitle for cpu line
223 | # default: CPU
224 | # to turn off subtitle display, set this variable to empty
225 | subtitle="CPU"
226 |
227 | # Memory Information Display Options
228 | [memory]
229 | # display detected memory usage (5439MiB / 7653MiB (71%))
230 | # options: on, off
231 | # default: on
232 | display="on"
233 | # display percent of memory used
234 | # options: on, off
235 | # default: on
236 | # examples:
237 | # on : 5439MiB / 7653MiB (71%)
238 | # off : 5439MiB / 7653MiB
239 | percent="on"
240 | # subtitle for memory line
241 | # default: Memory
242 | # to turn off subtitle display, set this variable to empty
243 | subtitle="Memory"
244 |
245 | # GPU Information Display Options
246 | [gpu]
247 | # display detected GPU (ie Intel HD Graphics 520)
248 | # options: on, off
249 | # default: off
250 | display="off"
251 | # display brand of detected GPU
252 | # options: on, off
253 | # default: off
254 | # examples:
255 | # on : Intel HD Graphics 520
256 | # off : HD Graphics 520
257 | brand="on"
258 |
259 | # Resolution Information Display Options
260 | [resolution]
261 | # display current detected resolution (ie 2560x1440, 1920x1080)
262 | # options: on, off
263 | # default: on
264 | display="on"
265 | # select how resolution is displayed with multiple displays
266 | # options: combined, separate
267 | # default: separate
268 | # examples:
269 | # combined : 4480x2520
270 | # separate : 2560x1440, 1920x1080
271 | multiple="separate"
272 |
273 | # Desktop Environment Information Display Options
274 | [de]
275 | # display current detected desktop environment (ie GNOME 3.34.1)
276 | # options: on, off
277 | # default: on
278 | display="on"
279 | # display version info about detected desktop environment
280 | # options: on, off
281 | # default: on
282 | # examples:
283 | # on : GNOME 3.34.1
284 | # off : GNOME
285 | version_info="on"
286 |
287 | # Window Manager Information Display Options
288 | [wm]
289 | # display current detected window manager (ie Mutter 3.34.1)
290 | # options: on, off
291 | # default: on
292 | display="on"
293 | # display version info about detected window manager, if available
294 | # options: on, off
295 | # default: on
296 | # examples:
297 | # on : Mutter 3.34.1
298 | # off : Mutter
299 | version_info="on"
300 |
301 | # Theme Information Display Options
302 | [theme]
303 | # display current detected theme (this controls displaying any theme info)
304 | # options: on, off
305 | # default: on
306 | display="on"
307 | # display current GTK3 theme, icons, and font
308 | # options: on, off
309 | # default: on
310 | display_gtk3="on"
311 | # display current GTK2 theme, icons, and font
312 | # options: on, off
313 | # default: on
314 | display_gtk2="on"
315 | # display current window manager theme
316 | # options: on, off
317 | # default: on
318 | display_wm="on"
319 | # shorthand for GTK 2 and 3 theme info
320 | # options: on, off
321 | # default: off
322 | # examples:
323 | # on : Yaru, Adwaita
324 | # off : Yaru [GTK3], Adwaita [GTK2]
325 | gtk_short="off"
326 |
--------------------------------------------------------------------------------