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
6485476a
Commit
6485476a
authored
Mar 13, 2016
by
Dylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various progress bar fixes
parent
77cd07b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
55 deletions
+33
-55
config
config/config
+15
-20
neofetch
neofetch
+18
-35
No files found.
config/config
View file @
6485476a
...
...
@@ -234,26 +234,21 @@ progress_length="15"
progress_color_elapsed
=
"6"
progress_color_total
=
"8"
# Enable/Disable progress bars
# --cpu_usage_bar on/off
# --memory_bar on/off
# --battery_bar on/off
# --disk_bar on/off
cpu_usage_bar
=
"off"
memory_bar
=
"off"
battery_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"
# Customize how the info is displayed.
# bar: Only the progress bar is displayed.
# infobar: The bar is displayed after the info.
# barinfo: The bar is displayed before the info.
# off: Only the info is displayed.
#
# --cpu_displau bar/infobar/barinfo/off
# --memory_display bar/infobar/barinfo/off
# --battery_display bar/infobar/barinfo/off
# --disk_display bar/infobar/barinfo/off
cpu_display
=
"off"
memory_display
=
"off"
battery_display
=
"off"
disk_display
=
"off"
# }}}
...
...
neofetch
View file @
6485476a
...
...
@@ -262,10 +262,17 @@ progress_length="15"
progress_color_elapsed
=
"6"
progress_color_total
=
"8"
# Enable/Disable progress bars
# --memory_bar bar/infobar/barinfo/off
# --battery_bar bar/infobar/barinfo/off
# --disk_bar bar/infobar/barinfo/off
# Customize how the info is displayed.
# bar: Only the progress bar is displayed.
# infobar: The bar is displayed after the info.
# barinfo: The bar is displayed before the info.
# off: Only the info is displayed.
#
# --cpu_displau bar/infobar/barinfo/off
# --memory_display bar/infobar/barinfo/off
# --battery_display bar/infobar/barinfo/off
# --disk_display bar/infobar/barinfo/off
cpu_display
=
"off"
memory_display
=
"off"
battery_display
=
"off"
disk_display
=
"off"
...
...
@@ -899,19 +906,17 @@ getcpu () {
esac
# Add CPU info bar
prin "
${
subtitle
}
:
${
cpu
}
"
cpu_usage="
$(
ps aux |
awk
'BEGIN { sum = 0 } { sum += $3 }; END { print sum }'
)
"
cpu_usage="
${
cpu_usage
/\.*
}
%
"
case "
$cpu_display
" in
"
info
") prin "
CPU
Usage
:
${
cpu_usage
}
" ;;
"
bar
") prin "
CPU
Usage
:
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
" ;;
"
infobar
") prin "
CPU
Usage
:
${
cpu_usage
}
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
" ;;
"
barinfo
") prin "
CPU
Usage
:
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
${
cpu_usage
}
" ;;
"
info
") prin "
${
subtitle
}
Usage
:
${
cpu_usage
}
" ;;
"
bar
") prin "
${
subtitle
}
Usage
:
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
" ;;
"
infobar
") prin "
${
subtitle
}
Usage
:
${
cpu_usage
}
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
" ;;
"
barinfo
") prin "
${
subtitle
}
Usage
:
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
${
cpu_usage
}
" ;;
esac
unset cpu
}
...
...
@@ -1470,16 +1475,11 @@ getbattery () {
else
if [ "
${#
batteries
[@]
}
" -gt 1 ]; then
unset battery
# Print each battery on a separate line.
for bat in "
${
batteries
[@]
}
"; do
battery="
${
title
}${
index
}
:
${
bat
}
%
"
[ "
$battery_bar
" == "
on
" ] &&
\
battery+="
$(
bar
$bat
100
)
"
prin "
$battery
"
unset battery
index=
$((
index
+
1
))
prin "
${
title
}${
index
}
:
${
bat
}
%
"
done
return
fi
...
...
@@ -1671,23 +1671,6 @@ getcols () {
# }}}
# CPU Usage {{{
getcpu_usage () {
cpu_usage="
$(
ps aux |
awk
'BEGIN { sum = 0 } { sum += $3 }; END { print sum }'
)
"
cpu_usage="
${
cpu_usage
/\.*
}
%
"
if [ "
$cpu_usage_bar
" == "
on
" ]; then
case "
$cpu_usage_info
" in
"
off
") cpu_usage="
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
" ;;
*) cpu_usage+="
$(
bar
"
${
cpu_usage
/
'%'
}
"
100
)
" ;;
esac
fi
}
# }}}
# }}}
...
...
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