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
3205ec0f
Commit
3205ec0f
authored
Dec 19, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Image: Disable image mode if $DISPLAY is unset, closes #543
parent
17f3a7ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
neofetch
neofetch
+11
-3
No files found.
neofetch
View file @
3205ec0f
...
@@ -1770,10 +1770,18 @@ get_cols() {
...
@@ -1770,10 +1770,18 @@ get_cols() {
get_image_backend() {
get_image_backend() {
# This function determines which image backend to use
# This function determines which image backend to use
# by checking for programs and etc.
# by checking for programs and etc.
get_image_program
# Fallback to ascii mode if imagemagick isn'
t installed.
# If the image source isn'
t
'ascii'
or
'off'
type
-p
convert
>
/dev/null 2>&1
||
image_backend
=
"ascii"
if
[[
!
"
${
image_source
}
"
=
~ ^
(
off|ascii
)
$
]]
;
then
# If X isn't running force ascii mode here.
[[
-z
"
$DISPLAY
"
]]
&&
image_source
=
"ascii"
# Fallback to ascii mode if imagemagick isn't installed.
type
-p
convert
>
/dev/null 2>&1
||
image_source
=
"ascii"
fi
# Get the image program.
get_image_program
# If image source is ascii fallback to ascii
# If image source is ascii fallback to ascii
if
[[
"
$image_source
"
==
"ascii"
]]
;
then
if
[[
"
$image_source
"
==
"ascii"
]]
;
then
...
...
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