mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
core: respect QT_LOGGING_RULES var
This commit is contained in:
@@ -186,9 +186,11 @@ func runShellInteractive(session bool) {
|
|||||||
|
|
||||||
cmd := exec.CommandContext(ctx, "qs", "-p", configPath)
|
cmd := exec.CommandContext(ctx, "qs", "-p", configPath)
|
||||||
cmd.Env = append(os.Environ(), "DMS_SOCKET="+socketPath)
|
cmd.Env = append(os.Environ(), "DMS_SOCKET="+socketPath)
|
||||||
|
if os.Getenv("QT_LOGGING_RULES") == "" {
|
||||||
if qtRules := log.GetQtLoggingRules(); qtRules != "" {
|
if qtRules := log.GetQtLoggingRules(); qtRules != "" {
|
||||||
cmd.Env = append(cmd.Env, "QT_LOGGING_RULES="+qtRules)
|
cmd.Env = append(cmd.Env, "QT_LOGGING_RULES="+qtRules)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if isSessionManaged && hasSystemdRun() {
|
if isSessionManaged && hasSystemdRun() {
|
||||||
cmd.Env = append(cmd.Env, "DMS_DEFAULT_LAUNCH_PREFIX=systemd-run --user --scope")
|
cmd.Env = append(cmd.Env, "DMS_DEFAULT_LAUNCH_PREFIX=systemd-run --user --scope")
|
||||||
@@ -424,9 +426,11 @@ func runShellDaemon(session bool) {
|
|||||||
|
|
||||||
cmd := exec.CommandContext(ctx, "qs", "-p", configPath)
|
cmd := exec.CommandContext(ctx, "qs", "-p", configPath)
|
||||||
cmd.Env = append(os.Environ(), "DMS_SOCKET="+socketPath)
|
cmd.Env = append(os.Environ(), "DMS_SOCKET="+socketPath)
|
||||||
|
if os.Getenv("QT_LOGGING_RULES") == "" {
|
||||||
if qtRules := log.GetQtLoggingRules(); qtRules != "" {
|
if qtRules := log.GetQtLoggingRules(); qtRules != "" {
|
||||||
cmd.Env = append(cmd.Env, "QT_LOGGING_RULES="+qtRules)
|
cmd.Env = append(cmd.Env, "QT_LOGGING_RULES="+qtRules)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if isSessionManaged && hasSystemdRun() {
|
if isSessionManaged && hasSystemdRun() {
|
||||||
cmd.Env = append(cmd.Env, "DMS_DEFAULT_LAUNCH_PREFIX=systemd-run --user --scope")
|
cmd.Env = append(cmd.Env, "DMS_DEFAULT_LAUNCH_PREFIX=systemd-run --user --scope")
|
||||||
|
|||||||
Reference in New Issue
Block a user