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
87d6e719
Commit
87d6e719
authored
Oct 16, 2016
by
Dylan Araps
Committed by
GitHub
Oct 16, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #368 from dylanaraps/blocks
Fix bugs with color blocks
parents
5a4b201d
84686013
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
config
config/config
+1
-1
neofetch
neofetch
+5
-4
No files found.
config/config
View file @
87d6e719
...
@@ -241,7 +241,7 @@ color_blocks="on"
...
@@ -241,7 +241,7 @@ color_blocks="on"
# Color block width in spaces
# Color block width in spaces
# --block_width num
# --block_width num
block_width
=
2
block_width
=
3
# Color block height in lines
# Color block height in lines
# --block_height num
# --block_height num
...
...
neofetch
View file @
87d6e719
...
@@ -1901,14 +1901,15 @@ getbirthday() {
...
@@ -1901,14 +1901,15 @@ getbirthday() {
getcols() {
getcols() {
if [ "
$color_blocks
" == "
on
" ]; then
if [ "
$color_blocks
" == "
on
" ]; then
# Convert the width to space chars.
# Convert the width to space chars.
block_width="
$(
printf
"%
$((
block_width-
=
1
))
s"
)
"
block_width="
$(
printf
"%
${
block_width
}
s"
)
"
block_width="
${
block_width
// /█
}
"
# Generate the string.
# Generate the string.
while [
$start
-le
$end
]; do
while [
$start
-le
$end
]; do
case "
$start
" in
case "
$start
" in
[0-6]) blocks+="
${
reset
}
\033[3
${
start
}
m
\033[4
${
start
}
m
%
${
block_width
}
s
" ;;
[0-6]) blocks+="
${
reset
}
\033[3
${
start
}
m
\033[4
${
start
}
m
${
block_width
}
" ;;
7) blocks+="
${
reset
}
\033[3
${
start
}
m
\033[4
${
start
}
m
%
${
block_width
}
s
" ;;
7) blocks+="
${
reset
}
\033[3
${
start
}
m
\033[4
${
start
}
m
${
block_width
}
" ;;
*) blocks2+="
\033[38;5;
${
start
}
m
\033[48;5;
${
start
}
m
%
${
block_width
}
s
" ;;
*) blocks2+="
\033[38;5;
${
start
}
m
\033[48;5;
${
start
}
m
${
block_width
}
" ;;
esac
esac
start="
$((
start+
=
1
))
"
start="
$((
start+
=
1
))
"
done
done
...
...
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