Skip to content

Conversation

@luftaquila
Copy link
Contributor

@luftaquila luftaquila commented Dec 17, 2025

I've found out that the documentation for the network-public-ip plugin was missing.

This PR adds the docs of it, and add a missing space between the label and the IP value of it's output.

Thank you!

@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2025

📝 Walkthrough

Walkthrough

This pull request adds documentation for a new network-public-ip option and updates the network-public-ip script to default the label to "IP" and emit the label and ip separated by a space.

Changes

Cohort / File(s) Summary
Documentation updates
docs/CONFIG.md
Added network-public-ip entry under the network group and updated the table of contents; included description and a Nerdfont label example.
Script label retrieval
scripts/network-public-ip.sh
Changed label retrieval to read a tmux option into a variable with default "IP" (instead of empty) and output the label and IP separated by a space.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Check scripts/network-public-ip.sh for correct default handling and output formatting (consumer expectations of "label ip" vs previous format).
  • Verify docs/CONFIG.md TOC link and example match the implemented output.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of the PR: adding documentation for the network-public-ip plugin, which aligns with the primary changes in docs/CONFIG.md.
Description check ✅ Passed The description is directly related to the changeset, explaining both the documentation addition and the bug fix for the label-IP spacing in the plugin's output.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f46e71 and 412cd20.

📒 Files selected for processing (1)
  • docs/CONFIG.md (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/CONFIG.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
docs/CONFIG.md (1)

649-658: Documentation looks good; consider adding trailing space for style consistency.

The documentation is clear and follows the established plugin pattern. The functionality is correct as-is.

For consistency with other plugin examples in this file (e.g., battery-label at line 205, network-offline-label at line 633), consider adding a trailing space in the example:

-set -g @dracula-network-public-ip-label "󰖟"
+set -g @dracula-network-public-ip-label "󰖟 "

Both approaches work since the script adds a space programmatically; this is purely for documentation style consistency.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b762b3 and 7f46e71.

📒 Files selected for processing (2)
  • docs/CONFIG.md (2 hunks)
  • scripts/network-public-ip.sh (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
scripts/network-public-ip.sh (1)
scripts/utils.sh (1)
  • get_tmux_option (3-12)
🔇 Additional comments (2)
docs/CONFIG.md (1)

28-28: LGTM!

The TOC entry is correctly positioned alphabetically and follows the established format.

scripts/network-public-ip.sh (1)

22-23: LGTM!

The implementation correctly:

  • Reads the label option using get_tmux_option with a sensible default of "IP"
  • Adds the missing space between the label and IP value in the output
  • Follows the established pattern used by other plugins in this repository

@luftaquila luftaquila changed the title Add documentation for network-public-info plugin Add documentation for network-public-ip plugin Dec 17, 2025
@luftaquila luftaquila force-pushed the doc/network-public-ip branch from 7f46e71 to 412cd20 Compare December 17, 2025 02:25
@Theoreticallyhugo
Copy link
Collaborator

Thank you very much for your contribution!
I will gladly merge the docs, but the lack of a space is actually intentional, as it is supposed to be up to the users config how much white space there is.


### network-public-ip - [up](#table-of-contents)

This widget displays the public IP address you're using.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest adding info on how the public ip is aquired, as this is an external request to a third party service.

Suggested change
This widget displays the public IP address you're using.
This widget displays the public IP address you're using, by querying the public service `ifconfig.me`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants