1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

feat: DMS Cursor Control - Size & Theme in niri

This commit is contained in:
purian23
2026-01-06 19:08:05 -05:00
parent 8c9c936d0e
commit 721700190b
5 changed files with 251 additions and 2 deletions

View File

@@ -190,7 +190,13 @@ Singleton {
const userPrefix = SettingsData.launchPrefix?.trim() || "";
const defaultPrefix = Quickshell.env("DMS_DEFAULT_LAUNCH_PREFIX") || "";
const prefix = userPrefix.length > 0 ? userPrefix : defaultPrefix;
const cursorPrefix = typeof SettingsData.getCursorEnvPrefix !== "undefined" ? SettingsData.getCursorEnvPrefix() : "";
let prefix = userPrefix.length > 0 ? userPrefix : defaultPrefix;
if (cursorPrefix) {
prefix = prefix.length > 0 ? `${cursorPrefix} ${prefix}` : cursorPrefix;
}
const workDir = desktopEntry.workingDirectory || Quickshell.env("HOME");
const escapedCmd = cmd.map(arg => escapeShellArg(arg)).join(" ");
const shellCmd = prefix.length > 0 ? `${prefix} ${escapedCmd}` : escapedCmd;
@@ -230,7 +236,12 @@ Singleton {
const userPrefix = SettingsData.launchPrefix?.trim() || "";
const defaultPrefix = Quickshell.env("DMS_DEFAULT_LAUNCH_PREFIX") || "";
const prefix = userPrefix.length > 0 ? userPrefix : defaultPrefix;
const cursorPrefix = typeof SettingsData.getCursorEnvPrefix !== "undefined" ? SettingsData.getCursorEnvPrefix() : "";
let prefix = userPrefix.length > 0 ? userPrefix : defaultPrefix;
if (cursorPrefix) {
prefix = prefix.length > 0 ? `${cursorPrefix} ${prefix}` : cursorPrefix;
}
if (prefix.length > 0 && needsShellExecution(prefix)) {
const escapedCmd = cmd.map(arg => escapeShellArg(arg)).join(" ");