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
f24f7ad9
Commit
f24f7ad9
authored
Mar 03, 2016
by
Dylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added progress bar support to memory output
parent
639641a1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
1.4.md
1.4.md
+4
-0
README.md
README.md
+1
-0
config
config/config
+4
-1
neofetch
neofetch
+10
-3
No files found.
1.4.md
View file @
f24f7ad9
...
@@ -20,6 +20,10 @@ will be drawn with.
...
@@ -20,6 +20,10 @@ will be drawn with.
-
Added
`--cpu_usage_bar`
and
`$cpu_usage_bar`
to enable/disable displaying a progress<br
\>
-
Added
`--cpu_usage_bar`
and
`$cpu_usage_bar`
to enable/disable displaying a progress<br
\>
bar in the output.
bar in the output.
**Memory**
<br
\>
-
Added
`--memory_bar`
and
`$memory_bar`
to enable/disable displaying a progress bar in<br
\>
the output.
**Battery**
<br
\>
**Battery**
<br
\>
-
Added support for NetBSD
-
Added support for NetBSD
...
...
README.md
View file @
f24f7ad9
...
@@ -286,6 +286,7 @@ alias fetch2="fetch \
...
@@ -286,6 +286,7 @@ alias fetch2="fetch \
--progress_colors num num Colors to make the progress bar. Set in this order:
--progress_colors num num Colors to make the progress bar. Set in this order:
elapsed, total
elapsed, total
--cpu_usage_bar on/off Whether or not to print a progress bar for cpu usage.
--cpu_usage_bar on/off Whether or not to print a progress bar for cpu usage.
--memory_bar on/off Whether or not to print a progress bar for memory usage.
Image:
Image:
...
...
config/config
View file @
f24f7ad9
...
@@ -234,8 +234,11 @@ progress_length="15"
...
@@ -234,8 +234,11 @@ progress_length="15"
progress_color_elapsed
=
"6"
progress_color_elapsed
=
"6"
progress_color_total
=
"8"
progress_color_total
=
"8"
# Cpu Usage progress bar
# Enable/Disable progress bars
# --cpu_usage_bar on/off
# --memory_bar on/off
cpu_usage_bar
=
"on"
cpu_usage_bar
=
"on"
memory_bar
=
"on"
# }}}
# }}}
...
...
neofetch
View file @
f24f7ad9
...
@@ -256,8 +256,11 @@ progress_length="15"
...
@@ -256,8 +256,11 @@ progress_length="15"
progress_color_elapsed
=
"6"
progress_color_elapsed
=
"6"
progress_color_total
=
"8"
progress_color_total
=
"8"
# Cpu Usage progress bar
# Enable/Disable progress bars
# --cpu_usage_bar on/off
# --memory_bar on/off
cpu_usage_bar
=
"on"
cpu_usage_bar
=
"on"
memory_bar
=
"on"
# }}}
# }}}
...
@@ -1071,6 +1074,9 @@ getmemory () {
...
@@ -1071,6 +1074,9 @@ getmemory () {
memory=
"Unknown"
memory=
"Unknown"
;;
;;
esac
esac
[
"
$memory_bar
"
==
"on"
] && \
memory+=
"
$(
bar
"
$((
memused
/
100000
))
"
"
$((
memtotal
/
100000
))
"
)
"
}
}
# }}}
# }}}
...
@@ -1600,7 +1606,7 @@ getcpu_usage () {
...
@@ -1600,7 +1606,7 @@ getcpu_usage () {
cpu_usage="
${
cpu_usage
/\.*
}
%
"
cpu_usage="
${
cpu_usage
/\.*
}
%
"
[ "
$cpu_usage_bar
" == "
on
" ] &&
\
[ "
$cpu_usage_bar
" == "
on
" ] &&
\
cpu_usage+="
$(
bar
"
${
cpu_usage
/
'%'
}
"
)
"
cpu_usage+="
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
"
}
}
...
@@ -2269,7 +2275,7 @@ esac
...
@@ -2269,7 +2275,7 @@ esac
bar() {
bar() {
# Get the values
# Get the values
percent="
$1
"
percent="
$1
"
elapsed=
$((
percent
*
progress_length
/
100
))
elapsed=
$((
percent
*
progress_length
/
$2
))
# Create the bar with spaces
# Create the bar with spaces
prog=
$(
printf
%
"
$elapsed
"
s
)
prog=
$(
printf
%
"
$elapsed
"
s
)
...
@@ -2345,6 +2351,7 @@ usage () { cat << EOF
...
@@ -2345,6 +2351,7 @@ usage () { cat << EOF
--progress_colors num num Colors to make the progress bar. Set in this order:
--progress_colors num num Colors to make the progress bar. Set in this order:
elapsed, total
elapsed, total
--cpu_usage_bar on/off Whether or not to print a progress bar for cpu usage.
--cpu_usage_bar on/off Whether or not to print a progress bar for cpu usage.
--memory_bar on/off Whether or not to print a progress bar for memory usage.
Image:
Image:
...
...
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