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
85a1bd0a
Commit
85a1bd0a
authored
Jan 08, 2019
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
color_blocks: Fix newlines when disabled.
parent
5316b568
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
20 deletions
+12
-20
neofetch
neofetch
+12
-20
No files found.
neofetch
View file @
85a1bd0a
...
@@ -82,9 +82,7 @@ print_info() {
...
@@ -82,9 +82,7 @@ print_info() {
# info "Users" users
# info "Users" users
# info "Locale" locale # This only works on glibc systems.
# info "Locale" locale # This only works on glibc systems.
info line_break
info cols
info cols
info line_break
}
}
...
@@ -3326,6 +3324,7 @@ get_gpu_driver() {
...
@@ -3326,6 +3324,7 @@ get_gpu_driver() {
gpu_driver="NVIDIA ${gpu_driver/ *}"
gpu_driver="NVIDIA ${gpu_driver/ *}"
fi
fi
;;
;;
"Mac OS X")
"Mac OS X")
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
gpu_driver="NVIDIA Web Driver"
gpu_driver="NVIDIA Web Driver"
...
@@ -3368,9 +3367,9 @@ get_cols() {
...
@@ -3368,9 +3367,9 @@ get_cols() {
cols="${cols//nl/\\n\\e[${text_padding}C${zws}}"
cols="${cols//nl/\\n\\e[${text_padding}C${zws}}"
# Add block height to info height.
# Add block height to info height.
((info_height+=block_height
-1
))
((info_height+=block_height
+2
))
printf '\
e[%bC%b
' "$text_padding" "${zws}${cols}"
printf '\
n\e[%bC%b\n
' "$text_padding" "${zws}${cols}"
fi
fi
unset -v blocks blocks2 cols
unset -v blocks blocks2 cols
...
@@ -3947,17 +3946,6 @@ get_underline() {
...
@@ -3947,17 +3946,6 @@ get_underline() {
prin=1
prin=1
}
}
get_line_break() {
# Print it directly.
printf '%b\n' "$zws"
# Calculate info height.
((++info_height))
# Tell info() that we printed manually.
prin=1
}
get_bold() {
get_bold() {
case "$ascii_bold" in
case "$ascii_bold" in
"on") ascii_bold='\e[1m' ;;
"on") ascii_bold='\e[1m' ;;
...
@@ -4058,7 +4046,7 @@ color() {
...
@@ -4058,7 +4046,7 @@ color() {
stdout() {
stdout() {
image_backend="off"
image_backend="off"
unset subtitle_color colon_color info_color underline_color bold title_color at_color \
unset subtitle_color colon_color info_color underline_color bold title_color at_color \
text_padding zws reset color_blocks
get_line_break
bar_color_elapsed bar_color_total \
text_padding zws reset color_blocks bar_color_elapsed bar_color_total \
c1 c2 c3 c4 c5 c6 c7 c8
c1 c2 c3 c4 c5 c6 c7 c8
}
}
...
@@ -4629,7 +4617,7 @@ get_args() {
...
@@ -4629,7 +4617,7 @@ get_args() {
"--ascii_bold") ascii_bold="$2" ;;
"--ascii_bold") ascii_bold="$2" ;;
"--logo" | "-L")
"--logo" | "-L")
image_backend="ascii"
image_backend="ascii"
print_info() {
info line_break
; }
print_info() {
printf '\n'
; }
;;
;;
# Other
# Other
...
@@ -4659,7 +4647,7 @@ get_args() {
...
@@ -4659,7 +4647,7 @@ get_args() {
"--json")
"--json")
json="on"
json="on"
unset -f get_title get_cols get_
line_break get_
underline
unset -f get_title get_cols get_underline
printf '{\n'
printf '{\n'
print_info 2>/dev/null
print_info 2>/dev/null
...
@@ -4701,9 +4689,7 @@ get_args() {
...
@@ -4701,9 +4689,7 @@ get_args() {
info "Public IP" public_ip
info "Public IP" public_ip
info "Users" users
info "Users" users
info line_break
info cols
info cols
info line_break
# Testing.
# Testing.
prin "prin"
prin "prin"
...
@@ -4744,6 +4730,11 @@ get_simple() {
...
@@ -4744,6 +4730,11 @@ get_simple() {
((simple)) && exit
((simple)) && exit
}
}
old_functions() {
# Removed functions for backwards compatability.
get_line_break() { :; }
}
get_distro_ascii() {
get_distro_ascii() {
# This function gets the distro ascii art and colors.
# This function gets the distro ascii art and colors.
#
#
...
@@ -8782,6 +8773,7 @@ main() {
...
@@ -8782,6 +8773,7 @@ main() {
image_backend
image_backend
get_cache_dir
get_cache_dir
old_functions
print_info
print_info
dynamic_prompt
dynamic_prompt
...
...
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