mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
Set XDG_SESSION_TYPE in greeter
Always wayland, which is probably fine for our use case. Fixes gnome
This commit is contained in:
@@ -1114,7 +1114,7 @@ Item {
|
||||
if (idx >= 0) {
|
||||
GreeterState.currentSessionIndex = idx
|
||||
GreeterState.selectedSession = GreeterState.sessionExecs[idx]
|
||||
GreetdMemory.setLastSessionId(GreeterState.sessionExecs[idx].split(" ")[0])
|
||||
GreetdMemory.setLastSessionId(GreeterState.sessionPaths[idx])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1131,6 +1131,7 @@ Item {
|
||||
property string currentSessionName: GreeterState.sessionList[GreeterState.currentSessionIndex] || ""
|
||||
property int pendingParsers: 0
|
||||
|
||||
|
||||
function finalizeSessionSelection() {
|
||||
if (GreeterState.sessionList.length === 0) {
|
||||
return
|
||||
@@ -1141,8 +1142,8 @@ Item {
|
||||
const savedSession = GreetdMemory.lastSessionId
|
||||
let foundSaved = false
|
||||
if (savedSession) {
|
||||
for (var i = 0; i < GreeterState.sessionExecs.length; i++) {
|
||||
if (GreeterState.sessionExecs[i].toLowerCase().includes(savedSession.toLowerCase()) || GreeterState.sessionList[i].toLowerCase().includes(savedSession.toLowerCase())) {
|
||||
for (var i = 0; i < GreeterState.sessionPaths.length; i++) {
|
||||
if (GreeterState.sessionPaths[i] === savedSession) {
|
||||
GreeterState.currentSessionIndex = i
|
||||
foundSaved = true
|
||||
break
|
||||
@@ -1203,10 +1204,13 @@ Item {
|
||||
if (!GreeterState.sessionList.includes(name)) {
|
||||
let newList = GreeterState.sessionList.slice()
|
||||
let newExecs = GreeterState.sessionExecs.slice()
|
||||
let newPaths = GreeterState.sessionPaths.slice()
|
||||
newList.push(name)
|
||||
newExecs.push(exec)
|
||||
newPaths.push(desktopPath)
|
||||
GreeterState.sessionList = newList
|
||||
GreeterState.sessionExecs = newExecs
|
||||
GreeterState.sessionPaths = newPaths
|
||||
root.sessionCount = GreeterState.sessionList.length
|
||||
}
|
||||
}
|
||||
@@ -1242,9 +1246,9 @@ Item {
|
||||
GreeterState.unlocking = true
|
||||
const sessionCmd = GreeterState.selectedSession || GreeterState.sessionExecs[GreeterState.currentSessionIndex]
|
||||
if (sessionCmd) {
|
||||
GreetdMemory.setLastSessionId(sessionCmd.split(" ")[0])
|
||||
GreetdMemory.setLastSessionId(GreeterState.sessionPaths[GreeterState.currentSessionIndex])
|
||||
GreetdMemory.setLastSuccessfulUser(GreeterState.username)
|
||||
Greetd.launch(sessionCmd.split(" "), [], true)
|
||||
Greetd.launch(sessionCmd.split(" "), ["XDG_SESSION_TYPE=wayland"], true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ Singleton {
|
||||
|
||||
property var sessionList: []
|
||||
property var sessionExecs: []
|
||||
property var sessionPaths: []
|
||||
property int currentSessionIndex: 0
|
||||
|
||||
function reset() {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
env = DMS_RUN_GREETER,1
|
||||
env = QT_QPA_PLATFORM,wayland
|
||||
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
|
||||
env = EGL_PLATFORM,gbm
|
||||
|
||||
exec = sh -c "qs -p _DMS_PATH_; hyprctl dispatch exit"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
EGL_PLATFORM=gbm Hyprland -c /etc/greetd/dms-hypr.conf
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export EGL_PLATFORM=gbm
|
||||
|
||||
exec Hyprland -c /etc/greetd/dms-hypr.conf
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
EGL_PLATFORM=gbm niri -c /etc/greetd/dms-niri.kdl
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export EGL_PLATFORM=gbm
|
||||
|
||||
exec niri -c /etc/greetd/dms-niri.kdl
|
||||
Reference in New Issue
Block a user