mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
System: replaced whereis by command -v
This commit is contained in:
@@ -75,7 +75,7 @@ ColumnLayout {
|
||||
|
||||
Process {
|
||||
id: whichPacmanProcess
|
||||
command: ["whereis", "pacman"]
|
||||
command: ["sh", "-c", "command -v pacman"]
|
||||
running: false
|
||||
onExited: function (exitCode) {
|
||||
if (exitCode === 0) {
|
||||
|
||||
@@ -114,7 +114,7 @@ ColumnLayout {
|
||||
// Simple process to check if matugen exists
|
||||
Process {
|
||||
id: matugenCheck
|
||||
command: ["whereis", "matugen"]
|
||||
command: ["sh", "-c", "command -v matugen"]
|
||||
running: false
|
||||
|
||||
onExited: function (exitCode) {
|
||||
|
||||
@@ -34,7 +34,7 @@ ColumnLayout {
|
||||
// Check for wlsunset availability when enabling Night Light
|
||||
Process {
|
||||
id: wlsunsetCheck
|
||||
command: ["whereis", "wlsunset"]
|
||||
command: ["sh", "-c", "command -v wlsunset"]
|
||||
running: false
|
||||
|
||||
onExited: function (exitCode) {
|
||||
|
||||
@@ -50,7 +50,7 @@ Singleton {
|
||||
function checkCliphistAvailability() {
|
||||
if (dependencyChecked)
|
||||
return;
|
||||
dependencyCheckProcess.command = ["whereis", "cliphist"];
|
||||
dependencyCheckProcess.command = ["sh", "-c", "command -v cliphist"];
|
||||
dependencyCheckProcess.running = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Singleton {
|
||||
if (strategy === "auto") {
|
||||
// Check if systemd-inhibit is available
|
||||
try {
|
||||
var systemdResult = Quickshell.execDetached(["whereis", "systemd-inhibit"]);
|
||||
var systemdResult = Quickshell.execDetached(["sh", "-c", "command -v systemd-inhibit"]);
|
||||
strategy = "systemd";
|
||||
Logger.d("IdleInhibitor", "Using systemd-inhibit strategy");
|
||||
return;
|
||||
@@ -37,7 +37,7 @@ Singleton {
|
||||
{}
|
||||
|
||||
try {
|
||||
var waylandResult = Quickshell.execDetached(["whereis", "wayhibitor"]);
|
||||
var waylandResult = Quickshell.execDetached(["sh", "-c", "command -v wayhibitor"]);
|
||||
strategy = "wayland";
|
||||
Logger.d("IdleInhibitor", "Using wayhibitor strategy");
|
||||
return;
|
||||
|
||||
@@ -21,11 +21,11 @@ Singleton {
|
||||
// Programs to check - maps property names to commands
|
||||
readonly property var programsToCheck: ({
|
||||
"gpuScreenRecorderAvailable": ["sh", "-c", "command -v gpu-screen-recorder >/dev/null 2>&1 || (command -v flatpak >/dev/null 2>&1 && flatpak list --app | grep -q 'com.dec05eba.gpu_screen_recorder')"],
|
||||
"matugenAvailable": ["whereis", "matugen"],
|
||||
"nmcliAvailable": ["whereis", "nmcli"],
|
||||
"wlsunsetAvailable": ["whereis", "wlsunset"],
|
||||
"app2unitAvailable": ["whereis", "app2unit"],
|
||||
"gnomeCalendarAvailable": ["whereis", "gnome-calendar"]
|
||||
"matugenAvailable": ["sh", "-c", "command -v matugen"],
|
||||
"nmcliAvailable": ["sh", "-c", "command -v nmcli"],
|
||||
"wlsunsetAvailable": ["sh", "-c", "command -v wlsunset"],
|
||||
"app2unitAvailable": ["sh", "-c", "command -v app2unit"],
|
||||
"gnomeCalendarAvailable": ["sh", "-c", "command -v gnome-calendar"]
|
||||
})
|
||||
|
||||
// Discord client auto-detection
|
||||
|
||||
@@ -528,7 +528,7 @@ Singleton {
|
||||
// #3 - Check if nvidia-smi is available (for NVIDIA GPUs)
|
||||
Process {
|
||||
id: nvidiaSmiCheck
|
||||
command: ["whereis", "nvidia-smi"]
|
||||
command: ["sh", "-c", "command -v nvidia-smi"]
|
||||
running: false
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
|
||||
@@ -662,7 +662,7 @@ Singleton {
|
||||
// -------------------------------------------------
|
||||
Process {
|
||||
id: checkMagickProcess
|
||||
command: ["whereis", "magick"]
|
||||
command: ["sh", "-c", "command -v magick"]
|
||||
running: false
|
||||
|
||||
stdout: StdioCollector {}
|
||||
|
||||
Reference in New Issue
Block a user