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
93e7ab0b
Commit
93e7ab0b
authored
Dec 17, 2016
by
Muhammad Herdiansyah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OS: Merge all "GNU" instances to Linux
parent
7130124c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
neofetch
neofetch
+13
-14
No files found.
neofetch
View file @
93e7ab0b
...
@@ -28,13 +28,12 @@ get_os() {
...
@@ -28,13 +28,12 @@ get_os() {
# $kernel_name is set in a function called cache_uname and is
# $kernel_name is set in a function called cache_uname and is
# just the output of 'uname -s'.
# just the output of 'uname -s'.
case
"
$kernel_name
"
in
case
"
$kernel_name
"
in
"Linux"
)
os
=
"Linux"
;;
"Linux"
|
"GNU"
*
)
os
=
"Linux"
;;
"Darwin"
)
os
=
"
$(
sw_vers
-productName
)
"
;;
"Darwin"
)
os
=
"
$(
sw_vers
-productName
)
"
;;
*
"BSD"
|
"DragonFly"
|
"Bitrig"
)
os
=
"BSD"
;;
*
"BSD"
|
"DragonFly"
|
"Bitrig"
)
os
=
"BSD"
;;
"CYGWIN"
*
)
os
=
"Windows"
;;
"CYGWIN"
*
)
os
=
"Windows"
;;
"SunOS"
)
os
=
"Solaris"
;;
"SunOS"
)
os
=
"Solaris"
;;
"Haiku"
)
os
=
"Haiku"
;;
"Haiku"
)
os
=
"Haiku"
;;
"GNU"
*
)
os
=
"GNU"
;;
*
)
printf
"%s
\n
"
"Unknown OS detected:
$kernel_name
"
;
exit
1
;;
*
)
printf
"%s
\n
"
"Unknown OS detected:
$kernel_name
"
;
exit
1
;;
esac
esac
}
}
...
@@ -43,7 +42,7 @@ get_distro() {
...
@@ -43,7 +42,7 @@ get_distro() {
[[
"
$distro
"
]]
&&
return
[[
"
$distro
"
]]
&&
return
case
"
$os
"
in
case
"
$os
"
in
"Linux"
|
"GNU"
)
"Linux"
)
if
[[
"
$(
< /proc/version
)
"
==
*
"Microsoft"
*
||
"
$(
< /proc/sys/kernel/osrelease
)
"
==
*
"Microsoft"
*
]]
;
then
if
[[
"
$(
< /proc/version
)
"
==
*
"Microsoft"
*
||
"
$(
< /proc/sys/kernel/osrelease
)
"
==
*
"Microsoft"
*
]]
;
then
case
"
$distro_shorthand
"
in
case
"
$distro_shorthand
"
in
"on"
)
distro
=
"
$(
lsb_release
-sir
)
[Windows 10]"
;;
"on"
)
distro
=
"
$(
lsb_release
-sir
)
[Windows 10]"
;;
...
@@ -307,7 +306,7 @@ get_uptime() {
...
@@ -307,7 +306,7 @@ get_uptime() {
*
)
*
)
# Get uptime in seconds
# Get uptime in seconds
case
"
$os
"
in
case
"
$os
"
in
"Linux"
|
"Windows"
|
"GNU"
)
"Linux"
|
"Windows"
)
seconds
=
"
$(
< /proc/uptime
)
"
seconds
=
"
$(
< /proc/uptime
)
"
seconds
=
"
${
seconds
/.*
}
"
seconds
=
"
${
seconds
/.*
}
"
;;
;;
...
@@ -382,7 +381,7 @@ get_packages() {
...
@@ -382,7 +381,7 @@ get_packages() {
local
PATH
=
"
${
PATH
#
:
}
"
local
PATH
=
"
${
PATH
#
:
}
"
case
"
$os
"
in
case
"
$os
"
in
"Linux"
|
"iPhone OS"
|
"Solaris"
|
"GNU"
)
"Linux"
|
"iPhone OS"
|
"Solaris"
)
type
-p
pacman
>
/dev/null
&&
\
type
-p
pacman
>
/dev/null
&&
\
packages
=
"
$(
pacman
-Qq
--color
never |
wc
-l
)
"
packages
=
"
$(
pacman
-Qq
--color
never |
wc
-l
)
"
...
@@ -957,7 +956,7 @@ get_cpu_usage() {
...
@@ -957,7 +956,7 @@ get_cpu_usage() {
get_gpu
()
{
get_gpu
()
{
case
"
$os
"
in
case
"
$os
"
in
"Linux"
|
"GNU"
)
"Linux"
)
gpu
=
"
$(
PATH
=
"/sbin:
$PATH
"
lspci
-mm
|
awk
-F
'\\"|\\" \\"'
'/"Display|"3D|"VGA/ {print $3 " " $4}'
)
"
gpu
=
"
$(
PATH
=
"/sbin:
$PATH
"
lspci
-mm
|
awk
-F
'\\"|\\" \\"'
'/"Display|"3D|"VGA/ {print $3 " " $4}'
)
"
case
"
$gpu
"
in
case
"
$gpu
"
in
...
@@ -1067,7 +1066,7 @@ get_gpu() {
...
@@ -1067,7 +1066,7 @@ get_gpu() {
get_memory
()
{
get_memory
()
{
case
"
$os
"
in
case
"
$os
"
in
"Linux"
|
"Windows"
|
"GNU"
)
"Linux"
|
"Windows"
)
# MemUsed = Memtotal + Shmem - MemFree - Buffers - Cached - SReclaimable
# MemUsed = Memtotal + Shmem - MemFree - Buffers - Cached - SReclaimable
# Source: https://github.com/KittyKatt/screenFetch/issues/386#issuecomment-249312716
# Source: https://github.com/KittyKatt/screenFetch/issues/386#issuecomment-249312716
while
IFS
=
":"
read
-r
a b
;
do
while
IFS
=
":"
read
-r
a b
;
do
...
@@ -1220,7 +1219,7 @@ get_song() {
...
@@ -1220,7 +1219,7 @@ get_song() {
get_resolution
()
{
get_resolution
()
{
case
"
$os
"
in
case
"
$os
"
in
"Linux"
|
"BSD"
|
"Solaris"
|
"GNU"
)
"Linux"
|
"BSD"
|
"Solaris"
)
if
type
-p
xrandr
>
/dev/null
;
then
if
type
-p
xrandr
>
/dev/null
;
then
case
"
$refresh_rate
"
in
case
"
$refresh_rate
"
in
"on"
)
resolution
=
"
$(
xrandr
--nograb
--current
|
awk
'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}'
)
"
;;
"on"
)
resolution
=
"
$(
xrandr
--nograb
--current
|
awk
'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}'
)
"
;;
...
@@ -1686,7 +1685,7 @@ get_users() {
...
@@ -1686,7 +1685,7 @@ get_users() {
get_install_date() {
get_install_date() {
case "$os" in
case "$os" in
"Linux" | "
GNU" | "
iPhone OS")
"Linux" | "iPhone OS")
install_date="$(ls -alct --full-time / | awk '
/lost
\+
found|private/
{
printf
$6
" "
$7
}
')"
install_date="$(ls -alct --full-time / | awk '
/lost
\+
found|private/
{
printf
$6
" "
$7
}
')"
;;
;;
...
@@ -1931,7 +1930,7 @@ get_w3m_img_path() {
...
@@ -1931,7 +1930,7 @@ get_w3m_img_path() {
get_wallpaper
()
{
get_wallpaper
()
{
case
"
$os
"
in
case
"
$os
"
in
"Linux"
|
"BSD"
|
"Solaris"
|
"GNU"
)
"Linux"
|
"BSD"
|
"Solaris"
)
# Get DE if user has disabled the function.
# Get DE if user has disabled the function.
((
"
$de_run
"
!=
1
))
&&
get_de
((
"
$de_run
"
!=
1
))
&&
get_de
...
@@ -2547,23 +2546,23 @@ get_distro_colors() {
...
@@ -2547,23 +2546,23 @@ get_distro_colors() {
;;
;;
*)
*)
case
"
$
os
"
in
case
"
$
kernel_name
"
in
"Linux"
)
"Linux"
)
ascii_distro=
"linux"
ascii_distro=
"linux"
set_colors fg 8 3
set_colors fg 8 3
;;
;;
"BSD"
)
*
"BSD"
)
ascii_distro=
"bsd"
ascii_distro=
"bsd"
set_colors 1 7 4 3 6
set_colors 1 7 4 3 6
;;
;;
"GNU"
)
"GNU"
*
)
ascii_distro=
"gnu"
ascii_distro=
"gnu"
set_colors fg
set_colors fg
;;
;;
"S
olaris
"
)
"S
unOS
"
)
ascii_distro=
"solaris"
ascii_distro=
"solaris"
set_colors 3
set_colors 3
;;
;;
...
...
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