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
ac7fe319
Commit
ac7fe319
authored
Jan 26, 2017
by
Dylan Araps
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:dylanaraps/neofetch
parents
afb5234e
98b2a423
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
neofetch
neofetch
+12
-6
No files found.
neofetch
View file @
ac7fe319
...
@@ -1093,7 +1093,7 @@ get_gpu() {
...
@@ -1093,7 +1093,7 @@ get_gpu() {
gpu
=
"
${
gpu
/Intel
}
"
gpu
=
"
${
gpu
/Intel
}
"
fi
fi
prin
"
${
subtitle
}${
gpu_num
}
"
"
$gpu
"
prin
"
${
subtitle
:+
${
subtitle
}${
gpu_name
}
}
"
"
$gpu
"
((
++gpu_num
))
((
++gpu_num
))
done
done
...
@@ -1748,7 +1748,7 @@ get_disk() {
...
@@ -1748,7 +1748,7 @@ get_disk() {
esac
esac
# Append '(disk mount point)' to the subtitle.
# Append '(disk mount point)' to the subtitle.
prin "
${
subtitle
}
(
${
disk_sub
}
)
" "
$disk
"
prin "
${
subtitle
:+
${
subtitle
}
(
${
disk_sub
}
)
}
" "
$disk
"
done
done
}
}
...
@@ -1774,7 +1774,7 @@ get_battery() {
...
@@ -1774,7 +1774,7 @@ get_battery() {
"
barinfo
") battery="
$(
bar
"
$capacity
"
100
)
${
battery
}
" ;;
"
barinfo
") battery="
$(
bar
"
$capacity
"
100
)
${
battery
}
" ;;
esac
esac
prin "
${
subtitle
}${
bat
:
-1
}
" "
$battery
"
prin "
${
subtitle
:+
${
subtitle
}${
bat
:
-1
}
}
" "
$battery
"
done
done
return
return
;;
;;
...
@@ -2519,7 +2519,7 @@ scrot_program() {
...
@@ -2519,7 +2519,7 @@ scrot_program() {
info() {
info() {
# Save subtitle value.
# Save subtitle value.
subtitle="
$1
"
[[ "
$2
" ]] &&
subtitle="
$1
"
# Make sure that
$prin
is unset.
# Make sure that
$prin
is unset.
unset -v prin
unset -v prin
...
@@ -2544,14 +2544,20 @@ info() {
...
@@ -2544,14 +2544,20 @@ info() {
else
else
err "
Info
:
Couldn
't detect ${1}."
err "
Info
:
Couldn
't detect ${1}."
fi
fi
unset -v subtitle
}
}
prin() {
prin() {
# If $2 doesn'
t
exist we format
$1
as info.
# If $2 doesn'
t
exist we format
$1
as info.
[[ -z
"
$2
"
]] && local subtitle_color=
"
$info_color
"
if [[
"
$(
trim
"
$1
"
)
"
&&
"
$2
"
]]; then
string=
"
${
1
//
$'
\0
33[0m'
}${
2
:+:
$2
}
"
else
string=
"
${
2
:-
$1
}
"
local subtitle_color=
"
$info_color
"
fi
# Format the output.
# Format the output.
string=
"
${
1
//
$'
\0
33[0m'
}${
2
:+:
$2
}
"
string=
"
$(
trim
"
$string
"
)
"
string=
"
$(
trim
"
$string
"
)
"
string=
"
${
string
/
:/
${
reset
}${
colon_color
}
:
${
info_color
}}
"
string=
"
${
string
/
:/
${
reset
}${
colon_color
}
:
${
info_color
}}
"
string=
"
${
subtitle_color
}${
bold
}${
string
}
"
string=
"
${
subtitle_color
}${
bold
}${
string
}
"
...
...
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