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 { Process {
id: whichPacmanProcess id: whichPacmanProcess
command: ["which", "pacman"] command: ["whereis", "pacman"]
running: false running: false
onExited: function (exitCode) { onExited: function (exitCode) {
if (exitCode === 0) { if (exitCode === 0) {
@@ -114,7 +114,7 @@ ColumnLayout {
// Simple process to check if matugen exists // Simple process to check if matugen exists
Process { Process {
id: matugenCheck id: matugenCheck
command: ["which", "matugen"] command: ["whereis", "matugen"]
running: false running: false
onExited: function (exitCode) { onExited: function (exitCode) {
+1 -1
View File
@@ -34,7 +34,7 @@ ColumnLayout {
// Check for wlsunset availability when enabling Night Light // Check for wlsunset availability when enabling Night Light
Process { Process {
id: wlsunsetCheck id: wlsunsetCheck
command: ["which", "wlsunset"] command: ["whereis", "wlsunset"]
running: false running: false
onExited: function (exitCode) { onExited: function (exitCode) {
+1 -1
View File
@@ -50,7 +50,7 @@ Singleton {
function checkCliphistAvailability() { function checkCliphistAvailability() {
if (dependencyChecked) if (dependencyChecked)
return; return;
dependencyCheckProcess.command = ["which", "cliphist"]; dependencyCheckProcess.command = ["whereis", "cliphist"];
dependencyCheckProcess.running = true; dependencyCheckProcess.running = true;
} }
+2 -2
View File
@@ -27,7 +27,7 @@ Singleton {
if (strategy === "auto") { if (strategy === "auto") {
// Check if systemd-inhibit is available // Check if systemd-inhibit is available
try { try {
var systemdResult = Quickshell.execDetached(["which", "systemd-inhibit"]); var systemdResult = Quickshell.execDetached(["whereis", "systemd-inhibit"]);
strategy = "systemd"; strategy = "systemd";
Logger.d("IdleInhibitor", "Using systemd-inhibit strategy"); Logger.d("IdleInhibitor", "Using systemd-inhibit strategy");
return; return;
@@ -37,7 +37,7 @@ Singleton {
{} {}
try { try {
var waylandResult = Quickshell.execDetached(["which", "wayhibitor"]); var waylandResult = Quickshell.execDetached(["whereis", "wayhibitor"]);
strategy = "wayland"; strategy = "wayland";
Logger.d("IdleInhibitor", "Using wayhibitor strategy"); Logger.d("IdleInhibitor", "Using wayhibitor strategy");
return; return;
+5 -5
View File
@@ -21,11 +21,11 @@ Singleton {
// Programs to check - maps property names to commands // Programs to check - maps property names to commands
readonly property var programsToCheck: ({ 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')"], "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"], "matugenAvailable": ["whereis", "matugen"],
"nmcliAvailable": ["which", "nmcli"], "nmcliAvailable": ["whereis", "nmcli"],
"wlsunsetAvailable": ["which", "wlsunset"], "wlsunsetAvailable": ["whereis", "wlsunset"],
"app2unitAvailable": ["which", "app2unit"], "app2unitAvailable": ["whereis", "app2unit"],
"gnomeCalendarAvailable": ["which", "gnome-calendar"] "gnomeCalendarAvailable": ["whereis", "gnome-calendar"]
}) })
// Discord client auto-detection // Discord client auto-detection
+1 -1
View File
@@ -528,7 +528,7 @@ Singleton {
// #3 - Check if nvidia-smi is available (for NVIDIA GPUs) // #3 - Check if nvidia-smi is available (for NVIDIA GPUs)
Process { Process {
id: nvidiaSmiCheck id: nvidiaSmiCheck
command: ["which", "nvidia-smi"] command: ["whereis", "nvidia-smi"]
running: false running: false
stdout: StdioCollector { stdout: StdioCollector {
onStreamFinished: { onStreamFinished: {
+1 -1
View File
@@ -662,7 +662,7 @@ Singleton {
// ------------------------------------------------- // -------------------------------------------------
Process { Process {
id: checkMagickProcess id: checkMagickProcess
command: ["which", "magick"] command: ["whereis", "magick"]
running: false running: false
stdout: StdioCollector {} stdout: StdioCollector {}