Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
64188697
Commit
64188697
authored
Jan 09, 2019
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ascii: Fixed bug causing files named ascii to not work.
parent
9431a593
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
neofetch
neofetch
+5
-5
No files found.
neofetch
View file @
64188697
...
@@ -3414,7 +3414,7 @@ image_backend() {
...
@@ -3414,7 +3414,7 @@ image_backend() {
{ image_backend="ascii"; err "Image: Imagemagick not found, falling back to ascii mode."; }
{ image_backend="ascii"; err "Image: Imagemagick not found, falling back to ascii mode."; }
case "${image_backend:-off}" in
case "${image_backend:-off}" in
"ascii")
ge
t_ascii ;;
"ascii")
prin
t_ascii ;;
"off") image_backend="off" ;;
"off") image_backend="off" ;;
"caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
"caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\
...
@@ -3445,7 +3445,7 @@ image_backend() {
...
@@ -3445,7 +3445,7 @@ image_backend() {
err "Image: Valid backends are: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'kitty',
err "Image: Valid backends are: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'kitty',
'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')"
'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')"
err "Image: Falling back to ascii mode."
err "Image: Falling back to ascii mode."
ge
t_ascii
prin
t_ascii
;;
;;
esac
esac
...
@@ -3453,7 +3453,7 @@ image_backend() {
...
@@ -3453,7 +3453,7 @@ image_backend() {
[[ "$image_backend" != "off" ]] && printf '\e[%sA\e[9999999D' "${lines:-0}"
[[ "$image_backend" != "off" ]] && printf '\e[%sA\e[9999999D' "${lines:-0}"
}
}
ge
t_ascii() {
prin
t_ascii() {
if [[ -f $image_source && ! $image_source =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
if [[ -f $image_source && ! $image_source =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then
ascii_data="$(< "$image_source")"
ascii_data="$(< "$image_source")"
elif [[ $image_source == ascii || $image_source == auto ]]; then
elif [[ $image_source == ascii || $image_source == auto ]]; then
...
@@ -3472,7 +3472,7 @@ get_ascii() {
...
@@ -3472,7 +3472,7 @@ get_ascii() {
done <<< "${ascii_data//\$\{??\}}"
done <<< "${ascii_data//\$\{??\}}"
# Fallback if file not found.
# Fallback if file not found.
((lines==1)) && { lines=; ascii_len=; image_source="auto"; get_distro_ascii;
ge
t_ascii; return; }
((lines==1)) && { lines=; ascii_len=; image_source="auto"; get_distro_ascii;
prin
t_ascii; return; }
# Colors.
# Colors.
ascii_data="${ascii_data//\$\{c1\}/$c1}"
ascii_data="${ascii_data//\$\{c1\}/$c1}"
...
@@ -3891,7 +3891,7 @@ display_image() {
...
@@ -3891,7 +3891,7 @@ display_image() {
to_ascii() {
to_ascii() {
err "$1"
err "$1"
image_backend="ascii"
image_backend="ascii"
ge
t_ascii
prin
t_ascii
# Set cursor position next image/ascii.
# Set cursor position next image/ascii.
printf '\e[%sA\e[9999999D' "${lines:-0}"
printf '\e[%sA\e[9999999D' "${lines:-0}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment