Added i3, swayfx and hyprland WM detection
This commit is contained in:
parent
20cf7fe869
commit
76974ee789
8
utils.go
8
utils.go
@ -272,10 +272,18 @@ 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("i3") {
|
||||||
|
return "i3 " + runCommand("i3 --version | awk '{print $3}'")
|
||||||
} else if processExists("sway") {
|
} else if processExists("sway") {
|
||||||
|
if runCommand("sway --version | awk '{print $1}'") == "swayfx" {
|
||||||
|
return "SwayFX " + runCommand("sway --version | awk '{print $3}'")
|
||||||
|
} else {
|
||||||
return "Sway " + runCommand("sway --version | awk '{print $3}'")
|
return "Sway " + runCommand("sway --version | awk '{print $3}'")
|
||||||
|
}
|
||||||
} else if processExists("bspwm") {
|
} else if processExists("bspwm") {
|
||||||
return "Bspwm " + runCommand("bspwm -v")
|
return "Bspwm " + runCommand("bspwm -v")
|
||||||
|
} else if processExists("Hyprland") {
|
||||||
|
return "Hyprland " + runCommand("hyprctl version | sed -n 3p | awk '{print $2}' | tr -d 'v,'")
|
||||||
} else if processExists("icewm-session") {
|
} else if processExists("icewm-session") {
|
||||||
return "IceWM " + runCommand("icewm --version | awk '{print $2}'")
|
return "IceWM " + runCommand("icewm --version | awk '{print $2}'")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user