Skip to content

feat!: replace indicator-sysmonitor with a self-owned tray indicator and IP changelog - #7

Merged
icamys merged 10 commits into
mainfrom
feature/ip-history-indicator
Jul 31, 2026
Merged

icamys merged 10 commits into
mainfrom
feature/ip-history-indicator

Conversation

@icamys

@icamys icamys commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces the third-party indicator-sysmonitor dependency with locindicator.py, a self-owned AppIndicator3/AyatanaAppIndicator3 tray process. install.sh no longer clones/builds anything from source; configure_indicator.py is removed.
  • Adds an "IP changelog" dropdown (via iphistory.py) showing recent IP changes as <address>, <country>, <time ago> [(current)], capped at the last 100 entries on disk / last 10 shown in the menu.
  • bootstrap.sh/uninstall.sh updated for the new process and autostart entry; harmless cleanup of the old indicator-sysmonitor artifacts is kept for anyone upgrading.

BREAKING CHANGE: indicator-sysmonitor is no longer installed or driven by this project. Anyone with an existing install should re-run uninstall.sh (from the previous version) before installing this one, so the old autostart entry, binary, and settings file are cleaned up.

Test plan

  • pylint $(git ls-files '*.py') — 10.00/10
  • Verified live via D-Bus (busctl StatusNotifierItem/dbusmenu inspection): tray icon registers, label/icon update every 15s, dropdown renders the changelog with correct formatting
  • Confirmed history persists across indicator restarts and old two/three-column log lines both parse correctly

icamys added 10 commits July 31, 2026 15:24
GNOME Shell's AppIndicator extension only refreshes the panel label on a
custom D-Bus signal it doesn't always receive, so the flag icon can show
with no IP/country text next to it even though the label is set correctly.
… IP history

indicator-sysmonitor's dropdown menu is hardcoded with no plugin hook to add
items, so there was no way to surface IP-change history from its tray icon.
locindicator.py now owns the AppIndicator3 tray icon directly, still driven
by get-location.sh, and adds an "IP History" menu entry backed by
iphistory.py, which logs each noticed IP change (capped at the last 100)
to ~/.local/share/locindicator/ip-history.log.
The tray panel label sometimes fails to render next to the icon (see
README's known-issues section on the GNOME Shell appindicator extension
bug), leaving no visible IP. Mirror the same status text into a disabled
menu entry at the top of the dropdown, updated every tick, so the current
IP/country is always visible on click regardless of that rendering bug.
…ndow

A separate window was an extra click and pulled focus away from the tray;
showing the last entries directly in the dropdown, right under the current
IP, keeps everything visible in one click. Rows are inserted/removed in
place ahead of a marker separator so an open dropdown doesn't need the
whole menu rebuilt.
…rmat

Each history row now reads "<country>, IP:<address>   <timestamp>" instead
of bare timestamp/IP, matching the status line's format and putting the
IP first the way the current-IP entry already reads. A disabled "IP
changelog" header now separates it from the current-IP line above.
Requires iphistory to record country_code alongside each entry; older
two-column log lines (no country_code) still parse fine and fall back to
a bare "IP:<address>" label.
A separate disabled status line duplicated the top changelog row now that
entries carry country + IP in the same format. Drop it and mark the
newest changelog entry "(current)" instead, so the current IP is still
visible from the dropdown without a redundant line above the changelog.
Pango markup (bold) on menu item labels doesn't survive the dbusmenu/
AppIndicator3 export to the desktop shell -- confirmed by inspecting the
exported D-Bus property directly, it comes back as plain rendered text
with no markup tags. Use a leading "->" marker on the current entry
instead, which is a real visual distinction plain text can carry. Also
drop the ISO8601 "T" separator and put time before date, per feedback.
An absolute date/time required mental math to see how stale an entry
was. Show "5m ago"/"3h ago"/"2d ago" instead, computed from the stored
ISO8601 timestamp. Since this needs to keep counting up, the changelog
now rebuilds every tick rather than only when the IP changes.
Switches from "<country>, IP:<address>   <time ago>" to a plain
comma-separated "<address>, <country>, <time ago> [(current)]", per
feedback. Country is omitted when unavailable.
The "(current)" suffix already marks it; the arrow was redundant.
@icamys
icamys merged commit 77028a8 into main Jul 31, 2026
2 checks passed
@icamys
icamys deleted the feature/ip-history-indicator branch July 31, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant