mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
Compare commits
3 Commits
c128793239
...
4fb6a17e1b
| Author | SHA1 | Date | |
|---|---|---|---|
| 4fb6a17e1b | |||
| e771e3b675 | |||
| b1b7aa7aa2 |
@@ -479,8 +479,6 @@ Item {
|
|||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
id: delegateItem
|
id: delegateItem
|
||||||
required property var modelData
|
|
||||||
required property int index
|
|
||||||
|
|
||||||
property var dockButton: {
|
property var dockButton: {
|
||||||
switch (itemData.type) {
|
switch (itemData.type) {
|
||||||
@@ -601,7 +599,7 @@ Item {
|
|||||||
height: delegateItem.height
|
height: delegateItem.height
|
||||||
actualIconSize: root.iconSize
|
actualIconSize: root.iconSize
|
||||||
dockApps: root
|
dockApps: root
|
||||||
index: delegateItem.index
|
index: model.index
|
||||||
}
|
}
|
||||||
|
|
||||||
DockTrashButton {
|
DockTrashButton {
|
||||||
@@ -626,7 +624,7 @@ Item {
|
|||||||
appData: itemData
|
appData: itemData
|
||||||
contextMenu: root.contextMenu
|
contextMenu: root.contextMenu
|
||||||
dockApps: root
|
dockApps: root
|
||||||
index: delegateItem.index
|
index: model.index
|
||||||
parentDockScreen: root.dockScreen
|
parentDockScreen: root.dockScreen
|
||||||
showWindowTitle: itemData?.type === "window" || itemData?.type === "grouped"
|
showWindowTitle: itemData?.type === "window" || itemData?.type === "grouped"
|
||||||
windowTitle: {
|
windowTitle: {
|
||||||
|
|||||||
@@ -386,16 +386,20 @@ end)
|
|||||||
HYPRLAND_LUA_EOF
|
HYPRLAND_LUA_EOF
|
||||||
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
||||||
elif [[ -z "$COMPOSITOR_CONFIG" ]]; then
|
elif [[ -z "$COMPOSITOR_CONFIG" ]]; then
|
||||||
TEMP_CONFIG=$(mktemp)
|
TEMP_CONFIG=$(mktemp --suffix=.lua)
|
||||||
cat > "$TEMP_CONFIG" << HYPRLAND_EOF
|
cat > "$TEMP_CONFIG" << HYPRLAND_LUA_EOF
|
||||||
env = DMS_RUN_GREETER,1
|
hl.env("DMS_RUN_GREETER", "1")
|
||||||
|
|
||||||
misc {
|
hl.config({
|
||||||
disable_hyprland_logo = true
|
misc = {
|
||||||
}
|
disable_hyprland_logo = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
exec-once = sh -c "$QS_CMD; hyprctl dispatch exit"
|
hl.on("hyprland.start", function()
|
||||||
HYPRLAND_EOF
|
hl.exec_cmd('sh -c "$QS_CMD; hyprctl dispatch exit"')
|
||||||
|
end)
|
||||||
|
HYPRLAND_LUA_EOF
|
||||||
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
COMPOSITOR_CONFIG="$TEMP_CONFIG"
|
||||||
else
|
else
|
||||||
TEMP_CONFIG=$(mktemp)
|
TEMP_CONFIG=$(mktemp)
|
||||||
|
|||||||
@@ -217,6 +217,64 @@ Singleton {
|
|||||||
return envObj;
|
return envObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function splitShellArgs(str) {
|
||||||
|
const args = [];
|
||||||
|
let current = "";
|
||||||
|
let hasToken = false;
|
||||||
|
let quote = "";
|
||||||
|
let escaped = false;
|
||||||
|
for (const ch of str) {
|
||||||
|
if (escaped) {
|
||||||
|
current += ch;
|
||||||
|
escaped = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
switch (quote) {
|
||||||
|
case "'":
|
||||||
|
if (ch === "'") {
|
||||||
|
quote = "";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
current += ch;
|
||||||
|
continue;
|
||||||
|
case "\"":
|
||||||
|
switch (ch) {
|
||||||
|
case "\"":
|
||||||
|
quote = "";
|
||||||
|
continue;
|
||||||
|
case "\\":
|
||||||
|
escaped = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
current += ch;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
switch (ch) {
|
||||||
|
case "\\":
|
||||||
|
escaped = true;
|
||||||
|
continue;
|
||||||
|
case "'":
|
||||||
|
case "\"":
|
||||||
|
quote = ch;
|
||||||
|
hasToken = true;
|
||||||
|
continue;
|
||||||
|
case " ":
|
||||||
|
case "\t":
|
||||||
|
case "\n":
|
||||||
|
if (!hasToken && current.length === 0)
|
||||||
|
continue;
|
||||||
|
args.push(current);
|
||||||
|
current = "";
|
||||||
|
hasToken = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
current += ch;
|
||||||
|
}
|
||||||
|
if (current.length > 0 || hasToken)
|
||||||
|
args.push(current);
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
function launchDesktopEntry(desktopEntry, useNvidia) {
|
function launchDesktopEntry(desktopEntry, useNvidia) {
|
||||||
if (!desktopEntry || !desktopEntry.command)
|
if (!desktopEntry || !desktopEntry.command)
|
||||||
return;
|
return;
|
||||||
@@ -230,8 +288,7 @@ Singleton {
|
|||||||
cmd = [nvidiaCommand].concat(cmd);
|
cmd = [nvidiaCommand].concat(cmd);
|
||||||
|
|
||||||
if (override?.extraFlags) {
|
if (override?.extraFlags) {
|
||||||
const extraArgs = override.extraFlags.trim().split(/\s+/).filter(arg => arg.length > 0);
|
cmd = cmd.concat(splitShellArgs(override.extraFlags));
|
||||||
cmd = cmd.concat(extraArgs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const userPrefix = SettingsData.launchPrefix?.trim() || "";
|
const userPrefix = SettingsData.launchPrefix?.trim() || "";
|
||||||
|
|||||||
Reference in New Issue
Block a user