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
1fd64f5b
Commit
1fd64f5b
authored
Mar 07, 2016
by
Dylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add options to hide info when printing progress bars
parent
2a327bde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
7 deletions
+50
-7
config
config/config
+11
-0
neofetch
neofetch
+39
-7
No files found.
config/config
View file @
1fd64f5b
...
@@ -244,6 +244,17 @@ memory_bar="off"
...
@@ -244,6 +244,17 @@ memory_bar="off"
battery_bar
=
"off"
battery_bar
=
"off"
disk_bar
=
"off"
disk_bar
=
"off"
# Enable/Disable showing just the bar on its own.
# Set this to 'off' to only show the progress bar.
# --cpu_usage_info on/off
# --memory_info on/off
# --battery_info on/off
# --disk_info on/off
cpu_usage_info
=
"on"
memory_info
=
"on"
battery_info
=
"on"
disk_info
=
"on"
# }}}
# }}}
# Image Options {{{
# Image Options {{{
...
...
neofetch
View file @
1fd64f5b
...
@@ -266,6 +266,17 @@ memory_bar="off"
...
@@ -266,6 +266,17 @@ memory_bar="off"
battery_bar
=
"off"
battery_bar
=
"off"
disk_bar
=
"off"
disk_bar
=
"off"
# Enable/Disable showing just the bar on its own.
# Set this to 'off' to only show the progress bar.
# --cpu_usage_info on/off
# --memory_info on/off
# --battery_info on/off
# --disk_info on/off
cpu_usage_info
=
"on"
memory_info
=
"on"
battery_info
=
"on"
disk_info
=
"on"
# }}}
# }}}
# Image Options {{{
# Image Options {{{
...
@@ -1078,8 +1089,13 @@ getmemory () {
...
@@ -1078,8 +1089,13 @@ getmemory () {
;;
;;
esac
esac
[
"
$memory_bar
"
==
"on"
] && \
# Progress bars
memory+=
"
$(
bar
"
$memused
"
"
$memtotal
"
)
"
if [
"
$memory_bar
"
==
"on"
]; then
case
"
$memory_info
"
in
"off"
) memory=
"
$(
bar
"
$memused
"
"
$memtotal
"
)
"
;;
*) memory+=
"
$(
bar
"
$memused
"
"
$memtotal
"
)
"
;;
esac
fi
}
}
# }}}
# }}}
...
@@ -1385,7 +1401,11 @@ getdisk () {
...
@@ -1385,7 +1401,11 @@ getdisk () {
if [ "
$disk_bar
" == "
on
" ]; then
if [ "
$disk_bar
" == "
on
" ]; then
disk_used=
${
disk_used
/T
}
disk_used=
${
disk_used
/T
}
disk_total=
${
disk_total
/T
}
disk_total=
${
disk_total
/T
}
disk+="
$(
bar
"
${
disk_used
/
'.'
}
"
"
${
disk_total
/
'.'
}
"
)
"
case "
$disk_info
" in
"
off
") disk="
$disk_total_per
$(
bar
"
${
disk_used
/
'.'
}
"
"
${
disk_total
/
'.'
}
"
)
" ;;
*) disk+="
$(
bar
"
${
disk_used
/
'.'
}
"
"
${
disk_total
/
'.'
}
"
)
" ;;
esac
fi
fi
}
}
...
@@ -1474,8 +1494,12 @@ getbattery () {
...
@@ -1474,8 +1494,12 @@ getbattery () {
;;
;;
esac
esac
[ "
$battery_bar
" == "
on
" ] &&
\
if [ "
$battery_bar
" == "
on
" ]; then
battery+="
$(
bar
${
battery
/
'%'
}
100
)
"
case "
$battery_info
" in
"
off
") battery+="
$(
bar
${
battery
/
'%'
}
100
)
" ;;
*) battery="
$(
bar
${
battery
/
'%'
}
100
)
" ;;
esac
fi
}
}
# }}}
# }}}
...
@@ -1621,8 +1645,12 @@ getcpu_usage () {
...
@@ -1621,8 +1645,12 @@ getcpu_usage () {
cpu_usage="
$(
ps aux |
awk
'BEGIN { sum = 0 } { sum += $3 }; END { print sum }'
)
"
cpu_usage="
$(
ps aux |
awk
'BEGIN { sum = 0 } { sum += $3 }; END { print sum }'
)
"
cpu_usage="
${
cpu_usage
/\.*
}
%
"
cpu_usage="
${
cpu_usage
/\.*
}
%
"
[ "
$cpu_usage_bar
" == "
on
" ] &&
\
if [ "
$cpu_usage_bar
" == "
on
" ]; then
cpu_usage+="
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
"
case "
$cpu_usage_info
" in
"
off
") cpu_usage="
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
" ;;
*) cpu_usage+="
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
" ;;
esac
fi
}
}
...
@@ -2495,6 +2523,10 @@ while [ "$1" ]; do
...
@@ -2495,6 +2523,10 @@ while [ "$1" ]; do
--memory_bar) memory_bar="
$2
" ;;
--memory_bar) memory_bar="
$2
" ;;
--battery_bar) battery_bar="
$2
" ;;
--battery_bar) battery_bar="
$2
" ;;
--disk_bar) disk_bar="
$2
" ;;
--disk_bar) disk_bar="
$2
" ;;
--cpu_usage_info) cpu_usage_info="
$2
" ;;
--memory_info) memory_info="
$2
" ;;
--battery_info) battery_info="
$2
" ;;
--disk_info) disk_info="
$2
" ;;
# Image
# Image
--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