forked from Shinonome/dots-hyprland
waffles: ctrl alt del menu
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
pragma Singleton
|
||||
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property bool packageManagerRunning: false
|
||||
property bool downloadRunning: false
|
||||
|
||||
function refresh() {
|
||||
packageManagerRunning = false;
|
||||
downloadRunning = false;
|
||||
detectPackageManagerProc.running = false;
|
||||
detectPackageManagerProc.running = true;
|
||||
detectDownloadProc.running = false;
|
||||
detectDownloadProc.running = true;
|
||||
}
|
||||
|
||||
Process {
|
||||
id: detectPackageManagerProc
|
||||
command: ["bash", "-c", "pidof pacman yay paru dnf zypper apt apx xbps snap apk yum epsi pikman"]
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
root.packageManagerRunning = (exitCode === 0);
|
||||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: detectDownloadProc
|
||||
command: ["bash", "-c", "pidof curl wget aria2c yt-dlp || ls ~/Downloads | grep -E '\.crdownload$|\.part$'"]
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
root.downloadRunning = (exitCode === 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ Singleton {
|
||||
id: root
|
||||
|
||||
property bool available: false
|
||||
property alias checking: checkUpdatesProc.running
|
||||
property int count: 0
|
||||
|
||||
readonly property bool updateAdvised: available && count > Config.options.updates.adviseUpdateThreshold
|
||||
|
||||
Reference in New Issue
Block a user