From 6e1e4ac241fcc113170f28656c99ef9b821aba9a Mon Sep 17 00:00:00 2001 From: rjorgenson Date: Mon, 9 Jan 2017 14:53:28 -0700 Subject: added README section for public_ip segment --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 54b5c519..87fd9182 100644 --- a/README.md +++ b/README.md @@ -315,6 +315,29 @@ specify the correct network interface by setting: |----------|---------------|-------------| |`POWERLEVEL9K_IP_INTERFACE`|None|The NIC for which you wish to display the IP address. Example: `eth0`.| +##### public_ip + +This segment will display your public IP address. There are several methods of obtaining this +information and by default it will try all of them starting with the most efficient. You can +also specify which method you would like it to use. The methods available are dig using opendns, +curl, or wget. The host used for wget and curl is http://ident.me by default but can be set to +another host if you prefer. + +The public_ip segment will attempt to update your public IP address every 5 minutes by default(also +configurable by the user). If you lose connection your cached IP address will be displayed until +your timeout expires at which point every time your prompt is generated a new attempt will be made. +Until an IP is successfully pulled the value of $POWERLEVEL9K_PUBLIC_IP_NONE will be displayed for +this segment. If this value is empty(the default)and $POWERLEVEL9K_PUBLIC_IP_FILE is empty the +segment will not be displayed. + +| Variable | Default Value | Description | +|----------|---------------|-------------| +|`POWERLEVEL9K_PUBLIC_IP_FILE`|'/tmp/p8k_public_ip'|This is the file your public IP is cached in.| +|`POWERLEVEL9K_PUBLIC_IP_HOST`|'http://ident.me'|This is the default host to get your public IP.| +|`POWERLEVEL9K_PUBLIC_IP_TIMOUT`|300|The amount of time in seconds between refreshing your cached IP.| +|`POWERLEVEL9K_PUBLIC_IP_METHOD`|None|You can set this to any of 'dig', 'curl', or 'wget' to only use that method to refresh your IP.| +|`POWERLEVEL9K_PUBLIC_IP_NONE`|None|The string displayed when an IP was not obtained| + ##### rbenv This segment shows the version of Ruby being used when using `rbenv` to change your current Ruby stack. -- cgit v1.2.3 From f5b544f4c8229291c83d7c9feef4546544ae5372 Mon Sep 17 00:00:00 2001 From: rjorgenson Date: Mon, 9 Jan 2017 15:06:14 -0700 Subject: added link to segemnt documenation in README --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index 87fd9182..ee1648f8 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ The segments that are currently available are: * [`dir`](#dir) - Your current working directory. * `history` - The command number for the current line. * [`ip`](#ip) - Shows the current IP address. +* [`public_ip`](#public_ip) - Shows your public IP address. * `load` - Your machine's load averages. * `os_icon` - Display a nice little icon, depending on your operating system. * `ram` - Show free RAM. -- cgit v1.2.3 From 2cb1f84ce7fa135c480712e684d67c03299a3615 Mon Sep 17 00:00:00 2001 From: rjorgenson Date: Mon, 9 Jan 2017 15:24:50 -0700 Subject: fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index ee1648f8..2ad799c4 100644 --- a/README.md +++ b/README.md @@ -335,7 +335,7 @@ segment will not be displayed. |----------|---------------|-------------| |`POWERLEVEL9K_PUBLIC_IP_FILE`|'/tmp/p8k_public_ip'|This is the file your public IP is cached in.| |`POWERLEVEL9K_PUBLIC_IP_HOST`|'http://ident.me'|This is the default host to get your public IP.| -|`POWERLEVEL9K_PUBLIC_IP_TIMOUT`|300|The amount of time in seconds between refreshing your cached IP.| +|`POWERLEVEL9K_PUBLIC_IP_TIEMOUT`|300|The amount of time in seconds between refreshing your cached IP.| |`POWERLEVEL9K_PUBLIC_IP_METHOD`|None|You can set this to any of 'dig', 'curl', or 'wget' to only use that method to refresh your IP.| |`POWERLEVEL9K_PUBLIC_IP_NONE`|None|The string displayed when an IP was not obtained| -- cgit v1.2.3 From 6321dd99c5e6050b24598cca8b37d54f520a6ffd Mon Sep 17 00:00:00 2001 From: rjorgenson Date: Mon, 9 Jan 2017 15:30:15 -0700 Subject: more typos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2ad799c4..ac0f86f4 100644 --- a/README.md +++ b/README.md @@ -335,7 +335,7 @@ segment will not be displayed. |----------|---------------|-------------| |`POWERLEVEL9K_PUBLIC_IP_FILE`|'/tmp/p8k_public_ip'|This is the file your public IP is cached in.| |`POWERLEVEL9K_PUBLIC_IP_HOST`|'http://ident.me'|This is the default host to get your public IP.| -|`POWERLEVEL9K_PUBLIC_IP_TIEMOUT`|300|The amount of time in seconds between refreshing your cached IP.| +|`POWERLEVEL9K_PUBLIC_IP_TIMEOUT`|300|The amount of time in seconds between refreshing your cached IP.| |`POWERLEVEL9K_PUBLIC_IP_METHOD`|None|You can set this to any of 'dig', 'curl', or 'wget' to only use that method to refresh your IP.| |`POWERLEVEL9K_PUBLIC_IP_NONE`|None|The string displayed when an IP was not obtained| -- cgit v1.2.3