File DeviceNotifier_Config.patch of Package liquidshell

diff -Nur liquidshell-1.6/DeviceNotifier.cxx liquidshell-1.6-new/DeviceNotifier.cxx
--- liquidshell-1.6/DeviceNotifier.cxx	2020-02-23 22:41:58.000000000 +0100
+++ liquidshell-1.6-new/DeviceNotifier.cxx	2020-04-06 13:23:30.968288205 +0200
@@ -26,12 +26,27 @@
 #include <QDebug>
 
 #include <KLocalizedString>
+#include <KConfig>
+#include <KConfigGroup>
 
 //--------------------------------------------------------------------------------
 
 DeviceNotifier::DeviceNotifier(QWidget *parent)
   : SysTrayItem(parent, "device-notifier")
 {
+  KConfig config;
+  KConfigGroup group = config.group("DeviceNotifier");
+  if ( !group.hasKey("enabled") )  // create config entry so that one knows it exists
+    group.writeEntry("enabled", true);
+
+  bool isEnabled = group.readEntry("enabled", true);
+
+  if ( !isEnabled )
+  {
+    hide();
+    return;
+  }
+
   setToolTip(i18n("Device Notifier"));
 
   deviceList = new DeviceList(this);
openSUSE Build Service is sponsored by