diff --git a/defaultlook.cpp b/defaultlook.cpp
index a4284bf1..c9bc9e2a 100644
--- a/defaultlook.cpp
+++ b/defaultlook.cpp
@@ -1186,6 +1186,7 @@ void defaultlook::setuppanel()
void defaultlook::setupPlasma()
{
+ QString home_path = QDir::homePath();
//get panel ID
plasmaPanelId = runCmd(QStringLiteral("grep --max-count 1 -B 8 panel $HOME/.config/plasma-org.kde.plasma.desktop-appletsrc |grep Containment")).output;
QString panellocation = readPlasmaPanelConfig(QStringLiteral("location"));
@@ -1206,6 +1207,18 @@ void defaultlook::setupPlasma()
default: ui->comboPlasmaPanelLocation->setCurrentIndex(PanelIndex::Bottom);
}
+ //setup plasma-discover autostart
+ if (QFile("/usr/lib/x86_64-linux-gnu/libexec/DiscoverNotifier").exists()){
+ QString plasmadiscoverautostart = home_path + "/.config/autostart/org.kde.discover.notifier.desktop";
+ if (runCmd("grep Hidden=true " + plasmadiscoverautostart).exitCode == 0 ){
+ ui->checkBoxPlasmaDiscoverUpdater->setChecked(false);
+ } else {
+ ui->checkBoxPlasmaDiscoverUpdater->setChecked(true);
+ }
+ } else {
+ ui->checkBoxPlasmaDiscoverUpdater->hide();
+ }
+
//setup singleclick
QString singleclick = runCmd(QStringLiteral("kreadconfig5 --group KDE --key SingleClick")).output;
ui->checkBoxPlasmaSingleClick->setChecked(singleclick != QLatin1String("false"));
@@ -1228,6 +1241,7 @@ void defaultlook::setupPlasma()
plasmasingleclickflag = false;
plasmaresetflag = false;
plasmasystrayiconsizeflag = false;
+ plasmadisoverautostartflag = false;
}
QString defaultlook::readTaskmanagerConfig(const QString &key) const
@@ -3453,6 +3467,7 @@ void defaultlook::on_checkboxplasmaresetdock_clicked()
void defaultlook::on_ButtonApplyPlasma_clicked()
{
+ QString home_path = QDir::homePath();
if (plasmaresetflag) {
plasmaplacementflag = false;
plasmasingleclickflag = false;
@@ -3492,6 +3507,26 @@ void defaultlook::on_ButtonApplyPlasma_clicked()
writeTaskmanagerConfig(QStringLiteral("showOnlyCurrentDesktop"), value);
}
+ //plasma-discover autostart
+ if (plasmadisoverautostartflag){
+ QString plasmadiscoverautostart = home_path + "/.config/autostart/org.kde.discover.notifier.desktop";
+ qDebug() << "discover autostart path is " << plasmadiscoverautostart;
+ if (ui->checkBoxPlasmaDiscoverUpdater->isChecked()){
+ //delete any Hidden=true lines to make sure its processed by xdg autostart
+ runCmd("sed -i /Hidden=true/d " + plasmadiscoverautostart);
+ } else {
+ //copy if it doesn't exist already
+ if (!QFile(plasmadiscoverautostart).exists()){
+ if (QFile("/etc/xdg/autostart/org.kde.discover.notifier.desktop").exists()){
+ runCmd("cp /etc/xdg/autostart/org.kde.discover.notifier.desktop " + plasmadiscoverautostart);
+ }
+ }
+ //remove any previous Hidden= attribute, then add Hidden=true to make it not autostart
+ runCmd("sed -i /Hidden=*/d " + plasmadiscoverautostart);
+ runCmd("echo Hidden=true >> " + plasmadiscoverautostart); //this also creates file if the /etc/xdg version is missing
+ }
+ }
+
//time to reset kwin and plasmashell
if (plasmaworkspacesflag || plasmasingleclickflag || plasmaplacementflag || plasmaresetflag || plasmasystrayiconsizeflag) {
//restart kwin first
@@ -3500,6 +3535,7 @@ void defaultlook::on_ButtonApplyPlasma_clicked()
QString cmd =QStringLiteral("sleep 1; plasmashell --replace &");
system(cmd.toUtf8());
}
+
setupPlasma();
}
@@ -4161,3 +4197,10 @@ void defaultlook::on_spinBoxPointerSize_valueChanged(int arg1)
set_cursor_size();
}
+
+void defaultlook::on_checkBoxPlasmaDiscoverUpdater_clicked()
+{
+ plasmadisoverautostartflag = true;
+ ui->ButtonApplyPlasma->setEnabled(true);
+}
+
diff --git a/defaultlook.h b/defaultlook.h
index e52575c2..0770edc7 100644
--- a/defaultlook.h
+++ b/defaultlook.h
@@ -113,6 +113,7 @@ class defaultlook : public QDialog
bool isKDE = false;
bool liqKernelUpdateFlag = false;
bool debianKernelUpdateFlag = false;
+ bool plasmadisoverautostartflag = false;
@@ -312,6 +313,8 @@ private slots:
void on_spinBoxPointerSize_valueChanged(int arg1);
+ void on_checkBoxPlasmaDiscoverUpdater_clicked();
+
private:
Ui::defaultlook *ui;
};
diff --git a/defaultlook.ui b/defaultlook.ui
index bc1de778..2d9c696b 100644
--- a/defaultlook.ui
+++ b/defaultlook.ui
@@ -265,7 +265,7 @@
QTabWidget::North
- 1
+ 6
@@ -1728,6 +1728,46 @@
QLayout::SetNoConstraint
+ -
+
+
+ <html><head/><body><p><span style=" font-weight:600;">Reset Defaults</span></p></body></html>
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
+ Show windows from all workspaces in panel
+
+
+
-
@@ -1735,6 +1775,32 @@
+ -
+
+
+ Enable single-click
+
+
+
+ -
+
+
+ Reset KDE/Plasma defaults
+
+
+
+ -
+
+
+
+ true
+
+
+
+ Affects 1st panel
+
+
+
-
@@ -1762,19 +1828,19 @@
- -
-
+
-
+
true
- Affects 1st panel
+ Workspace
- -
+
-
@@ -1791,69 +1857,10 @@
- -
-
-
-
- true
-
-
-
- Workspace
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Show windows from all workspaces in panel
-
-
-
- -
-
-
- Enable single-click
-
-
-
- -
-
-
- <html><head/><body><p><span style=" font-weight:600;">Reset Defaults</span></p></body></html>
-
-
-
- -
-
+
-
+
- Reset KDE/Plasma defaults
+ Autostart plasma-discover system tray update notification utility
diff --git a/translations/mx-tweak_en.ts b/translations/mx-tweak_en.ts
index 44b7ea1e..6751308c 100644
--- a/translations/mx-tweak_en.ts
+++ b/translations/mx-tweak_en.ts
@@ -201,13 +201,13 @@
-
+
-
+
@@ -224,7 +224,7 @@
-
+
acts on the first poanel found in Xfce panel xml fle
@@ -266,13 +266,13 @@
-
+
-
+
@@ -296,9 +296,9 @@
-
-
-
+
+
+
apply changes
@@ -597,7 +597,7 @@
-
+
@@ -692,7 +692,7 @@
-
+
@@ -709,7 +709,7 @@
-
+
@@ -745,160 +745,166 @@
-
+
-
+
-
+
-
+
+
+ enable or disable autostartup of plasma-discover updater utility on login
+
+
+
+
referring to the meta or Left Super Key
-
+
description of button action to launch file dialog to choose an application
-
+
indicates that xfce-superkey will select a command by its default logic
-
+
-
+
label for the field to enter the command to use with super key
-
+
-
+
-
+
toggle for apt hold action on update meta packages
-
+
uses apt-mark to hold or unhold updates to kernel metapackages
-
+
toggle for apt hold action on update meta packages
-
+
uses apt-mark to hold or unhold updates to kernel metapackages
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -978,17 +984,17 @@
-
+
-
+
-
+
will show in file dialog when selection an application to run