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
6647c770
Commit
6647c770
authored
Dec 14, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Info: Add checks to see if prin() was used directly
parent
139c55f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
neofetch
neofetch
+10
-5
No files found.
neofetch
View file @
6647c770
...
...
@@ -1270,7 +1270,6 @@ get_song() {
else
prin
"
$subtitle
"
"
$song
"
fi
unset
song
fi
}
...
...
@@ -1680,8 +1679,6 @@ get_battery() {
prin "
${
subtitle
}${
bat
:
-1
}
" "
$battery
"
done
unset battery
return
;;
...
...
@@ -2429,12 +2426,17 @@ scrot_program() {
# TEXT FORMATTING
info() {
# Make sure that
$prin
is unset.
unset -v prin
# Call the function.
"
get_
${
2
:-
$1
}
" 2>/dev/null
# If the get_func function called 'prin' directly, stop here.
(( "
$prin
" == 1 )) && return
# Update the variable
output="
${
2
:-
$1
}
"
output="
$(
trim
"
${
!output
}
"
)
"
output="
$(
trim
"
${
!2
:-${
!1
}}
"
)
"
if [[ "
$2
" && "
${
output
//
}
" ]]; then
length="
$((${#
1
}
+
${#
output
}
+
2
))
"
...
...
@@ -2464,6 +2466,9 @@ prin() {
# Calculate info height
info_height=
"
$((
info_height+
=
1
))
"
# Log that prin was used.
prin=1
}
get_underline() {
...
...
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