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
e23f6cdc
Commit
e23f6cdc
authored
Dec 16, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:dylanaraps/neofetch
parents
d2a31d2c
8449bf61
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
21 deletions
+16
-21
CHANGELOG.md
CHANGELOG.md
+7
-1
neofetch
neofetch
+9
-20
No files found.
CHANGELOG.md
View file @
e23f6cdc
...
...
@@ -26,7 +26,7 @@ Neofetch now has an irc channel at `#neofetch` on Freenode. If you have any ques
-
A new flag was added called
`--gen-man`
which generates a neofetch manpage in your current directory.
-
Delete most of
`info()`
and instead call
`prin()`
.
-
This removes a lot of duplicate code between
`info()`
and
`prin()`
.
-
Remove
`printf`
subshells and instead use
`printf -v`
to declare the variables.
## Info
...
...
@@ -100,3 +100,9 @@ Neofetch now has an irc channel at `#neofetch` on Freenode. If you have any ques
## Screenshot
-
Use arrays for
`$scrot_program`
## Args
-
Fixed bug where
`neofetch --config`
sourced the user config twice.
-
Cleaned up config arg handling.
neofetch
View file @
e23f6cdc
...
...
@@ -1798,7 +1798,7 @@ get_birthday() {
get_cols() {
if [[ "
$color_blocks
" == "
on
" ]]; then
# Convert the width to space chars.
block_width="
$(
printf
"%
${
block_width
}
s"
)
"
printf -v block_width "
%
${
block_width
}
s
"
block_width="
${
block_width
// /█
}
"
# Generate the string.
...
...
@@ -1811,7 +1811,7 @@ get_cols() {
done
# Convert height into spaces.
spaces="
$(
printf
"%
${
block_height
}
s"
)
"
printf -v spaces "
%
${
block_height
}
s
"
# Convert the spaces into rows of blocks.
[[ "
$blocks
" ]] && cols+="
${
spaces
// /
${
blocks
}${
reset
}
nl
}
"
...
...
@@ -1850,7 +1850,7 @@ get_image_backend() {
*)
if [[ -d "
$image_source
" ]]; then
files=("
${
image_source
%/
}
"/*.{png,jpg,jpeg})
image="
$(
printf
"%s"
"
${
files
[RANDOM % (
${#
files
[@]
}
- 1)]
}
"
)
"
printf -v image "
%s
" "
${
files
[RANDOM % (
${#
files
[@]
}
- 1)]
}
"
else
image="
$image_source
"
fi
...
...
@@ -2418,7 +2418,7 @@ prin() {
get_underline() {
if [[ "
$underline_enabled
" == "
on
" ]]; then
underline="
$(
printf
%
"
$length
"
s
)
"
printf -v underline "
%
${
length
}
s
"
underline="
${
underline_color
}${
underline
// /
$underline_char
}
"
unset -v length
fi
...
...
@@ -2704,8 +2704,7 @@ color() {
# OTHER
err() {
err+="$(color 1)[!]\033[0m $1
"
err+="$(color 1)[!]\033[0m $1\n"
}
get_script_dir() {
...
...
@@ -2792,8 +2791,8 @@ bar() {
elapsed
=
"
$((
$1
*
bar_length
/
$2
))
"
# Create the bar with spaces
pr
og
=
"
$(
printf
%
"
$elapsed
"
s
)
"
total
=
"
$(
printf
%
"
$((
bar_length
-
elapsed
))
"
s
)
"
pr
intf
-v
prog
"%
${
elapsed
}
s
"
printf
-v
total
"%
$((
bar_length
-
elapsed
))
s
"
# Set the colors and swap the spaces for $bar_char_
bar+
=
"
${
bar_color_elapsed
}${
prog
// /
$bar_char_elapsed
}
"
...
...
@@ -3134,17 +3133,7 @@ exit 1
get_args
()
{
# Check the commandline flags early for '--config none/off'
case
"
$@
"
in
*
"--config off"
*
|
*
'--config "off"'
*
|
*
"--config 'off'"
*
|
\
*
"--config none"
*
|
*
'--config "none"'
*
|
*
"--config 'none'"
*
)
config
=
"off"
;;
*
"--config -"
*
)
;;
*
"--config"
*
)
config
=
"off"
;;
esac
[[
"
${
config
:-
on
}
"
==
"on"
]]
&&
get_user_config 2>/dev/null
[[
"
$@
"
=
~
--config
\
?
(
off|none
)
]]
||
get_user_config 2>/dev/null
while
[[
"
$1
"
]]
;
do
case
"
$1
"
in
...
...
@@ -3291,7 +3280,7 @@ get_args() {
# Other
"--config"
)
case
"
$2
"
in
"none"
|
"off"
)
config
=
"off"
;;
"none"
|
"off"
|
""
)
config
=
"off"
;;
*
)
config_file
=
"
$2
"
;
config
=
"on"
;
get_user_config 2>/dev/null
;;
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