Skip to content

Commit 3cf3c06

Browse files
committed
2 parents 54bcc53 + 4549bff commit 3cf3c06

File tree

123 files changed

+8328
-5030
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+8328
-5030
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"dockerfile": "Dockerfile",
55
"args": { "VARIANT": "buster" }
66
},
7-
"postCreateCommand": "git config --global --add safe.directory $PWD",
7+
"postCreateCommand": "git config --global --add safe.directory $PWD && cargo install cargo-insta",
88
"extensions": ["EditorConfig.EditorConfig"],
99
"remoteUser": "vscode"
1010
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
docs/vercel/** linguist-documentation
2+
**.snap linguist-language=Plain-Text

.github/CODEOWNERS

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
/.github/ @spenserblack @o2sh
2-
/src/ui/image_backends/ @CephalonRho @yoichi
3-
/src/info/git.rs @Byron
4-
/src/info/repo @o2sh @Byron
2+
/image/src/ @cephalonRho @yoichi
3+
/src/info/ @o2sh
4+
/src/info/utils/git.rs @byron
5+
/src/info/langs/language.tera @spenserblack
56
/languages.yaml @spenserblack @o2sh
6-
/templates/language.rs @spenserblack
7-
/src/info/deps/ @HallerPatrick @o2sh
87
/src/cli.rs @spenserblack @o2sh
98
/vercel/ @spenserblack

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug report 🐛
22
description: Create a bug report to help us improve
3-
labels: ["bug"]
3+
labels: ["🐛 bug"]
44
body:
55
- type: markdown
66
attributes:
@@ -31,3 +31,11 @@ body:
3131
1.
3232
2.
3333
3.
34+
- type: textarea
35+
attributes:
36+
label: Additional context/Screenshots 🔦
37+
description: Add any other context about the problem here. If applicable, add screenshots to help explain.
38+
- type: textarea
39+
attributes:
40+
label: Possible Solution 💡
41+
description: Only if you have suggestions on a fix for the bug.

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature request 💄
22
description: Suggest an improvement
3-
labels: ["feature request"]
3+
labels: ["✨ enhancement"]
44
body:
55
- type: markdown
66
attributes:

.github/ISSUE_TEMPLATE/new_language.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: New Language Request 📢
22
description: Request for a new language to be supported
3-
labels: ["enhancement, good first issue"]
3+
labels: ["enhancement, 🌱 good first issue"]
44

55
body:
66
- type: markdown

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ version: 2
22
updates:
33
- package-ecosystem: cargo
44
directory: "/"
5+
groups:
6+
clap:
7+
patterns:
8+
- "clap"
9+
- "clap_*"
510
schedule:
611
interval: "weekly"
712
- package-ecosystem: "github-actions"
@@ -10,5 +15,9 @@ updates:
1015
interval: "weekly"
1116
- package-ecosystem: npm
1217
directory: /docs/vercel
18+
groups:
19+
site:
20+
patterns:
21+
- "*"
1322
schedule:
1423
interval: monthly

.github/wiki/Ascii-Art.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
This is the format onefetch uses for its ASCII art files.
2+
3+
#### Here's an example:
4+
5+
```
6+
{2} .:--::////::--.`
7+
{1} `/yNMMNho{2}////////////:.
8+
{1} `+NMMMMMMMMmy{2}/////////////:`
9+
{0} `-:::{1}ohNMMMMMMMNy{2}/////////////:`
10+
{0} .::::::::{1}odMMMMMMMNy{2}/////////////-
11+
{0} -:::::::::::{1}/hMMMMMMMmo{2}////////////-
12+
{0} .::::::::::::::{1}oMMMMMMMMh{2}////////////-
13+
{0}`:::::::::::::{1}/dMMMMMMMMMMNo{2}///////////`
14+
{0}-::::::::::::{1}sMMMMMMmMMMMMMMy{2}//////////-
15+
{0}-::::::::::{1}/dMMMMMMs{0}:{1}+NMMMMMMd{2}/////////:
16+
{0}-:::::::::{1}+NMMMMMm/{0}:::{1}/dMMMMMMm+{2}///////:
17+
{0}-::::::::{1}sMMMMMMh{0}:::::::{1}dMMMMMMm+{2}//////-
18+
{0}`:::::::{1}sMMMMMMy{0}:::::::::{1}dMMMMMMm+{2}/////`
19+
{0} .:::::{1}sMMMMMMs{0}:::::::::::{1}mMMMMMMd{2}////-
20+
{0} -:::{1}sMMMMMMy{0}::::::::::::{1}/NMMMMMMh{2}//-
21+
{0} .:{1}+MMMMMMd{0}::::::::::::::{1}oMMMMMMMo{2}-
22+
{1} `yMMMMMN/{0}:::::::::::::::{1}hMMMMMh.
23+
{1} -yMMMo{0}::::::::::::::::{1}/MMMy-
24+
{1} `/s{0}::::::::::::::::::{1}o/`
25+
{0} ``.---::::---..`
26+
```
27+
28+
#### Features:
29+
30+
- You can use `{0}` to `{X}`to color the ascii, with X > 0.
31+
- You can pass the flag `-c, --ascii-colors 2 5 ...` to set your own colors.
32+
- Look at the color palette to know the color order
33+
34+
![](https://i.imgur.com/NFT4WL4.png)

.github/wiki/Command-line-options.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
```man
2+
Usage: onefetch.exe [OPTIONS] [INPUT]
3+
4+
Arguments:
5+
[INPUT]
6+
Run as if onefetch was started in <input> instead of the current working directory
7+
8+
Options:
9+
-h, --help
10+
Print help (see a summary with '-h')
11+
12+
-V, --version
13+
Print version
14+
15+
INFO:
16+
-d, --disabled-fields <FIELD>...
17+
Allows you to disable FIELD(s) from appearing in the output
18+
19+
--no-title
20+
Hides the title
21+
22+
--number-of-authors <NUM>
23+
Maximum NUM of authors to be shown
24+
25+
[default: 3]
26+
27+
--number-of-languages <NUM>
28+
Maximum NUM of languages to be shown
29+
30+
[default: 6]
31+
32+
--number-of-file-churns <NUM>
33+
Maximum NUM of file churns to be shown
34+
35+
[default: 3]
36+
37+
--churn-pool-size <NUM>
38+
Minimum NUM of commits from HEAD used to compute the churn summary
39+
40+
By default, the actual value is non-deterministic due to time-based computation and will be displayed under the info title "Churn (NUM)"
41+
42+
-e, --exclude <EXCLUDE>...
43+
Ignore all files & directories matching EXCLUDE
44+
45+
--no-bots [<REGEX>]
46+
Exclude [bot] commits. Use <REGEX> to override the default pattern
47+
48+
--no-merges
49+
Ignores merge commits
50+
51+
-E, --email
52+
Show the email address of each author
53+
54+
--include-hidden
55+
Count hidden files and directories
56+
57+
-T, --type <TYPE>...
58+
Filters output by language type
59+
60+
[default: programming markup]
61+
[possible values: programming, markup, prose, data]
62+
63+
TEXT FORMATTING:
64+
-t, --text-colors <X>...
65+
Changes the text colors (X X X...)
66+
67+
Goes in order of title, ~, underline, subtitle, colon, and info
68+
69+
For example:
70+
71+
'--text-colors 9 10 11 12 13 14'
72+
73+
-z, --iso-time
74+
Use ISO 8601 formatted timestamps
75+
76+
--number-separator <SEPARATOR>
77+
Which thousands SEPARATOR to use
78+
79+
[default: plain]
80+
[possible values: plain, comma, space, underscore]
81+
82+
--no-bold
83+
Turns off bold formatting
84+
85+
ASCII:
86+
--ascii-input <STRING>
87+
Takes a non-empty STRING as input to replace the ASCII logo
88+
89+
It is possible to pass a generated STRING by command substitution
90+
91+
For example:
92+
93+
'--ascii-input "$(fortune | cowsay -W 25)"'
94+
95+
-c, --ascii-colors <X>...
96+
Colors (X X X...) to print the ascii art
97+
98+
-a, --ascii-language <LANGUAGE>
99+
Which LANGUAGE's ascii art to print
100+
101+
--true-color <WHEN>
102+
Specify when to use true color
103+
104+
If set to auto: true color will be enabled if supported by the terminal
105+
106+
[default: auto]
107+
[possible values: auto, never, always]
108+
109+
IMAGE:
110+
-i, --image <IMAGE>
111+
Path to the IMAGE file
112+
113+
--image-protocol <PROTOCOL>
114+
Which image PROTOCOL to use
115+
116+
[possible values: kitty, sixel, iterm]
117+
118+
--color-resolution <VALUE>
119+
VALUE of color resolution to use with SIXEL backend
120+
121+
[default: 16]
122+
[possible values: 16, 32, 64, 128, 256]
123+
124+
VISUALS:
125+
--no-color-palette
126+
Hides the color palette
127+
128+
--no-art
129+
Hides the ascii art or image if provided
130+
131+
DEVELOPER:
132+
-o, --output <FORMAT>
133+
Outputs Onefetch in a specific format
134+
135+
[possible values: json, yaml]
136+
137+
--generate <SHELL>
138+
If provided, outputs the completion file for given SHELL
139+
140+
[possible values: bash, elvish, fish, powershell, zsh]
141+
142+
OTHER:
143+
-l, --languages
144+
Prints out supported languages
145+
146+
-p, --package-managers
147+
Prints out supported package managers
148+
```

.github/wiki/Getting-Started.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
Onefetch is installed, then what?
2+
3+
### Usage
4+
5+
```sh
6+
> onefetch /path/of/your/repo
7+
```
8+
Or
9+
10+
```sh
11+
> cd /path/of/your/repo
12+
> onefetch
13+
```
14+
15+
### Misc
16+
17+
By [**@spenserblack**](https://github.com/spenserblack)
18+
```sh
19+
# Runs `onefetch -a Assembly`, `onefetch -a C`, etc.
20+
onefetch -l | tr "[:upper:] " "[:lower:]-" | while read line; do echo "$line"; onefetch -a $line; done;
21+
```
22+
By [**@quazar-omega**](https://github.com/quazar-omega)
23+
24+
A script to put in your `.bashrc` - or `.zshrc` - to run onefetch whenever you open a shell into a repository or `cd` into a repository, making sure that it's different from the last one you were in:
25+
```sh
26+
# git repository greeter
27+
last_repository=
28+
check_directory_for_new_repository() {
29+
current_repository=$(git rev-parse --show-toplevel 2> /dev/null)
30+
31+
if [ "$current_repository" ] && \
32+
[ "$current_repository" != "$last_repository" ]; then
33+
onefetch
34+
fi
35+
last_repository=$current_repository
36+
}
37+
cd() {
38+
builtin cd "$@"
39+
check_directory_for_new_repository
40+
}
41+
42+
# optional, greet also when opening shell directly in repository directory
43+
# adds time to startup
44+
check_directory_for_new_repository
45+
```
46+
47+
By [**@TheSast**](https://github.com/TheSast)
48+
49+
A fish adaptation of the previous script, run it once in your shell to save it:
50+
```fish
51+
function cd -w='cd'
52+
builtin cd $argv || return
53+
check_directory_for_new_repository
54+
end
55+
56+
function check_directory_for_new_repository
57+
set current_repository (git rev-parse --show-toplevel 2> /dev/null)
58+
if [ "$current_repository" ] && \
59+
[ "$current_repository" != "$last_repository" ]
60+
onefetch
61+
end
62+
set -gx last_repository $current_repository
63+
end
64+
65+
funcsave cd
66+
funcsave check_directory_for_new_repository
67+
```
68+
69+
By [**@mataha**](https://github.com/mataha)
70+
71+
An adaptation of the above snippet suited for Windows's `cmd.exe`,
72+
specifically for inclusion in AutoRun scripts or DOSKEY macrofiles:
73+
```batchfile
74+
@set LAST_REPOSITORY=
75+
76+
@doskey cd = ( ^
77+
for %%^^^^ in ("") do @for /f "delims=" %%i in (^^""$*%%~^^"^") do @( ^
78+
if "%%~i"=="" ( ^
79+
if defined USERPROFILE ( ^
80+
if /i not "%%CD%%"=="%%USERPROFILE%%" ( ^
81+
chdir /d "%%USERPROFILE%%" ^&^& set "OLDPWD=%%CD%%" ^
82+
) ^
83+
) else (call) ^
84+
) else if "%%~i"=="-" ( ^
85+
if defined OLDPWD ( ^
86+
if /i not "%%CD%%"=="%%OLDPWD%%" ( ^
87+
chdir /d "%%OLDPWD%%" ^&^& set "OLDPWD=%%CD%%" ^
88+
) ^
89+
) else (call) ^
90+
) else ( ^
91+
if defined CD ( ^
92+
if /i not "%%CD%%"=="%%~fi" ( ^
93+
chdir /d %%~fi ^&^& set "OLDPWD=%%CD%%" ^
94+
) ^
95+
) else (call) ^
96+
) ^
97+
) ^
98+
) ^&^& for /f "delims=" %%r in ('git rev-parse --show-toplevel 2^^^>nul') do @( ^
99+
if not "%%~r"=="%%LAST_REPOSITORY%%" ( ^
100+
onefetch ^
101+
) ^& set "LAST_REPOSITORY=%%~r" ^
102+
)
103+
```
104+
105+
By [**@mbrehin**](https://github.com/mbrehin)
106+
```sh
107+
# Add Git alias for onefetch.
108+
git config --global alias.project-summary '!which onefetch && onefetch'
109+
```

.github/wiki/Home.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Welcome to the onefetch's wiki!
2+
3+
- **[Home](https://github.com/o2sh/onefetch/wiki)**
4+
- **General**
5+
- [Installation](https://github.com/o2sh/onefetch/wiki/installation)
6+
- [Getting started](https://github.com/o2sh/onefetch/wiki/getting-started)
7+
- **Options**
8+
- [Command-line options](https://github.com/o2sh/onefetch/wiki/command-line-options)
9+
- **Images**
10+
- [Images in the terminal](https://github.com/o2sh/onefetch/wiki/Images-in-the-terminal)
11+
- **Ascii**
12+
- [Ascii art](https://github.com/o2sh/onefetch/wiki/ascii-art)

0 commit comments

Comments
 (0)