mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 16:02: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) {
|
if (idx >= 0) {
|
||||||
GreeterState.currentSessionIndex = idx
|
GreeterState.currentSessionIndex = idx
|
||||||
GreeterState.selectedSession = GreeterState.sessionExecs[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 string currentSessionName: GreeterState.sessionList[GreeterState.currentSessionIndex] || ""
|
||||||
property int pendingParsers: 0
|
property int pendingParsers: 0
|
||||||
|
|
||||||
|
|
||||||
function finalizeSessionSelection() {
|
function finalizeSessionSelection() {
|
||||||
if (GreeterState.sessionList.length === 0) {
|
if (GreeterState.sessionList.length === 0) {
|
||||||
return
|
return
|
||||||
@@ -1141,8 +1142,8 @@ Item {
|
|||||||
const savedSession = GreetdMemory.lastSessionId
|
const savedSession = GreetdMemory.lastSessionId
|
||||||
let foundSaved = false
|
let foundSaved = false
|
||||||
if (savedSession) {
|
if (savedSession) {
|
||||||
for (var i = 0; i < GreeterState.sessionExecs.length; i++) {
|
for (var i = 0; i < GreeterState.sessionPaths.length; i++) {
|
||||||
if (GreeterState.sessionExecs[i].toLowerCase().includes(savedSession.toLowerCase()) || GreeterState.sessionList[i].toLowerCase().includes(savedSession.toLowerCase())) {
|
if (GreeterState.sessionPaths[i] === savedSession) {
|
||||||
GreeterState.currentSessionIndex = i
|
GreeterState.currentSessionIndex = i
|
||||||
foundSaved = true
|
foundSaved = true
|
||||||
break
|
break
|
||||||
@@ -1203,10 +1204,13 @@ Item {
|
|||||||
if (!GreeterState.sessionList.includes(name)) {
|
if (!GreeterState.sessionList.includes(name)) {
|
||||||
let newList = GreeterState.sessionList.slice()
|
let newList = GreeterState.sessionList.slice()
|
||||||
let newExecs = GreeterState.sessionExecs.slice()
|
let newExecs = GreeterState.sessionExecs.slice()
|
||||||
|
let newPaths = GreeterState.sessionPaths.slice()
|
||||||
newList.push(name)
|
newList.push(name)
|
||||||
newExecs.push(exec)
|
newExecs.push(exec)
|
||||||
|
newPaths.push(desktopPath)
|
||||||
GreeterState.sessionList = newList
|
GreeterState.sessionList = newList
|
||||||
GreeterState.sessionExecs = newExecs
|
GreeterState.sessionExecs = newExecs
|
||||||
|
GreeterState.sessionPaths = newPaths
|
||||||
root.sessionCount = GreeterState.sessionList.length
|
root.sessionCount = GreeterState.sessionList.length
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1242,9 +1246,9 @@ Item {
|
|||||||
GreeterState.unlocking = true
|
GreeterState.unlocking = true
|
||||||
const sessionCmd = GreeterState.selectedSession || GreeterState.sessionExecs[GreeterState.currentSessionIndex]
|
const sessionCmd = GreeterState.selectedSession || GreeterState.sessionExecs[GreeterState.currentSessionIndex]
|
||||||
if (sessionCmd) {
|
if (sessionCmd) {
|
||||||
GreetdMemory.setLastSessionId(sessionCmd.split(" ")[0])
|
GreetdMemory.setLastSessionId(GreeterState.sessionPaths[GreeterState.currentSessionIndex])
|
||||||
GreetdMemory.setLastSuccessfulUser(GreeterState.username)
|
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 sessionList: []
|
||||||
property var sessionExecs: []
|
property var sessionExecs: []
|
||||||
|
property var sessionPaths: []
|
||||||
property int currentSessionIndex: 0
|
property int currentSessionIndex: 0
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
env = DMS_RUN_GREETER,1
|
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"
|
exec = sh -c "qs -p _DMS_PATH_; hyprctl dispatch exit"
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/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
|
#!/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