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
2e8e69a1
Commit
2e8e69a1
authored
Apr 14, 2018
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general: Cleanup
parent
16b5157d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
neofetch
neofetch
+12
-17
No files found.
neofetch
View file @
2e8e69a1
...
@@ -1281,11 +1281,10 @@ get_gpu() {
...
@@ -1281,11 +1281,10 @@ get_gpu() {
case "
$os
" in
case "
$os
" in
"
Linux
")
"
Linux
")
# Read GPUs into array.
# Read GPUs into array.
IFS=
$'
\n
'
gpu_cmd="
$(
lspci
-mm
|
awk
-F
'\\"|\\" \\"|\\('
\
gpus=(
$(
lspci
-mm
|
awk
-F
'\\"|\\" \\"|\\('
\
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a)
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a)
{if(!seen[a[i]]++) print a[i]}}'
)
"
{if(!seen[a[i]]++) print a[i]}}'
)
)
IFS=
$'
\n
' read -d "" -ra gpus <<< "
$gpu_cmd
"
IFS="
$old_ifs
"
# Remove duplicate Intel Graphics outputs.
# Remove duplicate Intel Graphics outputs.
# This fixes cases where the outputs are both
# This fixes cases where the outputs are both
...
@@ -2296,10 +2295,8 @@ get_disk() {
...
@@ -2296,10 +2295,8 @@ get_disk() {
# Create an array called 'disks' where each element is a separate line from
# Create an array called 'disks' where each element is a separate line from
# df's output. We then unset the first element which removes the column titles.
# df's output. We then unset the first element which removes the column titles.
IFS
=
$'
\n
'
IFS
=
$'
\n
'
read
-d
""
-ra
disks
<<<
"
$(
df
"
${
df_flags
[@]
}
"
"
${
disk_show
[@]
:-
/
}
"
)
"
disks
=(
$(
df
"
${
df_flags
[@]
}
"
"
${
disk_show
[@]
:-
/
}
"
)
)
unset
"disks[0]"
unset
'disks[0]'
IFS
=
"
$old_ifs
"
# Stop here if 'df' fails to print disk info.
# Stop here if 'df' fails to print disk info.
if
[[
-z
"
${
disks
[*]
}
"
]]
;
then
if
[[
-z
"
${
disks
[*]
}
"
]]
;
then
...
@@ -2309,7 +2306,7 @@ get_disk() {
...
@@ -2309,7 +2306,7 @@ get_disk() {
for
disk
in
"
${
disks
[@]
}
"
;
do
for
disk
in
"
${
disks
[@]
}
"
;
do
# Create a second array and make each element split at whitespace this time.
# Create a second array and make each element split at whitespace this time.
disk_info
=(
$disk
)
IFS
=
" "
read
-ra
disk_info
<<<
"
$disk
"
disk_perc
=
"
${
disk_info
[4]/
'%'
}
"
disk_perc
=
"
${
disk_info
[4]/
'%'
}
"
case
"
$df_version
"
in
case
"
$df_version
"
in
...
@@ -4507,7 +4504,7 @@ old_options() {
...
@@ -4507,7 +4504,7 @@ old_options() {
cache_uname
()
{
cache_uname
()
{
# Cache the output of uname so we don't
# Cache the output of uname so we don't
# have to spawn it multiple times.
# have to spawn it multiple times.
uname
=(
$(
uname
-sr
)
)
IFS
=
" "
read
-ra
uname
<<<
"
$(
uname
-sr
)
"
kernel_name
=
"
${
uname
[0]
}
"
kernel_name
=
"
${
uname
[0]
}
"
kernel_version
=
"
${
uname
[1]
}
"
kernel_version
=
"
${
uname
[1]
}
"
...
@@ -4837,11 +4834,6 @@ Report bugs to https://github.com/dylanaraps/neofetch/issues
...
@@ -4837,11 +4834,6 @@ Report bugs to https://github.com/dylanaraps/neofetch/issues
exit
1
exit
1
}
}
version
()
{
printf
"%s
\\
n"
"Neofetch
$version
"
exit
1
}
get_args
()
{
get_args
()
{
# Check the commandline flags early for '--config'.
# Check the commandline flags early for '--config'.
[[
"
$*
"
!=
*
--config
*
]]
&&
get_user_config
[[
"
$*
"
!=
*
--config
*
]]
&&
get_user_config
...
@@ -5019,7 +5011,10 @@ get_args() {
...
@@ -5019,7 +5011,10 @@ get_args() {
"-v"
)
verbose
=
"on"
;;
"-v"
)
verbose
=
"on"
;;
"-vv"
)
set
-x
;
verbose
=
"on"
;;
"-vv"
)
set
-x
;
verbose
=
"on"
;;
"--help"
)
usage
;;
"--help"
)
usage
;;
"--version"
)
version
;;
"--version"
)
printf
"%s
\\
n"
"Neofetch
$version
"
exit
1
;;
"--gen-man"
)
"--gen-man"
)
help2man
-n
"A fast, highly customizable system info script"
\
help2man
-n
"A fast, highly customizable system info script"
\
-N
./neofetch
-o
neofetch.1
-N
./neofetch
-o
neofetch.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