<table><tr><td style="">broulik created this revision.<br />broulik added reviewers: Plasma, VDG.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />broulik requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29770">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.<br />
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).</p>

<p>The overall warning logic remains pretty much the same:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">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.</li>
<li class="remarkup-list-item">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</li>
<li class="remarkup-list-item">The notification is also emitted again if free space remains below the threshold for more than one hour</li>
</ul>

<p>(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 ;)</p>

<p>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.</p>

<p>BUG: 340582<br />
FIXED-IN: 5.20.0</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>For testing set my threshold to a million MiB:<br />
<a href="https://phabricator.kde.org/F8322073" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F8322073: Screenshot_20200515_093208.png</a><br />
(when Filelight is installed, it will instead say "Open in Filelight")</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Verified that it checks every minute like before</li>
<li class="remarkup-list-item">Verified that it re-emits when free space drops below half of previous check</li>
<li class="remarkup-list-item">Verified that notification text is always updated to reflect the free space ever time we check for it if the notification is still open</li>
<li class="remarkup-list-item">Verified that it only monitors root if it's on a separate partition from Home</li>
<li class="remarkup-list-item">Verified that it re-emits the notification after an hour when disk space is still low</li>
<li class="remarkup-list-item">Verified that opening filelight and dolphin work</li>
<li class="remarkup-list-item">Verified that opening config dialog works and unchecking "warn on..." will unload the kded module</li>
<li class="remarkup-list-item">Verified that manually reloading the kded module enables the setting again</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29770">https://phabricator.kde.org/D29770</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>freespacenotifier/CMakeLists.txt<br />
freespacenotifier/freespacenotifier.cpp<br />
freespacenotifier/freespacenotifier.h<br />
freespacenotifier/freespacenotifier.notifyrc<br />
freespacenotifier/module.cpp<br />
freespacenotifier/module.h</div></div></div><br /><div><strong>To: </strong>broulik, Plasma, VDG<br /><strong>Cc: </strong>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<br /></div>