From 5bab582284a70ace00d1ea89a7ef1956cccd31db Mon Sep 17 00:00:00 2001 From: Lemmy Date: Mon, 29 Dec 2025 16:47:46 -0500 Subject: [PATCH] System: replaced "which" by "whereis" as it's more likely to be installed by default --- Modules/Panels/Settings/Tabs/AboutTab.qml | 2 +- .../Settings/Tabs/ColorScheme/ColorSchemeTab.qml | 2 +- Modules/Panels/Settings/Tabs/DisplayTab.qml | 2 +- Services/Keyboard/ClipboardService.qml | 2 +- Services/Power/IdleInhibitorService.qml | 4 ++-- Services/System/ProgramCheckerService.qml | 10 +++++----- Services/System/SystemStatService.qml | 2 +- Services/UI/ImageCacheService.qml | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Modules/Panels/Settings/Tabs/AboutTab.qml b/Modules/Panels/Settings/Tabs/AboutTab.qml index 1a9c72541..fc8ec35ec 100644 --- a/Modules/Panels/Settings/Tabs/AboutTab.qml +++ b/Modules/Panels/Settings/Tabs/AboutTab.qml @@ -75,7 +75,7 @@ ColumnLayout { Process { id: whichPacmanProcess - command: ["which", "pacman"] + command: ["whereis", "pacman"] running: false onExited: function (exitCode) { if (exitCode === 0) { diff --git a/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml b/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml index da4a250b0..5c9be5b7c 100644 --- a/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml +++ b/Modules/Panels/Settings/Tabs/ColorScheme/ColorSchemeTab.qml @@ -114,7 +114,7 @@ ColumnLayout { // Simple process to check if matugen exists Process { id: matugenCheck - command: ["which", "matugen"] + command: ["whereis", "matugen"] running: false onExited: function (exitCode) { diff --git a/Modules/Panels/Settings/Tabs/DisplayTab.qml b/Modules/Panels/Settings/Tabs/DisplayTab.qml index 9d879103f..0cad7879b 100644 --- a/Modules/Panels/Settings/Tabs/DisplayTab.qml +++ b/Modules/Panels/Settings/Tabs/DisplayTab.qml @@ -34,7 +34,7 @@ ColumnLayout { // Check for wlsunset availability when enabling Night Light Process { id: wlsunsetCheck - command: ["which", "wlsunset"] + command: ["whereis", "wlsunset"] running: false onExited: function (exitCode) { diff --git a/Services/Keyboard/ClipboardService.qml b/Services/Keyboard/ClipboardService.qml index 6acfb2f5c..472d8a116 100644 --- a/Services/Keyboard/ClipboardService.qml +++ b/Services/Keyboard/ClipboardService.qml @@ -50,7 +50,7 @@ Singleton { function checkCliphistAvailability() { if (dependencyChecked) return; - dependencyCheckProcess.command = ["which", "cliphist"]; + dependencyCheckProcess.command = ["whereis", "cliphist"]; dependencyCheckProcess.running = true; } diff --git a/Services/Power/IdleInhibitorService.qml b/Services/Power/IdleInhibitorService.qml index d93386843..a52669631 100644 --- a/Services/Power/IdleInhibitorService.qml +++ b/Services/Power/IdleInhibitorService.qml @@ -27,7 +27,7 @@ Singleton { if (strategy === "auto") { // Check if systemd-inhibit is available try { - var systemdResult = Quickshell.execDetached(["which", "systemd-inhibit"]); + var systemdResult = Quickshell.execDetached(["whereis", "systemd-inhibit"]); strategy = "systemd"; Logger.d("IdleInhibitor", "Using systemd-inhibit strategy"); return; @@ -37,7 +37,7 @@ Singleton { {} try { - var waylandResult = Quickshell.execDetached(["which", "wayhibitor"]); + var waylandResult = Quickshell.execDetached(["whereis", "wayhibitor"]); strategy = "wayland"; Logger.d("IdleInhibitor", "Using wayhibitor strategy"); return; diff --git a/Services/System/ProgramCheckerService.qml b/Services/System/ProgramCheckerService.qml index 7c8f5299e..b4aae6a2f 100644 --- a/Services/System/ProgramCheckerService.qml +++ b/Services/System/ProgramCheckerService.qml @@ -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": ["which", "matugen"], - "nmcliAvailable": ["which", "nmcli"], - "wlsunsetAvailable": ["which", "wlsunset"], - "app2unitAvailable": ["which", "app2unit"], - "gnomeCalendarAvailable": ["which", "gnome-calendar"] + "matugenAvailable": ["whereis", "matugen"], + "nmcliAvailable": ["whereis", "nmcli"], + "wlsunsetAvailable": ["whereis", "wlsunset"], + "app2unitAvailable": ["whereis", "app2unit"], + "gnomeCalendarAvailable": ["whereis", "gnome-calendar"] }) // Discord client auto-detection diff --git a/Services/System/SystemStatService.qml b/Services/System/SystemStatService.qml index 789b95059..1cccb6ad7 100644 --- a/Services/System/SystemStatService.qml +++ b/Services/System/SystemStatService.qml @@ -528,7 +528,7 @@ Singleton { // #3 - Check if nvidia-smi is available (for NVIDIA GPUs) Process { id: nvidiaSmiCheck - command: ["which", "nvidia-smi"] + command: ["whereis", "nvidia-smi"] running: false stdout: StdioCollector { onStreamFinished: { diff --git a/Services/UI/ImageCacheService.qml b/Services/UI/ImageCacheService.qml index 6e1355118..a3930a06f 100644 --- a/Services/UI/ImageCacheService.qml +++ b/Services/UI/ImageCacheService.qml @@ -662,7 +662,7 @@ Singleton { // ------------------------------------------------- Process { id: checkMagickProcess - command: ["which", "magick"] + command: ["whereis", "magick"] running: false stdout: StdioCollector {}