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
1aa4c64f
Commit
1aa4c64f
authored
Mar 13, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #145 from dylanaraps/osx_codename
OSX Codename support
parents
81337b5a
ff218368
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
4 deletions
+42
-4
README.md
README.md
+1
-0
config
config/config
+4
-0
neofetch
neofetch
+34
-4
neofetch.1
neofetch.1
+3
-0
No files found.
README.md
View file @
1aa4c64f
...
@@ -284,6 +284,7 @@ alias fetch2="fetch \
...
@@ -284,6 +284,7 @@ alias fetch2="fetch \
NOTE: You can supply multiple args. eg.
NOTE: You can supply multiple args. eg.
'fetch --disable cpu gpu disk shell'
'fetch --disable cpu gpu disk shell'
--osx_buildversion on/off Hide/Show Mac OS X build version.
--osx_buildversion on/off Hide/Show Mac OS X build version.
--osx_codename on/off Hide/Show Mac OS X codename.
--os_arch on/off Hide/Show Windows architecture.
--os_arch on/off Hide/Show Windows architecture.
--speed_type type Change the type of cpu speed to display.
--speed_type type Change the type of cpu speed to display.
Possible values: current, min, max, bios,
Possible values: current, min, max, bios,
...
...
config/config
View file @
1aa4c64f
...
@@ -62,6 +62,10 @@ kernel_shorthand="on"
...
@@ -62,6 +62,10 @@ kernel_shorthand="on"
# --osx_buildversion on/off
# --osx_buildversion on/off
osx_buildversion
=
"on"
osx_buildversion
=
"on"
# Mac OS X hide/show codename
# --osx_codename on/off
osx_codename
=
"on"
# Show 'x86_64' and 'x86' in 'Distro:' output.
# Show 'x86_64' and 'x86' in 'Distro:' output.
# --os_arch on/off
# --os_arch on/off
os_arch
=
"on"
os_arch
=
"on"
...
...
neofetch
View file @
1aa4c64f
...
@@ -84,6 +84,10 @@ kernel_shorthand="on"
...
@@ -84,6 +84,10 @@ kernel_shorthand="on"
# --osx_buildversion on/off
# --osx_buildversion on/off
osx_buildversion
=
"on"
osx_buildversion
=
"on"
# Mac OS X hide/show codename
# --osx_codename on/off
osx_codename
=
"on"
# Show 'x86_64' and 'x86' in 'Distro:' output.
# Show 'x86_64' and 'x86' in 'Distro:' output.
# --os_arch on/off
# --os_arch on/off
os_arch
=
"on"
os_arch
=
"on"
...
@@ -464,7 +468,21 @@ case "$os" in
...
@@ -464,7 +468,21 @@ case "$os" in
;;
;;
"
Mac
OS X
")
"
Mac
OS X
")
distro="
Mac
OS X
$(
sw_vers
-productVersion
)
"
osx_version=
$(
sw_vers
-productVersion
)
case "
${
osx_version
%.*
}
" in
"
10
.4
") codename="
Mac
OS X Tiger
" ;;
"
10
.5
") codename="
Mac
OS X Leopard
" ;;
"
10
.6
") codename="
Mac
OS X Snow Leopard
" ;;
"
10
.7
") codename="
Mac
OS X Lion
" ;;
"
10
.8
") codename="
OS
X Mountain Lion
" ;;
"
10
.9
") codename="
OS
X Mavericks
" ;;
"
10
.10
") codename="
OS
X Yosemite
" ;;
"
10
.11
") codename="
OS
X El Capitan
" ;;
*) codename="
Mac
OS X
" ;;
esac
distro="
$codename
$osx_version
"
[ "
$osx_buildversion
" == "
on
" ] && distro+="
$(
sw_vers
-buildVersion
)
"
[ "
$osx_buildversion
" == "
on
" ] && distro+="
$(
sw_vers
-buildVersion
)
"
;;
;;
...
@@ -2209,8 +2227,9 @@ colors () {
...
@@ -2209,8 +2227,9 @@ colors () {
setcolors 4 8
setcolors 4 8
;;
;;
"
Mac
"* | "
Manjaro
"* | "
Deepin
"*
)
*"
OS X
"*
)
setcolors 2 3 1 1 5 4
setcolors 2 3 1 1 5 4
ascii_distro="
mac
"
;;
;;
"
OpenMandriva
"*)
"
OpenMandriva
"*)
...
@@ -2242,7 +2261,7 @@ colors () {
...
@@ -2242,7 +2261,7 @@ colors () {
setcolors 3 3 6 1 8
setcolors 3 3 6 1 8
;;
;;
"
OpenSuse
"*)
"
OpenSuse
"*
| "
Manjaro
"* | "
Deepin
"*
)
setcolors 2 7
setcolors 2 7
;;
;;
...
@@ -2448,6 +2467,7 @@ usage () { cat << EOF
...
@@ -2448,6 +2467,7 @@ usage () { cat << EOF
NOTE: You can supply multiple args. eg.
NOTE: You can supply multiple args. eg.
'neofetch --disable cpu gpu disk shell'
'neofetch --disable cpu gpu disk shell'
--osx_buildversion on/off Hide/Show Mac OS X build version.
--osx_buildversion on/off Hide/Show Mac OS X build version.
--osx_codename on/off Hide/Show Mac OS X codename.
--os_arch on/off Hide/Show Windows architecture.
--os_arch on/off Hide/Show Windows architecture.
--speed_type type Change the type of cpu speed to display.
--speed_type type Change the type of cpu speed to display.
Possible values: current, min, max, bios,
Possible values: current, min, max, bios,
...
@@ -2569,6 +2589,7 @@ while [ "$1" ]; do
...
@@ -2569,6 +2589,7 @@ while [ "$1" ]; do
# Info
# Info
--os_arch) os_arch="
$2
" ;;
--os_arch) os_arch="
$2
" ;;
--osx_buildversion) osx_buildversion="
$2
" ;;
--osx_buildversion) osx_buildversion="
$2
" ;;
--osx_codename) osx_codename="
$2
" ;;
--speed_type) speed_type="
$2
" ;;
--speed_type) speed_type="
$2
" ;;
--kernel_shorthand) kernel_shorthand="
$2
" ;;
--kernel_shorthand) kernel_shorthand="
$2
" ;;
--uptime_shorthand) uptime_shorthand="
$2
" ;;
--uptime_shorthand) uptime_shorthand="
$2
" ;;
...
@@ -2709,6 +2730,16 @@ done
...
@@ -2709,6 +2730,16 @@ done
# }}}
# }}}
# OS overides {{{
# Overide OS X codename
case "
$osx_codename
" in
"
off
") distro=
${
distro
/
${
codename
}
/Mac OS X
}
;;
esac
# }}}
# Call Functions and Finish Up {{{
# Call Functions and Finish Up {{{
...
@@ -2779,6 +2810,5 @@ if [ "$scrot" == "on" ]; then
...
@@ -2779,6 +2810,5 @@ if [ "$scrot" == "on" ]; then
takescrot
takescrot
fi
fi
# }}}
# }}}
neofetch.1
View file @
1aa4c64f
...
@@ -22,6 +22,9 @@ NOTE: You can supply multiple args. eg.
...
@@ -22,6 +22,9 @@ NOTE: You can supply multiple args. eg.
.B \--osx_buildversion 'on/off'
.B \--osx_buildversion 'on/off'
Hide/Show Mac OS X build version.
Hide/Show Mac OS X build version.
.TP
.TP
.B \--osx_codename 'on/off'
Hide/Show Mac OS X codename.
.TP
.B \--os_arch 'on/off'
.B \--os_arch 'on/off'
Hide/Show Windows architecture.
Hide/Show Windows architecture.
.TP
.TP
...
...
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