System: replaced "which" by "whereis" as it's more likely to be installed by default

This commit is contained in:
Lemmy
2025-12-29 16:47:46 -05:00
parent de68fd6d21
commit 5bab582284
8 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ ColumnLayout {
Process {
id: whichPacmanProcess
command: ["which", "pacman"]
command: ["whereis", "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: ["which", "matugen"]
command: ["whereis", "matugen"]
running: false
onExited: function (exitCode) {
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -50,7 +50,7 @@ Singleton {
function checkCliphistAvailability() {
if (dependencyChecked)
return;
dependencyCheckProcess.command = ["which", "cliphist"];
dependencyCheckProcess.command = ["whereis", "cliphist"];
dependencyCheckProcess.running = true;
}
+2 -2
View File
@@ -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;
+5 -5
View File
@@ -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
+1 -1
View File
@@ -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: {
+1 -1
View File
@@ -662,7 +662,7 @@ Singleton {
// -------------------------------------------------
Process {
id: checkMagickProcess
command: ["which", "magick"]
command: ["whereis", "magick"]
running: false
stdout: StdioCollector {}