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
af97d1a6
Commit
af97d1a6
authored
Jan 02, 2017
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ascii: Glob match ascii art
parent
dfdc9977
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
22 deletions
+16
-22
neofetch
neofetch
+16
-22
No files found.
neofetch
View file @
af97d1a6
...
@@ -20,7 +20,7 @@ export LANG=C
...
@@ -20,7 +20,7 @@ export LANG=C
export
PATH
=
"/usr/sbin:/sbin:
${
PATH
}
"
export
PATH
=
"/usr/sbin:/sbin:
${
PATH
}
"
# Set no case match.
# Set no case match.
shopt
-s
nocasematch
shopt
-s
nocasematch
nocaseglob
# Reset colors and bold.
# Reset colors and bold.
reset
=
"
\0
33[0m"
reset
=
"
\0
33[0m"
...
@@ -1922,34 +1922,28 @@ get_ascii() {
...
@@ -1922,34 +1922,28 @@ get_ascii() {
[[
"
$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."
# Lowercase the distro name so we can match it to a file.
# Find ascii art dir.
if
((
"
$bash_version
"
<
=
3
))
;
then
if
[[
-d
"/usr/share/neofetch/ascii/distro"
]]
;
then
ascii
=
"
$(
tr
'[:upper:]'
'[:lower:]'
<<<
"
$ascii_distro
"
)
"
ascii_dir
=
"/usr/share/neofetch/ascii/distro"
else
ascii
=
"
${
ascii_distro
,,
}
"
fi
if
[[
-f
"/usr/share/neofetch/ascii/distro/
${
ascii
/ *
}
"
]]
;
then
ascii
=
"/usr/share/neofetch/ascii/distro/
${
ascii
/ *
}
"
elif
[[
-
f
"/usr/local/share/neofetch/ascii/distro/
${
ascii
/ *
}
"
]]
;
then
elif
[[
-
d
"/usr/local/share/neofetch/ascii/distro
"
]]
;
then
ascii
=
"/usr/local/share/neofetch/ascii/distro/
${
ascii
/ *
}
"
ascii
_dir
=
"/usr/local/share/neofetch/ascii/distro
"
elif
[[
-
f
"/data/data/com.termux/files/usr/share/neofetch/ascii/distro/
${
ascii
/ *
}
"
]]
;
then
elif
[[
-
d
"/data/data/com.termux/files/usr/share/neofetch/ascii/distro
"
]]
;
then
ascii
=
"/data/data/com.termux/files/usr/share/neofetch/ascii/distro/
${
ascii
/ *
}
"
ascii
_dir
=
"/data/data/com.termux/files/usr/share/neofetch/ascii/distro
"
else
else
get_script_dir 2>/dev/null
get_script_dir 2>/dev/null
ascii_dir
=
"
${
script_dir
}
/ascii/distro"
fi
# If the ascii file doesn't exist fallback to text mode.
# Remove 'linux' from 'linux mint'.
if
[[
-f
"
$script_dir
/ascii/distro/
${
ascii
/ *
}
"
]]
;
then
[[
"
$ascii_distro
"
=
~ ^linux
]]
&&
ascii_distro
=
"
${
ascii_distro
/linux
}
"
ascii
=
"
$script_dir
/ascii/distro/
${
ascii
/ *
}
"
else
# ascii_dir/first_letter (example: 'ascii_dir/m'*)
to_off
"Ascii: Ascii file not found, falling back to text mode."
for
art
in
"
${
ascii_dir
}
/
${
ascii_distro
:0:1
}
"
*
;
do
return
[[
"
$ascii_distro
"
=
~
${
art
/*\/
}
]]
&&
{
ascii
=
"
$art
"
;
break
;
}
fi
done
fi
fi
fi
# Set locale to get correct padding.
# Set locale to get correct padding.
...
...
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