mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-17 21:30:07 +00:00
Merge branch 'master' into next
This commit is contained in:
commit
f46617acd3
3 changed files with 10 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
test-vm/.vagrant
|
||||
*.swp
|
||||
|
|
|
@ -452,7 +452,7 @@ specify the correct network interface by setting:
|
|||
|----------|---------------|-------------|
|
||||
|`POWERLEVEL9K_IP_INTERFACE`|None|The NIC for which you wish to display the IP address. Example: `eth0`.|
|
||||
|
||||
##### vpn
|
||||
##### vpn_ip
|
||||
|
||||
This segment tries to extract the VPN related IP addresses from nmcli, based on the NIC type:
|
||||
|
||||
|
@ -587,6 +587,9 @@ customization is provided via:
|
|||
|`POWERLEVEL9K_CHANGESET_HASH_LENGTH`|`12`|How many characters of the hash / changeset to display in the segment.|
|
||||
|`POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY`|`true`|Set to `false` to not reflect submodule status in the top-level repository prompt.|
|
||||
|`POWERLEVEL9K_VCS_HIDE_TAGS`|`false`|Set to `true` to stop tags being displayed in the segment.|
|
||||
|`POWERLEVEL9K_VCS_GIT_HOOKS`|`(vcs-detect-changes git-untracked git-aheadbehind git-stash git-remotebranch git-tagname)`|Layout of the segment for git repositories.|
|
||||
|`POWERLEVEL9K_VCS_HG_HOOKS`|`(vcs-detect-changes)`|Layout of the segment for Mercurial repositories.|
|
||||
|`POWERLEVEL9K_VCS_SVN_HOOKS`|`(vcs-detect-changes svn-detect-changes)`|Layout of the segment for SVN repositories.|
|
||||
|
||||
|
||||
##### vcs symbols
|
||||
|
|
|
@ -507,7 +507,11 @@ prompt_public_ip() {
|
|||
if [[ -f $POWERLEVEL9K_PUBLIC_IP_FILE ]]; then
|
||||
typeset -i timediff
|
||||
# if saved IP is more than
|
||||
timediff=$(($(date +%s) - $(date -r $POWERLEVEL9K_PUBLIC_IP_FILE +%s)))
|
||||
if [[ "$OS" == "OSX" ]]; then
|
||||
timediff=$(($(date +%s) - $(stat -f "%m" $POWERLEVEL9K_PUBLIC_IP_FILE)))
|
||||
else
|
||||
timediff=$(($(date +%s) - $(date -r $POWERLEVEL9K_PUBLIC_IP_FILE +%s)))
|
||||
fi
|
||||
[[ $timediff -gt $POWERLEVEL9K_PUBLIC_IP_TIMEOUT ]] && refresh_ip=true
|
||||
# If tmp file is empty get a fresh IP
|
||||
[[ -z $(cat $POWERLEVEL9K_PUBLIC_IP_FILE) ]] && refresh_ip=true
|
||||
|
|
Loading…
Reference in a new issue