D29770: [Free Space Notifer] Use critical notification instead of tray icon and monitor Root, too

Kai Uwe Broulik noreply at phabricator.kde.org
Fri May 15 09:13:33 BST 2020


broulik created this revision.
broulik added reviewers: Plasma, VDG.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
broulik requested review of this revision.

REVISION SUMMARY
  This refactors the free space notifier module to use a critical (i.e. persistent and always on top) notification for warning of low disk space. The, albeit blinking, tray icon is easy to miss, especially when you're running a full screen terminal, which I typically do while compiling stuff.
  It now also monitors the Root folder, if it's on a separate partition from the user's home. Furthermore, Filelight is offered to explore the drive (if installed).
  
  The overall warning logic remains pretty much the same:
  
  - Once the drive goes below the configured threshold a warning notification is shown, it stays on screen until dismissed by the user or when free space is above warning threshold again.
  - The notification is emitted again when free space drops below half the previous threshold, for added sense of urgency should the drive be rapidly filled up
  - The notification is also emitted again if free space remains below the threshold for more than one hour
  
  (It will only emit again when it was closed, obviously, so you won't end up with a tonne of popups after a few hours ;)
  
  I don't think this needs to be separately configurable for Home and Root, since the default threshold is like 200 MiB (it's not a configured percentage), so the absolute free space it warns about will be the same, even if your Home is giant compared to Root.
  
  BUG: 340582
  FIXED-IN: 5.20.0

TEST PLAN
  For testing set my threshold to a million MiB:
  F8322073: Screenshot_20200515_093208.png <https://phabricator.kde.org/F8322073>
  (when Filelight is installed, it will instead say "Open in Filelight")
  
  - Verified that it checks every minute like before
  - Verified that it re-emits when free space drops below half of previous check
  - Verified that notification text is always updated to reflect the free space ever time we check for it if the notification is still open
  - Verified that it only monitors root if it's on a separate partition from Home
  - Verified that it re-emits the notification after an hour when disk space is still low
  - Verified that opening filelight and dolphin work
  - Verified that opening config dialog works and unchecking "warn on..." will unload the kded module
  - Verified that manually reloading the kded module enables the setting again

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D29770

AFFECTED FILES
  freespacenotifier/CMakeLists.txt
  freespacenotifier/freespacenotifier.cpp
  freespacenotifier/freespacenotifier.h
  freespacenotifier/freespacenotifier.notifyrc
  freespacenotifier/module.cpp
  freespacenotifier/module.h

To: broulik, #plasma, #vdg
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200515/aa8db3f9/attachment.htm>


More information about the Plasma-devel mailing list