mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-11 07:52:50 -05:00
Add support for custom launch prefix, launch apps with niri msg action
spawn on niri
This commit is contained in:
@@ -21,6 +21,7 @@ Singleton {
|
||||
detectElogindProcess.running = true
|
||||
}
|
||||
|
||||
|
||||
Process {
|
||||
id: detectUwsmProcess
|
||||
running: false
|
||||
@@ -64,6 +65,26 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
// * Apps
|
||||
function launchDesktopEntry(desktopEntry) {
|
||||
let cmd = desktopEntry.command
|
||||
if (SessionData.launchPrefix && SessionData.launchPrefix.length > 0) {
|
||||
const launchPrefix = SessionData.launchPrefix.trim().split(" ")
|
||||
cmd = launchPrefix.concat(cmd)
|
||||
}
|
||||
|
||||
// For niri spawn with niri msg action spawn --
|
||||
if (CompositorService.isNiri) {
|
||||
cmd = ["niri", "msg", "action", "spawn", "--"].concat(cmd)
|
||||
}
|
||||
|
||||
Quickshell.execDetached({
|
||||
command: cmd,
|
||||
workingDirectory: desktopEntry.workingDirectory,
|
||||
});
|
||||
}
|
||||
|
||||
// * Session management
|
||||
function logout() {
|
||||
if (hasUwsm) {
|
||||
uwsmLogout.running = true
|
||||
|
||||
Reference in New Issue
Block a user