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
eda20680
Commit
eda20680
authored
Jan 05, 2017
by
Dylan Araps
Committed by
GitHub
Jan 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #594 from dylanaraps/fixes
General: Fixes
parents
febc4653
7fae8044
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
neofetch
neofetch
+17
-17
No files found.
neofetch
View file @
eda20680
...
@@ -456,7 +456,7 @@ get_packages() {
...
@@ -456,7 +456,7 @@ get_packages() {
"
FreeBSD
") packages="
$((
packages+
=
$(
pkg info |
wc
-l
)))
" ;;
"
FreeBSD
") packages="
$((
packages+
=
$(
pkg info |
wc
-l
)))
" ;;
*)
*)
packages="
$((
packages+
=
$(
ls
-1
/var/db/pkg |
wc
-l
)))
"
packages="
$((
packages+
=
$(
ls
-1
/var/db/pkg |
wc
-l
)))
"
((
"
$packages
" == "
0
"
)) && packages="
$((
packages+
=
$(
pkg list |
wc
-l
)))
"
((
packages == 0
)) && packages="
$((
packages+
=
$(
pkg list |
wc
-l
)))
"
esac
esac
fi
fi
;;
;;
...
@@ -488,7 +488,7 @@ get_packages() {
...
@@ -488,7 +488,7 @@ get_packages() {
;;
;;
esac
esac
((
"
$packages
" == "
0
"
)) && unset packages
((
packages == 0
)) && unset packages
}
}
get_shell() {
get_shell() {
...
@@ -999,7 +999,7 @@ get_gpu() {
...
@@ -999,7 +999,7 @@ get_gpu() {
IFS
=
"
$old_ifs
"
IFS
=
"
$old_ifs
"
# Number the GPUs if more than one exists.
# Number the GPUs if more than one exists.
((
"
${#
gpus
[@]
}
"
>
1
))
&&
gpu_num
=
1
((
${#
gpus
[@]
}
>
1
))
&&
gpu_num
=
1
for
gpu
in
"
${
gpus
[@]
}
"
;
do
for
gpu
in
"
${
gpus
[@]
}
"
;
do
# GPU shorthand tests.
# GPU shorthand tests.
...
@@ -1311,7 +1311,7 @@ get_resolution() {
...
@@ -1311,7 +1311,7 @@ get_resolution() {
[[
"
$resolution
"
==
*
"@ Hz"
*
]]
&&
\
[[
"
$resolution
"
==
*
"@ Hz"
*
]]
&&
\
resolution
=
"
${
resolution
//@ Hz
}
"
resolution
=
"
${
resolution
//@ Hz
}
"
((
"
${
scale_factor
%.*
}
"
==
2
))
&&
\
((
${
scale_factor
%.*
}
==
2
))
&&
\
resolution
=
"
${
resolution
// @/@2x @
}
"
resolution
=
"
${
resolution
// @/@2x @
}
"
if
[[
"
$refresh_rate
"
==
"off"
]]
;
then
if
[[
"
$refresh_rate
"
==
"off"
]]
;
then
...
@@ -1942,7 +1942,7 @@ get_ascii() {
...
@@ -1942,7 +1942,7 @@ get_ascii() {
# Calculate size of ascii file in line length / line count.
# Calculate size of ascii file in line length / line count.
line
=
"
${
line
//\
$\
{??\
}
}"
line
=
"
${
line
//\
$\
{??\
}
}"
line
=
"
${
line
//\\\\/\\
}
"
line
=
"
${
line
//\\\\/\\
}
"
((
"
${#
line
}
"
>
"
${
ascii_length
:-
0
}
"
))
&&
ascii_length
=
"
${#
line
}
"
((
${#
line
}
>
ascii_length
))
&&
ascii_length
=
"
${#
line
}
"
lines
=
"
$((
lines+
=
1
))
"
lines
=
"
$((
lines+
=
1
))
"
done
<
"
$ascii
"
done
<
"
$ascii
"
...
@@ -2020,7 +2020,7 @@ get_wallpaper() {
...
@@ -2020,7 +2020,7 @@ get_wallpaper() {
image
=
"
$(
awk
-F
'='
'/file/ {printf $2;exit;}'
"
${
XDG_CONFIG_HOME
}
/nitrogen/bg-saved.cfg"
)
"
image
=
"
$(
awk
-F
'='
'/file/ {printf $2;exit;}'
"
${
XDG_CONFIG_HOME
}
/nitrogen/bg-saved.cfg"
)
"
else
else
image
=
"
$(
gsettings get org.gnome.d
image
=
esktop.background picture-uri
)
"
image
=
"
$(
gsettings get org.gnome.desktop.background picture-uri
)
"
image
=
"
$(
decode_url
"
$image
"
)
"
image
=
"
$(
decode_url
"
$image
"
)
"
fi
fi
;;
;;
...
@@ -2149,7 +2149,7 @@ get_image_size() {
...
@@ -2149,7 +2149,7 @@ get_image_size() {
image_size
=
"
$((
columns
*
font_width
/
2
))
"
image_size
=
"
$((
columns
*
font_width
/
2
))
"
term_height
=
"
$((
term_height
-
term_height
/
4
))
"
term_height
=
"
$((
term_height
-
term_height
/
4
))
"
((
"
$term_height
"
<
"
$image_size
"
))
&&
\
((
term_height < image_size
))
&&
\
image_size
=
"
$term_height
"
image_size
=
"
$term_height
"
;;
;;
...
@@ -2157,7 +2157,7 @@ get_image_size() {
...
@@ -2157,7 +2157,7 @@ get_image_size() {
percent
=
"
${
image_size
/\%
}
"
percent
=
"
${
image_size
/\%
}
"
image_size
=
"
$((
percent
*
term_width
/
100
))
"
image_size
=
"
$((
percent
*
term_width
/
100
))
"
((
"
$((
percent
*
term_height
/
50
))
"
<
"
$image_size
"
))
&&
\
((
(
percent
*
term_height / 50
)
< image_size
))
&&
\
image_size
=
"
$((
percent
*
term_height
/
100
))
"
image_size
=
"
$((
percent
*
term_height
/
100
))
"
;;
;;
...
@@ -2204,7 +2204,7 @@ make_thumbnail() {
...
@@ -2204,7 +2204,7 @@ make_thumbnail() {
# This checks to see if height is greater than width
# This checks to see if height is greater than width
# so we can do a better crop of portrait images.
# so we can do a better crop of portrait images.
size
=
"
$og_height
"
size
=
"
$og_height
"
((
"
$og_height
"
>
"
$og_width
"
))
&&
size
=
"
$og_width
"
((
og_height
>
og_width
))
&&
size
=
"
$og_width
"
fi
fi
case
"
$crop_mode
"
in
case
"
$crop_mode
"
in
...
@@ -2486,7 +2486,7 @@ trim_quotes() {
...
@@ -2486,7 +2486,7 @@ trim_quotes() {
}
}
uppercase() {
uppercase() {
((
"$bash_version"
>= 4)) && printf "%s" "${1^}"
((
bash_version
>= 4)) && printf "%s" "${1^}"
}
}
# COLORS
# COLORS
...
@@ -3067,12 +3067,12 @@ set_text_colors() {
...
@@ -3067,12 +3067,12 @@ set_text_colors() {
info_color="$reset"
info_color="$reset"
# If the ascii art uses 8 as a color, make the text the fg.
# If the ascii art uses 8 as a color, make the text the fg.
((
"$1"
== 8)) && title_color="$reset"
((
${1:-1}
== 8)) && title_color="$reset"
((
"$2"
== 8)) && subtitle_color="$reset"
((
${2:-7}
== 8)) && subtitle_color="$reset"
# If the second color is white use the first for the subtitle.
# If the second color is white use the first for the subtitle.
((
"$2"
== 7)) && subtitle_color="$(color "$1")"
((
${2:-7}
== 7)) && subtitle_color="$(color "$1")"
((
"$1"
== 7)) && title_color="$reset"
((
${1:-1}
== 7)) && title_color="$reset"
else
else
title_color="$(color "${colors[0]}")"
title_color="$(color "${colors[0]}")"
at_color="$(color "${colors[1]}")"
at_color="$(color "${colors[1]}")"
...
@@ -3283,7 +3283,7 @@ dynamic_prompt() {
...
@@ -3283,7 +3283,7 @@ dynamic_prompt() {
# If the info is higher than the ascii/image place the prompt
# If the info is higher than the ascii/image place the prompt
# based on the info height instead of the ascii/image height.
# based on the info height instead of the ascii/image height.
if
((
"
${
lines
:-
0
}
"
<
"
${
info_height
:-
0
}
"
))
;
then
if
((
lines < info_height
))
;
then
printf
"
\n
"
printf
"
\n
"
return
return
else
else
...
@@ -3291,7 +3291,7 @@ dynamic_prompt() {
...
@@ -3291,7 +3291,7 @@ dynamic_prompt() {
fi
fi
# Set the prompt location.
# Set the prompt location.
if
((
"
$lines
"
< 0
))
;
then
if
((
lines
< 0
))
;
then
printf
"%b"
"
\0
33[
${
lines
/-
}
A"
printf
"%b"
"
\0
33[
${
lines
/-
}
A"
else
else
printf
"%b"
"
\0
33[
${
lines
}
B"
printf
"%b"
"
\0
33[
${
lines
}
B"
...
@@ -3700,7 +3700,7 @@ get_args() {
...
@@ -3700,7 +3700,7 @@ get_args() {
"--disable"
)
continue
;;
"--disable"
)
continue
;;
"-"
*
)
break
;;
"-"
*
)
break
;;
*
)
*
)
((
"
$bash_version
"
>=
4
))
&&
func
=
"
${
func
,,
}
"
((
bash_version
>=
4
))
&&
func
=
"
${
func
,,
}
"
unset
-f
"get_
$func
"
unset
-f
"get_
$func
"
;;
;;
esac
esac
...
...
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