mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 15:32:50 -05:00
Simplify mess
This commit is contained in:
@@ -25,18 +25,10 @@ Item {
|
|||||||
property bool isHovered: mouseArea.containsMouse && !dragging
|
property bool isHovered: mouseArea.containsMouse && !dragging
|
||||||
property bool showTooltip: mouseArea.containsMouse && !dragging
|
property bool showTooltip: mouseArea.containsMouse && !dragging
|
||||||
property bool isWindowFocused: {
|
property bool isWindowFocused: {
|
||||||
if (!appData || appData.type !== "window") {
|
if (!appData || appData.type !== "window" || !appData.toplevelObject) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
return appData.toplevelObject.activated
|
||||||
var toplevels = CompositorService.sortedToplevels
|
|
||||||
for (var i = 0; i < toplevels.length; i++) {
|
|
||||||
var toplevel = toplevels[i]
|
|
||||||
if (toplevel.appId === appData.appId) {
|
|
||||||
return toplevel.activated
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
property string tooltipText: {
|
property string tooltipText: {
|
||||||
if (!appData)
|
if (!appData)
|
||||||
@@ -216,14 +208,8 @@ Item {
|
|||||||
desktopEntry.execute()
|
desktopEntry.execute()
|
||||||
}
|
}
|
||||||
} else if (appData.type === "window") {
|
} else if (appData.type === "window") {
|
||||||
// Find the toplevel by matching appId from sorted list
|
if (appData.toplevelObject) {
|
||||||
var toplevels = CompositorService.sortedToplevels
|
appData.toplevelObject.activate()
|
||||||
for (var i = 0; i < toplevels.length; i++) {
|
|
||||||
var toplevel = toplevels[i]
|
|
||||||
if (toplevel.appId === appData.appId && toplevel.title === appData.windowTitle) {
|
|
||||||
toplevel.activate()
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (mouse.button === Qt.MiddleButton) {
|
} else if (mouse.button === Qt.MiddleButton) {
|
||||||
|
|||||||
@@ -108,12 +108,9 @@ elif [ "$MODE" = "generate-color" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate ghostty, dgop, and fastfetch colors with content scheme for better contrast
|
|
||||||
TEMP_CONTENT_CONFIG="/tmp/matugen-content-config-$$.toml"
|
TEMP_CONTENT_CONFIG="/tmp/matugen-content-config-$$.toml"
|
||||||
cp "matugen/matugen-content-cfg.toml" "$TEMP_CONTENT_CONFIG"
|
cp "matugen/matugen-content-cfg.toml" "$TEMP_CONTENT_CONFIG"
|
||||||
sed -i "s|input_path = './matugen/templates/|input_path = '$SHELL_DIR/matugen/templates/|g" "$TEMP_CONTENT_CONFIG"
|
sed -i "s|input_path = './matugen/templates/|input_path = '$SHELL_DIR/matugen/templates/|g" "$TEMP_CONTENT_CONFIG"
|
||||||
|
|
||||||
# Remove the unused ghostty template based on light/dark mode
|
|
||||||
if [ "$IS_LIGHT" = "true" ]; then
|
if [ "$IS_LIGHT" = "true" ]; then
|
||||||
sed -i '/\[templates\.ghostty-dark\]/,/^$/d' "$TEMP_CONTENT_CONFIG"
|
sed -i '/\[templates\.ghostty-dark\]/,/^$/d' "$TEMP_CONTENT_CONFIG"
|
||||||
else
|
else
|
||||||
@@ -121,10 +118,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$MODE" = "generate" ]; then
|
if [ "$MODE" = "generate" ]; then
|
||||||
echo "Generating ghostty, dgop, and fastfetch colors with content scheme..."
|
|
||||||
matugen -v -c "$TEMP_CONTENT_CONFIG" -t scheme-fidelity image "$INPUT_SOURCE" $MATUGEN_MODE
|
matugen -v -c "$TEMP_CONTENT_CONFIG" -t scheme-fidelity image "$INPUT_SOURCE" $MATUGEN_MODE
|
||||||
elif [ "$MODE" = "generate-color" ]; then
|
elif [ "$MODE" = "generate-color" ]; then
|
||||||
echo "Generating ghostty, dgop, and fastfetch colors with content scheme..."
|
|
||||||
matugen -v -c "$TEMP_CONTENT_CONFIG" -t scheme-fidelity color hex "$INPUT_SOURCE" $MATUGEN_MODE
|
matugen -v -c "$TEMP_CONTENT_CONFIG" -t scheme-fidelity color hex "$INPUT_SOURCE" $MATUGEN_MODE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user