Add LXQt detection

This commit is contained in:
2025-10-12 14:32:21 +03:00
parent 1439a22378
commit ba43a98926
+4 -1
View File
@@ -1,7 +1,6 @@
package main package main
import ( import (
"github.com/mitchellh/go-ps"
"log" "log"
"os" "os"
"os/exec" "os/exec"
@@ -9,6 +8,8 @@ import (
"slices" "slices"
"strconv" "strconv"
"strings" "strings"
"github.com/mitchellh/go-ps"
) )
func GetShell() string { func GetShell() string {
@@ -98,6 +99,8 @@ func GetDEWM() string {
return "MATE " + runCommand("mate-about --version | awk '{print $4}'") return "MATE " + runCommand("mate-about --version | awk '{print $4}'")
} else if processExists("lxsession") { } else if processExists("lxsession") {
return "LXDE" return "LXDE"
} else if processExists("lxqt-session") {
return "LXQt " + runCommand("lxqt-session --version | head -n1 | awk '{print $2}'")
} else if processExists("i3") || processExists("i3-with-shmlog") { } else if processExists("i3") || processExists("i3-with-shmlog") {
return "i3 " + runCommand("i3 --version | awk '{print $3}'") return "i3 " + runCommand("i3 --version | awk '{print $3}'")
} else if processExists("sway") { } else if processExists("sway") {