Repository navigation
Conversation
The hint said "A Timeshift system snapshot is being created." for any process named timeshift, also while a snapshot was being deleted (linuxmint#140), and it gave no idea of how far a snapshot had got. Timeshift writes the kind of run that holds its lock to /var/run/lock/timeshift/lock (backup, ondemand, delete, restore, or nothing for the window). The hint now follows that file and says whether a snapshot is being created, deleted or restored. Timeshift versions that also publish their progress in /var/run/lock/timeshift/status get the percentage next to the icon and the time remaining in the tooltip; the numbers are Timeshift's own. Quick listings no longer show the icon. Fixes linuxmint#140.
1 of 3 tasks
The hourly timeshift --check holds the lock for a few seconds even when nothing is due. Show a scheduled check only once it publishes a task, or once it has held the lock for more than 10 seconds (Timeshift versions without the status file), and keep it shown between its steps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #140.
The hint showed "A Timeshift system snapshot is being created." for any process called
timeshift, also while I was deleting a snapshot.
Timeshift already writes the kind of run that holds its lock to
/var/run/lock/timeshift/lock(
backupfor the hourly check,ondemand,delete,restore, nothing for the window), and hasfor years. The hint now reads that, so it says whether a snapshot is being created, deleted or
restored, and quick
--listcalls don't flash the icon anymore. That part works with theTimeshift in Mint today.
The hourly
timeshift --checkdoesn't flash it either. When nothing is due it holds the lock forone to three seconds (going by my Timeshift logs), so a scheduled check now only shows once it
publishes a task or has held the lock for more than 10 seconds. The 10 seconds are for Timeshift
versions that don't publish a status yet. Once it shows, it stays until the check is done, also in
the short pauses between steps when Timeshift publishes nothing.
If Timeshift also publishes its progress (linuxmint/timeshift#595), the percentage goes next to
the icon and the time remaining into the tooltip. Those are Timeshift's own numbers, the tray
doesn't estimate anything.
About my question in #140: with this the hint also shows while the window itself creates or
deletes a snapshot, because the window publishes the same status. If you'd rather keep it for
background runs only, it's one condition in
is_running().I tried it on my panel during a real snapshot made with the Timeshift branch from
linuxmint/timeshift#595: the icon showed the percentage next to it (10 % at 00:37, 65 % at
00:42). During a delete with the Timeshift from the Mint repositories it showed only the icon, as
before. I checked the tooltip texts for each kind of run, and the rule for the hourly check, with
fake lock and status files.