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
c47d095a
Commit
c47d095a
authored
Oct 30, 2016
by
Muhammad Herdiansyah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expanded distro_shorthand to *BSDs
parent
dcf51866
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 @
c47d095a
...
...
@@ -448,8 +448,9 @@ alias neofetch2="neofetch \
--cpu_temp on/off Hide/Show cpu temperature.
NOTE This only works on linux.
--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
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)
--refresh_rate on/off Whether to display the refresh rate of each monitor
Unsupported on Windows
...
...
neofetch
View file @
c47d095a
#!/usr/bin/env bash
# set -x
# vim: fdm=marker:noai:ts=4:sw=4
# vim: fdm=marker:noai:ts=4:sw=4
:expandtab
#
# Neofetch info about your system
# https://github.com/dylanaraps/neofetch
...
...
@@ -218,7 +218,11 @@ getdistro() {
;;
"BSD"
)
distro=
"
$(
uname
-s
)
"
case
"
$distro_shorthand
"
in
"tiny"
|
"on"
) distro=
"
$(
uname
-s
)
"
;;
*) distro=
"
$(
uname
-sr
)
"
;;
esac
distro=
"
${
distro
/DragonFly/DragonFlyBSD
}
"
# Workaround for PCBSD as uname still displays FreeBSD.
...
...
@@ -270,7 +274,22 @@ getkernel() {
"
on
") kernel_flags="
-r
" ;;
"
off
") kernel_flags="
-sr
" ;;
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
--cpu_temp on/off Hide/Show cpu temperature.
NOTE This only works on linux.
--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
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)
--refresh_rate on/off Whether to display the refresh rate of each monitor
Unsupported on Windows
...
...
neofetch.1
View file @
c47d095a
...
...
@@ -51,10 +51,12 @@ NOTE This only works on linux.
.B \--distro_shorthand 'on/off'
Shorten the output of distro (tiny, on, off)
.br
NOTE: This
is only possible on Linux, macOS, and Solaris
NOTE: This
option won't work in Windows (Cygwin)
.TP
.B \--kernel_shorthand 'on/off'
Shorten the output of kernel
.br
NOTE: This option won't work in BSDs (except PacBSD and PC-BSD)
.TP
.B \--uptime_shorthand '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