1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-15 18:22:08 -04:00

Not everyone uses paru or yay on Arch: Support pacman command (#1900)

* Not everyone uses paru or yay on Arch: Support pacman command
* Handle sudo properly when using pacman
* Move pacman to bottom per Purian23
* Remote duplicate which -- thanks Purian23!
This commit is contained in:
Michael Erdely
2026-03-03 22:27:31 +00:00
committed by GitHub
parent 246b6c44b0
commit e04c919d78

View File

@@ -44,14 +44,15 @@ Singleton {
}
}
readonly property var archBasedPMSettings: {
readonly property var archBasedPMSettings: function(requiresSudo) {
return {
"listUpdatesSettings": {
"params": ["-Qu"],
"correctExitCodes": [0, 1] // Exit code 0 = updates available, 1 = no updates
},
"upgradeSettings": {
"params": ["-Syu"],
"requiresSudo": false
"requiresSudo": requiresSudo
},
"parserSettings": {
"lineRegex": /^(\S+)\s+([^\s]+)\s+->\s+([^\s]+)$/,
@@ -65,6 +66,7 @@ Singleton {
}
}
}
}
readonly property var fedoraBasedPMSettings: {
"listUpdatesSettings": {
@@ -92,8 +94,9 @@ Singleton {
"checkupdates": archBasedUCSettings
}
readonly property var packageManagerParams: {
"yay": archBasedPMSettings,
"paru": archBasedPMSettings,
"yay": archBasedPMSettings(false),
"paru": archBasedPMSettings(false),
"pacman": archBasedPMSettings(true),
"dnf": fedoraBasedPMSettings
}
readonly property list<string> supportedDistributions: ["arch", "artix", "cachyos", "manjaro", "endeavouros", "fedora"]
@@ -182,7 +185,7 @@ Singleton {
Process {
id: pkgManagerDetection
command: ["sh", "-c", "which paru || which yay || which dnf"]
command: ["sh", "-c", "which paru || which yay || which pacman || which dnf"]
onExited: exitCode => {
if (exitCode === 0) {