Compare commits
No commits in common. "84b51d2a7a7feb6c3e76c6234308c42bc4cd705d" and "c4bfc730bad85449f3a7ca22a993d4245883373b" have entirely different histories.
84b51d2a7a
...
c4bfc730ba
15
Makefile
15
Makefile
@ -1,16 +1,11 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
all: build install
|
all: install
|
||||||
|
|
||||||
build:
|
|
||||||
make -C src/usr/share/xsessions/po/
|
make -C src/usr/share/xsessions/po/
|
||||||
rm -rf src/usr/share/xsessions/po/ src/usr/share/xsessions/*.in
|
rm -rf src/usr/share/xsessions/po/ src/usr/share/xsessions/*.in
|
||||||
cd snap-installation-monitor && cmake -DCMAKE_BUILD_TYPE=Release . && make
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
mkdir -pv $(DESTDIR)/lubuntu-snap-installation-monitor/usr/libexec
|
mkdir -pv $(DESTDIR)
|
||||||
mkdir -pv $(DESTDIR)/lubuntu-snap-installation-monitor/etc/xdg/autostart
|
cp -a src/etc src/usr $(DESTDIR)/.
|
||||||
mkdir -pv $(DESTDIR)/lubuntu-default-settings/
|
|
||||||
cp -a src/etc src/usr $(DESTDIR)/lubuntu-default-settings/.
|
# vim:ts=4
|
||||||
cp -a snap-installation-monitor/snap-installation-monitor $(DESTDIR)/lubuntu-snap-installation-monitor/usr/libexec/.
|
|
||||||
cp -a snap-installation-monitor/snap-installation-monitor.desktop $(DESTDIR)/lubuntu-snap-installation-monitor/etc/xdg/autostart/.
|
|
||||||
|
15
debian/changelog
vendored
15
debian/changelog
vendored
@ -1,18 +1,3 @@
|
|||||||
lubuntu-default-settings (24.04.9) noble; urgency=medium
|
|
||||||
|
|
||||||
* Create lubuntu-snap-installation-monitor, which tells the user if snaps
|
|
||||||
are still being pre-seeded in the background. Mostly used in the case of
|
|
||||||
preseeding a lot of snaps, or preseeding snaps on a slower machine
|
|
||||||
(LP: #2045580, LP: #2061318).
|
|
||||||
|
|
||||||
-- Simon Quigley <tsimonq2@ubuntu.com> Sun, 14 Apr 2024 15:49:12 -0500
|
|
||||||
|
|
||||||
lubuntu-default-settings (24.04.8) noble; urgency=medium
|
|
||||||
|
|
||||||
* Don't decorate firmware-updater, it comes with its own (LP: #2061307).
|
|
||||||
|
|
||||||
-- Simon Quigley <tsimonq2@ubuntu.com> Sun, 14 Apr 2024 12:44:19 -0500
|
|
||||||
|
|
||||||
lubuntu-default-settings (24.04.7) noble; urgency=medium
|
lubuntu-default-settings (24.04.7) noble; urgency=medium
|
||||||
|
|
||||||
* Removing outdated Openbox configs. (LP: #2059845)
|
* Removing outdated Openbox configs. (LP: #2059845)
|
||||||
|
9
debian/control
vendored
9
debian/control
vendored
@ -3,7 +3,7 @@ Section: x11
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
||||||
Uploaders: Simon Quigley <tsimonq2@ubuntu.com>
|
Uploaders: Simon Quigley <tsimonq2@ubuntu.com>
|
||||||
Build-Depends: cmake, debhelper-compat (= 13), intltool, qtbase5-dev
|
Build-Depends: debhelper-compat (= 13), intltool
|
||||||
Standards-Version: 4.6.2
|
Standards-Version: 4.6.2
|
||||||
Homepage: https://lubuntu.me
|
Homepage: https://lubuntu.me
|
||||||
Vcs-Browser: https://git.launchpad.net/lubuntu-default-settings?h=master
|
Vcs-Browser: https://git.launchpad.net/lubuntu-default-settings?h=master
|
||||||
@ -22,10 +22,3 @@ Depends: fonts-ubuntu,
|
|||||||
Recommends: breeze-gtk-theme
|
Recommends: breeze-gtk-theme
|
||||||
Description: default settings for Lubuntu
|
Description: default settings for Lubuntu
|
||||||
Various system settings tailored for Lubuntu.
|
Various system settings tailored for Lubuntu.
|
||||||
|
|
||||||
Package: lubuntu-snap-installation-monitor
|
|
||||||
Architecture: amd64
|
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
|
||||||
Description: Simple notifier for snap installation
|
|
||||||
Let the user know if snaps are still being installed in the background when
|
|
||||||
booting up their desktop environment.
|
|
||||||
|
19
debian/copyright
vendored
19
debian/copyright
vendored
@ -21,22 +21,3 @@ License: GPL-2+
|
|||||||
.
|
.
|
||||||
On Debian systems, the complete text of the GNU General
|
On Debian systems, the complete text of the GNU General
|
||||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||||
|
|
||||||
Files: snap-installation-monitor/*
|
|
||||||
Copyright: Copyright 2024 Simon Quigley <tsimonq2@ubuntu.com>
|
|
||||||
License: GPL-3+
|
|
||||||
This package is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
.
|
|
||||||
This package is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
.
|
|
||||||
On Debian systems, the complete text of the GNU General
|
|
||||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
|
||||||
|
3
debian/lubuntu-default-settings.install
vendored
3
debian/lubuntu-default-settings.install
vendored
@ -1,3 +0,0 @@
|
|||||||
lubuntu-default-settings/etc/xdg etc/
|
|
||||||
lubuntu-default-settings/usr/lib usr/
|
|
||||||
lubuntu-default-settings/usr/share usr/
|
|
@ -1,2 +0,0 @@
|
|||||||
lubuntu-snap-installation-monitor/etc/xdg/autostart/snap-installation-monitor.desktop etc/xdg/autostart/
|
|
||||||
lubuntu-snap-installation-monitor/usr/libexec/snap-installation-monitor usr/libexec/
|
|
@ -1,9 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.5.0)
|
|
||||||
project(snap-installation-monitor)
|
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
find_package(Qt5 COMPONENTS Widgets DBus REQUIRED)
|
|
||||||
|
|
||||||
add_executable(snap-installation-monitor main.cpp)
|
|
||||||
target_link_libraries(snap-installation-monitor Qt5::Widgets Qt5::DBus)
|
|
@ -1,84 +0,0 @@
|
|||||||
// Copyright (C) 2024 Simon Quigley <tsimonq2@ubuntu.com>
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU General Public License
|
|
||||||
// as published by the Free Software Foundation; either version 3
|
|
||||||
// of the License, or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QSystemTrayIcon>
|
|
||||||
#include <QtDBus/QtDBus>
|
|
||||||
#include <QTimer>
|
|
||||||
#include <QMessageBox>
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
QApplication app(argc, argv);
|
|
||||||
|
|
||||||
// Create and set application icon
|
|
||||||
QIcon appIcon = QIcon::fromTheme("dialog-information");
|
|
||||||
QApplication::setWindowIcon(appIcon);
|
|
||||||
|
|
||||||
// DBus interface to systemd
|
|
||||||
QDBusInterface systemd("org.freedesktop.systemd1",
|
|
||||||
"/org/freedesktop/systemd1",
|
|
||||||
"org.freedesktop.systemd1.Manager",
|
|
||||||
QDBusConnection::systemBus());
|
|
||||||
|
|
||||||
// Retrieve current status of snapd.seeded.service, which tracks the preseed process
|
|
||||||
QDBusMessage methodCall = systemd.call("GetUnit", "snapd.seeded.service");
|
|
||||||
QDBusObjectPath unitPath = methodCall.arguments().at(0).value<QDBusObjectPath>();
|
|
||||||
QDBusInterface unit("org.freedesktop.systemd1",
|
|
||||||
unitPath.path(),
|
|
||||||
"org.freedesktop.systemd1.Unit",
|
|
||||||
QDBusConnection::systemBus());
|
|
||||||
QVariant activeState = unit.property("ActiveState");
|
|
||||||
QVariant subState = unit.property("SubState");
|
|
||||||
|
|
||||||
// System tray icon setup
|
|
||||||
QSystemTrayIcon trayIcon(appIcon);
|
|
||||||
trayIcon.setToolTip("Snap Installation Monitor");
|
|
||||||
|
|
||||||
// Initial message displayed in the system tray
|
|
||||||
auto showMessage = [&trayIcon]() {
|
|
||||||
trayIcon.showMessage("Installation Notice", "Finalizing installation of snaps, please wait...",
|
|
||||||
QSystemTrayIcon::Information, 15000);
|
|
||||||
};
|
|
||||||
|
|
||||||
// If the user clicks the system tray icon, display the notification again
|
|
||||||
QObject::connect(&trayIcon, &QSystemTrayIcon::activated, [&](QSystemTrayIcon::ActivationReason reason) {
|
|
||||||
if (reason == QSystemTrayIcon::Trigger) {
|
|
||||||
showMessage();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Exit immediately if the service is "active (exited)", launch the GUI parts otherwise
|
|
||||||
if (activeState.toString() == "active" && subState.toString() == "exited") { return 0; }
|
|
||||||
trayIcon.show();
|
|
||||||
showMessage();
|
|
||||||
|
|
||||||
QTimer timer;
|
|
||||||
QObject::connect(&timer, &QTimer::timeout, [&unit, &trayIcon]() {
|
|
||||||
QVariant newState = unit.property("ActiveState");
|
|
||||||
QVariant newSubState = unit.property("SubState");
|
|
||||||
if (newState.toString() == "active" && newSubState.toString() == "exited") {
|
|
||||||
trayIcon.hide();
|
|
||||||
QMessageBox messageBox;
|
|
||||||
messageBox.setIcon(QMessageBox::Information);
|
|
||||||
messageBox.setText("Background snap installation is complete.");
|
|
||||||
messageBox.setWindowTitle("Installation Complete");
|
|
||||||
messageBox.setStandardButtons(QMessageBox::Ok);
|
|
||||||
messageBox.exec();
|
|
||||||
|
|
||||||
QApplication::quit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
timer.start(5000); // Check every 5 seconds
|
|
||||||
|
|
||||||
return app.exec();
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=Snap Installation Monitor
|
|
||||||
Exec=/usr/libexec/snap-installation-monitor
|
|
||||||
Icon=dialog-information
|
|
||||||
Comment=Monitor snapd seeding at startup
|
|
||||||
X-LXQt-Need-Tray=true
|
|
||||||
NoDisplay=true
|
|
@ -739,10 +739,6 @@
|
|||||||
Focus all applications launched
|
Focus all applications launched
|
||||||
Usefull when launching applications, like terminal from pcmanfm
|
Usefull when launching applications, like terminal from pcmanfm
|
||||||
-->
|
-->
|
||||||
<application name="firmware-updater">
|
|
||||||
<decor>no</decor>
|
|
||||||
</application>
|
|
||||||
|
|
||||||
<application class="*">
|
<application class="*">
|
||||||
<focus>yes</focus>
|
<focus>yes</focus>
|
||||||
</application>
|
</application>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user