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
52d88d63
Commit
52d88d63
authored
Jan 05, 2017
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ascii: Fix hang caused by missing OS ascii art.
parent
64e3778b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
neofetch
neofetch
+8
-6
No files found.
neofetch
View file @
52d88d63
...
@@ -1906,7 +1906,7 @@ get_image_backend() {
...
@@ -1906,7 +1906,7 @@ get_image_backend() {
get_ascii
()
{
get_ascii
()
{
if
[[
!
-f
"
$ascii
"
||
"
$ascii
"
==
"distro"
]]
;
then
if
[[
!
-f
"
$ascii
"
||
"
$ascii
"
==
"distro"
]]
;
then
#
Error message
.
#
Fallback to distro ascii mode if custom ascii isn't found
.
[[
"
$ascii
"
!=
"distro"
&&
!
-f
"
$ascii
"
]]
&&
\
[[
"
$ascii
"
!=
"distro"
&&
!
-f
"
$ascii
"
]]
&&
\
err
"Ascii: Ascii file not found, using distro ascii."
err
"Ascii: Ascii file not found, using distro ascii."
...
@@ -1922,12 +1922,13 @@ get_ascii() {
...
@@ -1922,12 +1922,13 @@ get_ascii() {
else
else
get_script_dir 2>/dev/null
get_script_dir 2>/dev/null
ascii_dir
=
"
${
script_dir
}
/ascii/distro"
ascii_dir
=
"
${
script_dir
}
/ascii/distro"
[[
-d
"
$ascii_dir
"
]]
||
\
{
to_off
"Ascii: Ascii file not found, falling back to text mode."
;
return
;
}
fi
fi
ascii
=
"
${
ascii_dir
}
/
${
ascii_file
}
"
ascii
=
"
${
ascii_dir
}
/
${
ascii_file
}
"
# Fallback to no ascii mode if distro ascii isn't found.
[[
!
-f
"
$ascii
"
]]
&&
\
{
to_off
"Ascii: Failed to find distro ascii, falling back to no ascii mode."
;
return
;
}
fi
fi
# Set locale to get correct padding.
# Set locale to get correct padding.
...
@@ -2283,8 +2284,9 @@ to_ascii() {
...
@@ -2283,8 +2284,9 @@ to_ascii() {
to_off
()
{
to_off
()
{
# This function makes neofetch fallback to off mode.
# This function makes neofetch fallback to off mode.
text_padding
=
"0"
image_backend
=
"off"
image_backend
=
"off"
text_padding
=
zws
=
err
"
$1
"
err
"
$1
"
}
}
...
@@ -2419,7 +2421,7 @@ prin() {
...
@@ -2419,7 +2421,7 @@ prin() {
string=
"
${
subtitle_color
}${
bold
}${
string
}
"
string=
"
${
subtitle_color
}${
bold
}${
string
}
"
# Print the info.
# Print the info.
printf
"%b
\n
"
"
\0
33[
${
text_padding
}
C
${
zws
}${
string
}${
reset
}
"
printf
"%b
\n
"
"
${
text_padding
:+
\033[
${
text_padding
}
C
}
${
zws
}${
string
}${
reset
}
"
# Calculate info height.
# Calculate info height.
info_height=
"
$((
info_height+
=
1
))
"
info_height=
"
$((
info_height+
=
1
))
"
...
...
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