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
de5a260f
Commit
de5a260f
authored
Jan 08, 2019
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
public_ip: Added configurable timeout
parent
61776905
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
neofetch
neofetch
+10
-2
neofetch.1
neofetch.1
+3
-0
No files found.
neofetch
View file @
de5a260f
...
@@ -375,6 +375,12 @@ gtk3="on"
...
@@ -375,6 +375,12 @@ gtk3="on"
# Flag: --ip_host
# Flag: --ip_host
public_ip_host="http://ident.me"
public_ip_host="http://ident.me"
# Public IP timeout.
#
# Default: '2'
# Values: 'int'
# Flag: --ip_timeout
public_ip_timeout=2
# Disk
# Disk
...
@@ -3312,11 +3318,11 @@ get_public_ip() {
...
@@ -3312,11 +3318,11 @@ get_public_ip() {
fi
fi
if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
public_ip="$(curl --max-time
10
-w '\n' "$public_ip_host")"
public_ip="$(curl --max-time
"$public_ip_timeout"
-w '\n' "$public_ip_host")"
fi
fi
if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
public_ip="$(wget -T
10
-qO- "$public_ip_host")"
public_ip="$(wget -T
"$public_ip_timeout"
-qO- "$public_ip_host")"
fi
fi
}
}
...
@@ -4375,6 +4381,7 @@ INFO:
...
@@ -4375,6 +4381,7 @@ INFO:
'dir' shows the basename of the disks's path. (/, Local Disk, etc)
'dir' shows the basename of the disks's path. (/, Local Disk, etc)
--ip_host url URL to query for public IP
--ip_host url URL to query for public IP
--ip_timeout int Public IP timeout (in seconds).
--song_format format Print the song data in a specific format (see config file).
--song_format format Print the song data in a specific format (see config file).
--song_shorthand on/off Print the Artist/Album/Title on separate lines.
--song_shorthand on/off Print the Artist/Album/Title on separate lines.
--memory_percent on/off Display memory percentage.
--memory_percent on/off Display memory percentage.
...
@@ -4528,6 +4535,7 @@ get_args() {
...
@@ -4528,6 +4535,7 @@ get_args() {
"--shell_path") shell_path="$2" ;;
"--shell_path") shell_path="$2" ;;
"--shell_version") shell_version="$2" ;;
"--shell_version") shell_version="$2" ;;
"--ip_host") public_ip_host="$2" ;;
"--ip_host") public_ip_host="$2" ;;
"--ip_timeout") public_ip_timeout="$2" ;;
"--song_format") song_format="$2" ;;
"--song_format") song_format="$2" ;;
"--song_shorthand") song_shorthand="$2" ;;
"--song_shorthand") song_shorthand="$2" ;;
"--music_player") music_player="$2" ;;
"--music_player") music_player="$2" ;;
...
...
neofetch.1
View file @
de5a260f
...
@@ -138,6 +138,9 @@ Takes: name, mount, dir
...
@@ -138,6 +138,9 @@ Takes: name, mount, dir
\fB\-\-ip_host\fR url
\fB\-\-ip_host\fR url
URL to query for public IP
URL to query for public IP
.TP
.TP
\fB\-\-ip_timeout\fR int
Public IP timeout (in seconds).
.TP
\fB\-\-song_format\fR format
\fB\-\-song_format\fR format
Print the song data in a specific format (see config file).
Print the song data in a specific format (see config file).
.TP
.TP
...
...
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