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
11b952c3
Commit
11b952c3
authored
Feb 20, 2016
by
Dylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:dylanaraps/fetch
parents
ffb13939
817f4108
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
README.md
README.md
+1
-1
fetch
fetch
+16
-6
No files found.
README.md
View file @
11b952c3
...
@@ -277,7 +277,7 @@ alias fetch2="fetch \
...
@@ -277,7 +277,7 @@ alias fetch2="fetch \
--image type Image source. Where and what image we display.
--image type Image source. Where and what image we display.
Possible values: wall, shuffle, ascii,
Possible values: wall, shuffle, ascii,
/path/to/img, off
/path/to/img, off
--size
px Size in pixels to make the im
age.
--size
20 | --size 20% Size to make the image, takes pixels or a percent
age.
--image_backend w3m/iterm2 Which program to use to draw images.
--image_backend w3m/iterm2 Which program to use to draw images.
--shuffle_dir path/to/dir Which directory to shuffle for an image.
--shuffle_dir path/to/dir Which directory to shuffle for an image.
--image_position left/right Where to display the image: (Left/Right)
--image_position left/right Where to display the image: (Left/Right)
...
...
fetch
View file @
11b952c3
...
@@ -1864,12 +1864,22 @@ getimage () {
...
@@ -1864,12 +1864,22 @@ getimage () {
font_height=
$((
term_height
/
lines
))
font_height=
$((
term_height
/
lines
))
# Image size is half of the terminal
# Image size is half of the terminal
if [ "
$image_size
" == "
auto
" ]; then
case "
$image_size
" in
image_size=
$((
columns
*
font_width
/
2
))
"
auto
")
image_size=
$((
columns
*
font_width
/
2
))
[ "
$((
term_height
-
term_height
/
4
))
" -lt "
$image_size
" ] &&
\
[ "
$((
term_height
-
term_height
/
4
))
" -lt "
$image_size
" ] &&
\
image_size=
$((
term_height
-
term_height
/
4
))
image_size=
$((
term_height
-
term_height
/
4
))
fi
;;
*"
%
")
percent=
${
image_size
/\%
}
image_size=
$((
percent
*
term_width
/
100
))
[ "
$((
percent
*
term_height
/
50
))
" -lt "
$image_size
" ] &&
\
image_size=
$((
percent
*
term_height
/
100
))
;;
esac
# Where to draw the image
# Where to draw the image
case "
$image_position
" in
case "
$image_position
" in
...
@@ -2265,7 +2275,7 @@ usage () { cat << EOF
...
@@ -2265,7 +2275,7 @@ usage () { cat << EOF
--image type Image source. Where and what image we display.
--image type Image source. Where and what image we display.
Possible values: wall, shuffle, ascii,
Possible values: wall, shuffle, ascii,
/path/to/img, off
/path/to/img, off
--size
px Size in pixels to make the im
age.
--size
20 | --size 20% Size to make the image, takes pixels or a percent
age.
--image_backend w3m/iterm2 Which program to use to draw images.
--image_backend w3m/iterm2 Which program to use to draw images.
--shuffle_dir path/to/dir Which directory to shuffle for an image.
--shuffle_dir path/to/dir Which directory to shuffle for an image.
--image_position left/right Where to display the image: (Left/Right)
--image_position left/right Where to display the image: (Left/Right)
...
...
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