updated config
This commit is contained in:
@@ -70,7 +70,8 @@ Rectangle {
|
||||
cursorShape: root.pluginApi?.mainInstance?.updateCount > 0 ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
|
||||
onClicked: {
|
||||
root.pluginApi?.mainInstance?.startDoSystemUpdate();
|
||||
if (root.pluginApi?.mainInstance?.updateCount > 0)
|
||||
root.pluginApi?.mainInstance?.startDoSystemUpdate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -115,12 +115,35 @@ Item {
|
||||
// ------ Start update ------
|
||||
//
|
||||
function startDoSystemUpdate() {
|
||||
const cmd = root.customUpdater.cmdDoSystemUpdate || root.updater.cmdDoSystemUpdate || "echo 'No update cmd found.'"
|
||||
const updateCmd = root.customUpdater.cmdDoSystemUpdate || root.updater.cmdDoSystemUpdate || "echo 'No update cmd found.'"
|
||||
const ipcCmd = "qs -c noctalia-shell ipc call plugin:update-count check"
|
||||
const combinedCmd = updateCmd + " && " + ipcCmd
|
||||
|
||||
const term = root.updateTerminalCommand.trim();
|
||||
const fullCmd = (term.indexOf("{}") !== -1) ? term.replace("{}", combinedCmd) : term + " " + combinedCmd;
|
||||
|
||||
const fullCmd = (term.indexOf("{}") !== -1) ? term.replace("{}", cmd) : term + " " + cmd;
|
||||
doSystemUpdate.command = ["sh", "-c", fullCmd]
|
||||
doSystemUpdate.running = true;
|
||||
|
||||
Quickshell.execDetached(["sh", "-c", fullCmd]);
|
||||
Logger.i("UpdateCount", `Executed update command: ${fullCmd}`);
|
||||
}
|
||||
|
||||
Process {
|
||||
id: doSystemUpdate
|
||||
}
|
||||
|
||||
//
|
||||
// ------ IPC ------
|
||||
//
|
||||
IpcHandler {
|
||||
target: "plugin:update-count"
|
||||
|
||||
function check(): void {
|
||||
root.startGetNumUpdates()
|
||||
}
|
||||
|
||||
function run(): void {
|
||||
root.startDoSystemUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "update-count",
|
||||
"name": "Update Count",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"minNoctaliaVersion": "3.6.0",
|
||||
"author": "BukoMoon",
|
||||
"license": "GPLv3",
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"volumeStep": 5
|
||||
},
|
||||
"bar": {
|
||||
"backgroundOpacity": 0.93,
|
||||
"capsuleOpacity": 1,
|
||||
"density": "comfortable",
|
||||
"exclusive": true,
|
||||
@@ -37,7 +38,7 @@
|
||||
"position": "top",
|
||||
"showCapsule": true,
|
||||
"showOutline": false,
|
||||
"transparent": false,
|
||||
"useSeparateOpacity": false,
|
||||
"widgets": {
|
||||
"center": [
|
||||
{
|
||||
@@ -88,24 +89,34 @@
|
||||
"colorizeIcons": false,
|
||||
"enableScrollWheel": true,
|
||||
"followFocusedScreen": false,
|
||||
"groupedBorderOpacity": 1,
|
||||
"hideUnoccupied": true,
|
||||
"id": "Workspace",
|
||||
"labelMode": "name",
|
||||
"showApplications": false,
|
||||
"showLabelsOnlyWhenOccupied": true
|
||||
"showLabelsOnlyWhenOccupied": true,
|
||||
"unfocusedIconsOpacity": 1
|
||||
},
|
||||
{
|
||||
"customFont": "",
|
||||
"formatHorizontal": "HH:mm ddd, MMM dd",
|
||||
"formatVertical": "HH mm - dd MM",
|
||||
"id": "Clock",
|
||||
"tooltipFormat": "HH:mm ddd, MMM dd",
|
||||
"useCustomFont": false,
|
||||
"usePrimaryColor": false
|
||||
},
|
||||
{
|
||||
"defaultSettings": {
|
||||
"currentIconName": "world-download",
|
||||
"hideOnZero": false,
|
||||
"updateIntervalMinutes": 30,
|
||||
"updateTerminalCommand": "foot -e"
|
||||
},
|
||||
"id": "plugin:update-count"
|
||||
},
|
||||
{
|
||||
"compactMode": false,
|
||||
"diskPath": "/",
|
||||
"id": "SystemMonitor",
|
||||
"showCpuTemp": true,
|
||||
@@ -114,8 +125,9 @@
|
||||
"showGpuTemp": false,
|
||||
"showMemoryAsPercent": false,
|
||||
"showMemoryUsage": true,
|
||||
"showNetworkStats": false,
|
||||
"usePrimaryColor": false
|
||||
"showNetworkStats": true,
|
||||
"useMonospaceFont": true,
|
||||
"usePrimaryColor": true
|
||||
},
|
||||
{
|
||||
"colorizeIcons": true,
|
||||
@@ -132,6 +144,34 @@
|
||||
}
|
||||
],
|
||||
"right": [
|
||||
{
|
||||
"hideMode": "alwaysExpanded",
|
||||
"icon": "eye",
|
||||
"id": "CustomButton",
|
||||
"leftClickExec": "/home/aiden/toggle-transparency.sh",
|
||||
"leftClickUpdateText": true,
|
||||
"maxTextLength": {
|
||||
"horizontal": 10,
|
||||
"vertical": 10
|
||||
},
|
||||
"middleClickExec": "",
|
||||
"middleClickUpdateText": false,
|
||||
"parseJson": false,
|
||||
"rightClickExec": "",
|
||||
"rightClickUpdateText": false,
|
||||
"showIcon": true,
|
||||
"textCollapse": "",
|
||||
"textCommand": "",
|
||||
"textIntervalMs": 3000,
|
||||
"textStream": false,
|
||||
"wheelDownExec": "",
|
||||
"wheelDownUpdateText": false,
|
||||
"wheelExec": "",
|
||||
"wheelMode": "unified",
|
||||
"wheelUpExec": "",
|
||||
"wheelUpUpdateText": false,
|
||||
"wheelUpdateText": false
|
||||
},
|
||||
{
|
||||
"id": "ScreenRecorder"
|
||||
},
|
||||
@@ -152,11 +192,11 @@
|
||||
},
|
||||
{
|
||||
"deviceNativePath": "",
|
||||
"displayMode": "onhover",
|
||||
"displayMode": "alwaysShow",
|
||||
"hideIfNotDetected": true,
|
||||
"id": "Battery",
|
||||
"showNoctaliaPerformance": false,
|
||||
"showPowerProfiles": false,
|
||||
"showPowerProfiles": true,
|
||||
"warningThreshold": 30
|
||||
},
|
||||
{
|
||||
@@ -168,6 +208,10 @@
|
||||
"id": "Brightness"
|
||||
},
|
||||
{
|
||||
"defaultSettings": {
|
||||
"hideInactive": false,
|
||||
"removeMargins": false
|
||||
},
|
||||
"id": "plugin:privacy-indicator"
|
||||
},
|
||||
{
|
||||
@@ -277,7 +321,7 @@
|
||||
}
|
||||
},
|
||||
"desktopWidgets": {
|
||||
"enabled": false,
|
||||
"enabled": true,
|
||||
"gridSnap": true,
|
||||
"monitorWidgets": [
|
||||
{
|
||||
@@ -378,6 +422,11 @@
|
||||
"normalUrgencyDuration": 8,
|
||||
"overlayLayer": true,
|
||||
"respectExpireTimeout": false,
|
||||
"saveToHistory": {
|
||||
"critical": true,
|
||||
"low": true,
|
||||
"normal": true
|
||||
},
|
||||
"sounds": {
|
||||
"criticalSoundFile": "",
|
||||
"enabled": false,
|
||||
@@ -406,6 +455,7 @@
|
||||
"audioCodec": "opus",
|
||||
"audioSource": "default_output",
|
||||
"colorRange": "limited",
|
||||
"copyToClipboard": false,
|
||||
"directory": "/home/aiden/Videos",
|
||||
"frameRate": 60,
|
||||
"quality": "very_high",
|
||||
@@ -456,15 +506,17 @@
|
||||
"enabled": true
|
||||
}
|
||||
],
|
||||
"showHeader": true
|
||||
"showHeader": true,
|
||||
"showNumberLabels": true
|
||||
},
|
||||
"settingsVersion": 32,
|
||||
"settingsVersion": 35,
|
||||
"systemMonitor": {
|
||||
"cpuCriticalThreshold": 90,
|
||||
"cpuPollingInterval": 3000,
|
||||
"cpuWarningThreshold": 80,
|
||||
"criticalColor": "",
|
||||
"diskCriticalThreshold": 90,
|
||||
"diskPath": "/",
|
||||
"diskPollingInterval": 3000,
|
||||
"diskWarningThreshold": 80,
|
||||
"enableDgpuMonitoring": false,
|
||||
@@ -545,6 +597,7 @@
|
||||
"transitionEdgeSmoothness": 0.05,
|
||||
"transitionType": "random",
|
||||
"useWallhaven": false,
|
||||
"wallhavenApiKey": "",
|
||||
"wallhavenCategories": "111",
|
||||
"wallhavenOrder": "desc",
|
||||
"wallhavenPurity": "100",
|
||||
@@ -553,6 +606,7 @@
|
||||
"wallhavenResolutionHeight": "",
|
||||
"wallhavenResolutionMode": "atleast",
|
||||
"wallhavenResolutionWidth": "",
|
||||
"wallhavenSorting": "relevance"
|
||||
"wallhavenSorting": "relevance",
|
||||
"wallpaperChangeMode": "random"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user