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
c72138df
Commit
c72138df
authored
Nov 01, 2016
by
Dylan Araps
Committed by
GitHub
Nov 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #403 from konimex/bsd
Expanded distro_shorthand to *BSDs
parents
dcf51866
c47d095a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
README.md
README.md
+2
-1
neofetch
neofetch
+24
-4
neofetch.1
neofetch.1
+3
-1
No files found.
README.md
View file @
c72138df
...
@@ -448,8 +448,9 @@ alias neofetch2="neofetch \
...
@@ -448,8 +448,9 @@ alias neofetch2="neofetch \
--cpu_temp on/off Hide/Show cpu temperature.
--cpu_temp on/off Hide/Show cpu temperature.
NOTE This only works on linux.
NOTE This only works on linux.
--distro_shorthand on/off Shorten the output of distro (tiny, on, off)
--distro_shorthand on/off Shorten the output of distro (tiny, on, off)
NOTE: This
is only possible on Linux, macOS, and Solaris
NOTE: This
option won't work in Windows (Cygwin)
--kernel_shorthand on/off Shorten the output of kernel
--kernel_shorthand on/off Shorten the output of kernel
NOTE: This option won't work in BSDs (except PacBSD and PC-BSD)
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--refresh_rate on/off Whether to display the refresh rate of each monitor
--refresh_rate on/off Whether to display the refresh rate of each monitor
Unsupported on Windows
Unsupported on Windows
...
...
neofetch
View file @
c72138df
#!/usr/bin/env bash
#!/usr/bin/env bash
# set -x
# set -x
# vim: fdm=marker:noai:ts=4:sw=4
# vim: fdm=marker:noai:ts=4:sw=4
:expandtab
#
#
# Neofetch info about your system
# Neofetch info about your system
# https://github.com/dylanaraps/neofetch
# https://github.com/dylanaraps/neofetch
...
@@ -218,7 +218,11 @@ getdistro() {
...
@@ -218,7 +218,11 @@ getdistro() {
;;
;;
"BSD"
)
"BSD"
)
distro=
"
$(
uname
-s
)
"
case
"
$distro_shorthand
"
in
"tiny"
|
"on"
) distro=
"
$(
uname
-s
)
"
;;
*) distro=
"
$(
uname
-sr
)
"
;;
esac
distro=
"
${
distro
/DragonFly/DragonFlyBSD
}
"
distro=
"
${
distro
/DragonFly/DragonFlyBSD
}
"
# Workaround for PCBSD as uname still displays FreeBSD.
# Workaround for PCBSD as uname still displays FreeBSD.
...
@@ -270,7 +274,22 @@ getkernel() {
...
@@ -270,7 +274,22 @@ getkernel() {
"
on
") kernel_flags="
-r
" ;;
"
on
") kernel_flags="
-r
" ;;
"
off
") kernel_flags="
-sr
" ;;
"
off
") kernel_flags="
-sr
" ;;
esac
esac
kernel="
$(
uname
$kernel_flags
)
"
# Hardcode kernel settings in BSDs
case "
$os
" in
"
BSD
")
case "
$distro
" in
"
PacBSD
"* | "
PCBSD
"*) kernel="
$(
uname
$kernel_flags
)
" ;;
*)
case "
$distro_shorthand
" in
"
on
" | "
tiny
") kernel=
$(
uname
-r
)
;;
*) unset kernel ;;
esac
;;
esac
;;
*) kernel="
$(
uname
$kernel_flags
)
" ;;
esac
}
}
# }}}
# }}}
...
@@ -2882,8 +2901,9 @@ usage() { cat << EOF
...
@@ -2882,8 +2901,9 @@ usage() { cat << EOF
--cpu_temp on/off Hide/Show cpu temperature.
--cpu_temp on/off Hide/Show cpu temperature.
NOTE This only works on linux.
NOTE This only works on linux.
--distro_shorthand on/off Shorten the output of distro (tiny, on, off)
--distro_shorthand on/off Shorten the output of distro (tiny, on, off)
NOTE: This
is only possible on Linux, macOS, and Solaris
NOTE: This
option won't work in Windows (Cygwin)
--kernel_shorthand on/off Shorten the output of kernel
--kernel_shorthand on/off Shorten the output of kernel
NOTE: This option won't work in BSDs (except PacBSD and PC-BSD)
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--refresh_rate on/off Whether to display the refresh rate of each monitor
--refresh_rate on/off Whether to display the refresh rate of each monitor
Unsupported on Windows
Unsupported on Windows
...
...
neofetch.1
View file @
c72138df
...
@@ -51,10 +51,12 @@ NOTE This only works on linux.
...
@@ -51,10 +51,12 @@ NOTE This only works on linux.
.B \--distro_shorthand 'on/off'
.B \--distro_shorthand 'on/off'
Shorten the output of distro (tiny, on, off)
Shorten the output of distro (tiny, on, off)
.br
.br
NOTE: This
is only possible on Linux, macOS, and Solaris
NOTE: This
option won't work in Windows (Cygwin)
.TP
.TP
.B \--kernel_shorthand 'on/off'
.B \--kernel_shorthand 'on/off'
Shorten the output of kernel
Shorten the output of kernel
.br
NOTE: This option won't work in BSDs (except PacBSD and PC-BSD)
.TP
.TP
.B \--uptime_shorthand 'on/off'
.B \--uptime_shorthand 'on/off'
Shorten the output of uptime (tiny, on, off)
Shorten the output of uptime (tiny, on, off)
...
...
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