Skip to content

Add a power action for when a transfer finishes (v0.2.3) - #22

Merged
FrancescoCoding merged 4 commits into
mainfrom
feature/shutdown-on-finish
Nov 28, 2026
Merged

FrancescoCoding merged 4 commits into
mainfrom
feature/shutdown-on-finish

Conversation

@FrancescoCoding

@FrancescoCoding FrancescoCoding commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Adds an experimental "When transfer finishes..." entry to the process right-click menu: shut down, sleep or hibernate the PC once that process's download, upload or both have gone quiet. Also bumps the version to 0.2.3.

How it works

  • You pick what to watch: download, upload, or both. Both waits until the two directions are quiet together.
  • The watch only arms after the rate has stayed above a threshold (default 100 KB/s) for 10 seconds in a row, so an idle process or a stray burst cannot trigger it.
  • The action runs once the rate has then stayed below the threshold for a set time (default 5 minutes). A process that exits counts as quiet, and traffic picking up again resets the wait.
  • A bar under the menu shows the state of the watch and the time left, with Edit and Cancel buttons. The window comes back from the tray for the last minute so Cancel is within reach.
  • A running watch can be edited from the bar or the right-click menu. It keeps its progress unless the watched direction changes.
  • The watch is never saved, so it cannot fire on a later run. Only one runs at a time.
  • Shutdown has an optional "Force apps to close", off by default.

Known limits

  • A connection outage longer than the quiet time still looks like a finished transfer. This is why the dialog carries an Experimental tag.
  • A client that keeps seeding never goes quiet on upload, so a watch on its upload never fires.
  • The state machine is covered by unit tests in src/finish_watch.rs.

Also adds a little horizontal padding to the entries of the process right-click menu, and stops dropdown rows shifting by a pixel on hover.

Closes #21

Right-click a process and pick "When download finishes..." to shut
down, sleep or hibernate the PC once its download has gone quiet.

The watch only arms after the process has downloaded above a threshold
for 10 seconds in a row, so an idle process or a stray burst cannot
trigger it. The download counts as finished when the rate then stays
below the threshold for a set time. A 60 second countdown with a
Cancel button runs before the action, and traffic picking up again
cancels it too. The watch is never saved, so it cannot fire on a
later run.

Marked experimental: a connection outage longer than the quiet time
still looks like a finished download.

Closes #21
The dialog gains a Watch choice: download, upload, or both. Both waits
until the two directions are quiet together, which suits sync and
backup clients. The menu entry is now "When transfer finishes...".

The banner shows the time left until the countdown starts while the
transfer is quiet, in place of the elapsed time.

Refs #21
@FrancescoCoding FrancescoCoding changed the title Add a power action for when a download finishes (v0.2.3) Add a power action for when a transfer finishes (v0.2.3) Nov 28, 2026
The quiet time is now the whole wait: the action runs when it is up,
with no countdown added on top and no separate countdown window. The
banner counts the time down, and the app window still comes back for
the last minute so Cancel is within reach.

A running watch can be edited from the banner or the right-click
menu. Changing it keeps its progress unless the watched direction
changes.

Dropdown rows no longer shift by a pixel when hovered.

Refs #21
@FrancescoCoding
FrancescoCoding merged commit 346492f into main Nov 28, 2026
4 checks passed
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.

[Feature Request] Shutdown on finish

1 participant