Skip to content

feat(location): add offline mode and sun times caching (#22) - #29

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/offline-mode-support-issue-22
Sep 2, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/offline-mode-support-issue-22

Conversation

@prostopasta

Copy link
Copy Markdown
Owner

Closes #22

Summary

  • Stores calculated sunrise/sunset times in ~/.cache/xfce-night-switch/sun_times upon successful NOAA calculation.
  • When offline or if network/python calculation fails, automatically falls back to cached sun times, then to config DAY_START/DAY_END.
  • Updates location preview in theme-settings.sh to read from cached times when offline.
  • Adds automated test suite tests/test-offline-mode.sh covering NOAA calculation output format, cache persistence, and offline fallback.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Test build ready -- PR #29

Install (Ubuntu/Debian/Mint):

wget -q 'https://github.com/prostopasta/xfce-night-switch/releases/download/pr-29-test-a2ffa2b/xfce-night-switch_1.6.0-pr.29.a2ffa2b_all.deb' -O /tmp/xns-test.deb \
  && sudo dpkg -i /tmp/xns-test.deb \
  && xfce-night-switch-setup

Checklist

  • Panel icon visible after setup
  • Click panel icon -- theme switches, icon updates
  • No errors in journalctl --user -u xfce-night-switch-startup.service

After verifying all items, confirm by commenting /test-passed -- PR will auto-merge.

@prostopasta

Copy link
Copy Markdown
Owner Author

/test-passed

@github-actions
github-actions Bot merged commit 901b34e into main Sep 2, 2026
3 checks passed
@github-actions
github-actions Bot deleted the feat/offline-mode-support-issue-22 branch September 2, 2026 03:59
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.

feat: offline mode support

1 participant