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