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
2429cb86
Commit
2429cb86
authored
Jul 31, 2017
by
Dylan Araps
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:dylanaraps/neofetch
parents
e52b01f2
fde69ea8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
CHANGELOG.md
CHANGELOG.md
+2
-0
neofetch
neofetch
+14
-11
No files found.
CHANGELOG.md
View file @
2429cb86
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
## Images
## Images
-
[
w3m
]
Fixed w3m-img not found on NixOS.
-
[
w3m
]
Fixed w3m-img not found on NixOS.
-
Added support for using all image types as input.
-
Neofetch now supports
`svg`
,
`tiff`
etc.
## ASCII
## ASCII
...
...
neofetch
View file @
2429cb86
...
@@ -1701,7 +1701,7 @@ get_term() {
...
@@ -1701,7 +1701,7 @@ get_term() {
case "
${
name
//
}
" in
case "
${
name
//
}
" in
"
${
SHELL
/*\/
}
" | *"
sh
" | "
tmux
"* | "
screen
" | "
su
"*) ;;
"
${
SHELL
/*\/
}
" | *"
sh
" | "
tmux
"* | "
screen
" | "
su
"*) ;;
"
login
"* | *"
Login
"* | "
init
" | "
(init)
") term="
$(
tty
)
" ;;
"
login
"* | *"
Login
"* | "
init
" | "
(init)
") term="
$(
tty
)
" ;;
"
ruby
" | "
1
" | "
systemd
" | "
sshd
"* | "
python
"* | "
USER
"*"
PID
"*) break ;;
"
ruby
" | "
1
" | "
systemd
" | "
sshd
"* | "
python
"* | "
USER
"*"
PID
"*
| "
kdeinit
"*
) break ;;
"
gnome
-terminal-
") term="
gnome
-terminal
" ;;
"
gnome
-terminal-
") term="
gnome
-terminal
" ;;
*"
nvim
") term="
Neovim
Terminal
" ;;
*"
nvim
") term="
Neovim
Terminal
" ;;
*"
NeoVimServer
"*) term="
VimR
Terminal
" ;;
*"
NeoVimServer
"*) term="
VimR
Terminal
" ;;
...
@@ -2277,7 +2277,7 @@ get_image_source() {
...
@@ -2277,7 +2277,7 @@ get_image_source() {
if [[ -d "
$image_source
" ]]; then
if [[ -d "
$image_source
" ]]; then
shopt -s nullglob
shopt -s nullglob
files=("
${
image_source
%/
}
"/*.{png,jpg,jpeg,jpe,gif})
files=("
${
image_source
%/
}
"/*.{png,jpg,jpeg,jpe,gif
,svg
})
shopt -u nullglob
shopt -u nullglob
image="
${
files
[RANDOM %
${#
files
[@]
}
]
}
"
image="
${
files
[RANDOM %
${#
files
[@]
}
]
}
"
...
@@ -2497,13 +2497,13 @@ get_image_size() {
...
@@ -2497,13 +2497,13 @@ get_image_size() {
make_thumbnail
()
{
make_thumbnail
()
{
# Name the thumbnail using variables so we can
# Name the thumbnail using variables so we can
# use it later.
# use it later.
image_name
=
"
$crop_mode
-
$crop_offset
-
$width
-
$height
"
image_name
=
"
$crop_mode
-
$crop_offset
-
$width
-
$height
-
${
image
//
'/'
/_
}
"
#
Check to see if the image has a file extension,
#
Handle file extensions.
# if it doesn't then add one.
case
"
${
image
##*.
}
"
in
case
"
${
image
##*/
}
"
in
"eps"
|
"pdf"
|
"svg"
|
"gif"
|
"png"
)
*
"."
*
)
image_name
=
"
${
image_name
}
-
${
image
##*/
}
"
;;
image_name+
=
".png
"
;;
*
)
image_name
=
"
${
image_name
}
-
${
image
##*/
}
.jpg"
;;
*
)
image_name+
=
"
.jpg"
;;
esac
esac
# Create the thumbnail dir if it doesn't exist.
# Create the thumbnail dir if it doesn't exist.
...
@@ -2530,6 +2530,7 @@ make_thumbnail() {
...
@@ -2530,6 +2530,7 @@ make_thumbnail() {
-format
"%[pixel:p{0,0}]"
info:
)
"
-format
"%[pixel:p{0,0}]"
info:
)
"
convert
\
convert
\
-background
none
\
"
$image
"
\
"
$image
"
\
-trim
+repage
\
-trim
+repage
\
-gravity
south
\
-gravity
south
\
...
@@ -2541,6 +2542,7 @@ make_thumbnail() {
...
@@ -2541,6 +2542,7 @@ make_thumbnail() {
"fill"
)
"fill"
)
convert
\
convert
\
-background
none
\
"
$image
"
\
"
$image
"
\
-trim
+repage
\
-trim
+repage
\
-scale
"
$width
"
x
"
$height
"
^
\
-scale
"
$width
"
x
"
$height
"
^
\
...
@@ -2551,6 +2553,7 @@ make_thumbnail() {
...
@@ -2551,6 +2553,7 @@ make_thumbnail() {
"none"
)
cp
"
$image
"
"
$thumbnail_dir
/
$image_name
"
;;
"none"
)
cp
"
$image
"
"
$thumbnail_dir
/
$image_name
"
;;
*
)
*
)
convert
\
convert
\
-background
none
\
"
$image
"
\
"
$image
"
\
-gravity
"
$crop_offset
"
\
-gravity
"
$crop_offset
"
\
-crop
"
$size
"
x
"
$size
"
+0+0
\
-crop
"
$size
"
x
"
$size
"
+0+0
\
...
@@ -2702,12 +2705,12 @@ scrot_program() {
...
@@ -2702,12 +2705,12 @@ scrot_program() {
if [[ "
$scrot_cmd
" != "
auto
" ]] && type -p "
$scrot_cmd
" >/dev/null; then
if [[ "
$scrot_cmd
" != "
auto
" ]] && type -p "
$scrot_cmd
" >/dev/null; then
scrot_program=("
$scrot_cmd
")
scrot_program=("
$scrot_cmd
")
elif type -p scrot >/dev/null; then
scrot_program=(scrot)
elif type -p maim >/dev/null; then
elif type -p maim >/dev/null; then
scrot_program=(maim)
scrot_program=(maim)
elif type -p scrot >/dev/null; then
scrot_program=(scrot)
elif type -p import >/dev/null && [[ "
$os
" != "
Mac
OS X
" ]]; then
elif type -p import >/dev/null && [[ "
$os
" != "
Mac
OS X
" ]]; then
scrot_program=(import -window root)
scrot_program=(import -window root)
...
...
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