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