1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-29 14:32:08 -04:00

Compare commits

...

3 Commits

Author SHA1 Message Date
bbedward e5fff91ae6 notification: fix modal escape key handling in connected mode
fixes #2566
2026-06-03 10:49:51 -04:00
bbedward 2f2d4c9d9b i18n: remove redundant terms and sync 2026-06-03 10:32:51 -04:00
bbedward bfca1b46a6 greeter: support lua hyprland configs
fixes #2565
2026-06-03 09:52:45 -04:00
35 changed files with 10359 additions and 6311 deletions
@@ -262,6 +262,7 @@ Item {
clickCatcher.visible = true; clickCatcher.visible = true;
if (!contentWindow.visible) if (!contentWindow.visible)
contentWindow.visible = true; contentWindow.visible = true;
opened();
shouldHaveFocus = false; shouldHaveFocus = false;
Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible)); Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible));
}); });
@@ -535,13 +536,11 @@ Item {
implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2) implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2)
onVisibleChanged: { onVisibleChanged: {
if (visible) { if (visible)
opened(); return;
} else { if (Qt.inputMethod) {
if (Qt.inputMethod) { Qt.inputMethod.hide();
Qt.inputMethod.hide(); Qt.inputMethod.reset();
Qt.inputMethod.reset();
}
} }
} }
@@ -90,6 +90,7 @@ Item {
if (!useSingleWindow) if (!useSingleWindow)
clickCatcher.visible = true; clickCatcher.visible = true;
contentWindow.visible = true; contentWindow.visible = true;
opened();
shouldHaveFocus = false; shouldHaveFocus = false;
Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible)); Qt.callLater(() => shouldHaveFocus = Qt.binding(() => shouldBeVisible));
} }
@@ -286,13 +287,11 @@ Item {
implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2) implicitHeight: root.useSingleWindow ? 0 : root.alignedHeight + (shadowBuffer * 2)
onVisibleChanged: { onVisibleChanged: {
if (visible) { if (visible)
opened(); return;
} else { if (Qt.inputMethod) {
if (Qt.inputMethod) { Qt.inputMethod.hide();
Qt.inputMethod.hide(); Qt.inputMethod.reset();
Qt.inputMethod.reset();
}
} }
} }
@@ -25,7 +25,7 @@ Popup {
dangerous: true dangerous: true
}, },
{ {
text: I18n.tr("Copy Path"), text: I18n.tr("Copy path"),
icon: "content_copy", icon: "content_copy",
action: copyPath, action: copyPath,
enabled: filePath.length > 0 enabled: filePath.length > 0
+1 -1
View File
@@ -250,7 +250,7 @@ DankModal {
DankButton { DankButton {
visible: SessionsService.otherSessions().length === 0 && !root.lockOnSwitch visible: SessionsService.otherSessions().length === 0 && !root.lockOnSwitch
text: I18n.tr("Log out") text: I18n.tr("Log Out")
iconName: "logout" iconName: "logout"
backgroundColor: Theme.primary backgroundColor: Theme.primary
textColor: Theme.primaryText textColor: Theme.primaryText
@@ -245,7 +245,7 @@ QtObject {
{ {
"id": "builtin_vpn", "id": "builtin_vpn",
"text": I18n.tr("VPN"), "text": I18n.tr("VPN"),
"description": I18n.tr("VPN connections"), "description": I18n.tr("VPN Connections"),
"icon": "vpn_key", "icon": "vpn_key",
"type": "builtin_plugin", "type": "builtin_plugin",
"enabled": DMSNetworkService.available, "enabled": DMSNetworkService.available,
@@ -25,7 +25,7 @@ CompoundPill {
return `${BatteryService.batteryLevel}% ` + I18n.tr("Charging"); return `${BatteryService.batteryLevel}% ` + I18n.tr("Charging");
} }
if (BatteryService.isPluggedIn) { if (BatteryService.isPluggedIn) {
return `${BatteryService.batteryLevel}% ` + I18n.tr("Plugged in"); return `${BatteryService.batteryLevel}% ` + I18n.tr("Plugged In");
} }
return `${BatteryService.batteryLevel}%`; return `${BatteryService.batteryLevel}%`;
} }
+24 -1
View File
@@ -75,6 +75,19 @@ normalize_bool_flag() {
esac esac
} }
is_hyprland_lua_config() {
local config_file="$1"
case "$config_file" in
*.lua)
return 0
;;
esac
if [[ -f "$config_file" ]] && grep -qE '(^|[^[:alnum:]_])hl\.' "$config_file"; then
return 0
fi
return 1
}
exec_compositor() { exec_compositor() {
local log_tag="$1" local log_tag="$1"
shift shift
@@ -306,7 +319,17 @@ NIRI_EOF
echo "Error: neither 'start-hyprland' nor 'Hyprland' was found in PATH" >&2 echo "Error: neither 'start-hyprland' nor 'Hyprland' was found in PATH" >&2
exit 1 exit 1
fi fi
if [[ -z "$COMPOSITOR_CONFIG" ]]; then if [[ -n "$COMPOSITOR_CONFIG" ]] && is_hyprland_lua_config "$COMPOSITOR_CONFIG"; then
TEMP_CONFIG=$(mktemp --suffix=.lua)
cat "$COMPOSITOR_CONFIG" > "$TEMP_CONFIG"
cat >> "$TEMP_CONFIG" << HYPRLAND_LUA_EOF
hl.on("hyprland.start", function()
hl.exec_cmd('sh -c "$QS_CMD; hyprctl dispatch exit"')
end)
HYPRLAND_LUA_EOF
COMPOSITOR_CONFIG="$TEMP_CONFIG"
elif [[ -z "$COMPOSITOR_CONFIG" ]]; then
TEMP_CONFIG=$(mktemp) TEMP_CONFIG=$(mktemp)
cat > "$TEMP_CONFIG" << HYPRLAND_EOF cat > "$TEMP_CONFIG" << HYPRLAND_EOF
env = DMS_RUN_GREETER,1 env = DMS_RUN_GREETER,1
+1 -1
View File
@@ -966,7 +966,7 @@ Item {
SettingsControlledByFrame { SettingsControlledByFrame {
visible: SettingsData.frameEnabled visible: SettingsData.frameEnabled
parentModal: dankBarTab.parentModal parentModal: dankBarTab.parentModal
settingLabel: I18n.tr("Bar transparency") settingLabel: I18n.tr("Bar Transparency")
reason: I18n.tr("Managed by Frame") reason: I18n.tr("Managed by Frame")
} }
} }
@@ -46,7 +46,7 @@ Item {
}, },
{ {
"id": "osd", "id": "osd",
"name": I18n.tr("On-Screen Displays"), "name": I18n.tr("On-screen Displays"),
"description": I18n.tr("Volume, brightness, and other system OSDs"), "description": I18n.tr("Volume, brightness, and other system OSDs"),
"icon": "picture_in_picture" "icon": "picture_in_picture"
}, },
@@ -419,7 +419,7 @@ Item {
DankToggle { DankToggle {
width: parent.width width: parent.width
text: I18n.tr("Focused monitor only") text: I18n.tr("Focused Monitor Only")
description: I18n.tr("Show notifications only on the currently focused monitor") description: I18n.tr("Show notifications only on the currently focused monitor")
visible: parent.componentId === "notifications" visible: parent.componentId === "notifications"
checked: SettingsData.notificationFocusedMonitor checked: SettingsData.notificationFocusedMonitor
+3 -3
View File
@@ -586,7 +586,7 @@ Item {
} }
StyledText { StyledText {
text: I18n.tr("Time format") text: I18n.tr("Time Format")
font.pixelSize: Theme.fontSizeMedium font.pixelSize: Theme.fontSizeMedium
font.weight: Font.Medium font.weight: Font.Medium
color: Theme.surfaceText color: Theme.surfaceText
@@ -605,7 +605,7 @@ Item {
SettingsToggleRow { SettingsToggleRow {
settingKey: "greeterShowSeconds" settingKey: "greeterShowSeconds"
tags: ["greeter", "time", "seconds"] tags: ["greeter", "time", "seconds"]
text: I18n.tr("Show seconds") text: I18n.tr("Show Seconds")
checked: SettingsData.greeterShowSeconds checked: SettingsData.greeterShowSeconds
onToggled: checked => SettingsData.set("greeterShowSeconds", checked) onToggled: checked => SettingsData.set("greeterShowSeconds", checked)
} }
@@ -630,7 +630,7 @@ Item {
SettingsDropdownRow { SettingsDropdownRow {
settingKey: "greeterLockDateFormat" settingKey: "greeterLockDateFormat"
tags: ["greeter", "date", "format"] tags: ["greeter", "date", "format"]
text: I18n.tr("Date format") text: I18n.tr("Date Format")
description: I18n.tr("Greeter only — format for the date on the login screen") description: I18n.tr("Greeter only — format for the date on the login screen")
options: root._lockDateFormatPresets.map(p => p.label) options: root._lockDateFormatPresets.map(p => p.label)
currentValue: { currentValue: {
@@ -126,7 +126,7 @@ Item {
settingKey: "systemUpdaterAdvanced" settingKey: "systemUpdaterAdvanced"
SettingsToggleRow { SettingsToggleRow {
text: I18n.tr("Use custom command") text: I18n.tr("Use Custom Command")
description: I18n.tr("Open a terminal and run a custom command instead of the in-shell upgrade flow.") description: I18n.tr("Open a terminal and run a custom command instead of the in-shell upgrade flow.")
checked: SettingsData.updaterUseCustomCommand checked: SettingsData.updaterUseCustomCommand
onToggled: checked => { onToggled: checked => {
+1 -1
View File
@@ -225,7 +225,7 @@ Item {
StyledText { StyledText {
id: greeterChipText id: greeterChipText
anchors.centerIn: parent anchors.centerIn: parent
text: I18n.tr("greeter") text: I18n.tr("Greeter")
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
color: Theme.secondary color: Theme.secondary
font.weight: Font.Medium font.weight: Font.Medium
+1 -1
View File
@@ -1131,7 +1131,7 @@ Item {
} }
StyledText { StyledText {
text: I18n.tr("24-hour format") text: I18n.tr("24-Hour Format")
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText color: Theme.surfaceVariantText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@@ -1637,7 +1637,7 @@ Column {
rows: [ rows: [
{ {
icon: "screen_record", icon: "screen_record",
label: I18n.tr("Screen Sharing"), label: I18n.tr("Screen sharing"),
setting: "showScreenSharingIcon" setting: "showScreenSharingIcon"
} }
] ]
@@ -1801,7 +1801,7 @@ Column {
id: longestControlCenterLabelMetrics id: longestControlCenterLabelMetrics
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
text: { text: {
const labels = [I18n.tr("Network"), I18n.tr("VPN"), I18n.tr("Bluetooth"), I18n.tr("Audio"), I18n.tr("Volume"), I18n.tr("Microphone"), I18n.tr("Microphone Volume"), I18n.tr("Brightness"), I18n.tr("Brightness Value"), I18n.tr("Battery"), I18n.tr("Printer"), I18n.tr("Screen Sharing"), I18n.tr("Idle Inhibitor"), I18n.tr("Do Not Disturb")]; const labels = [I18n.tr("Network"), I18n.tr("VPN"), I18n.tr("Bluetooth"), I18n.tr("Audio"), I18n.tr("Volume"), I18n.tr("Microphone"), I18n.tr("Microphone Volume"), I18n.tr("Brightness"), I18n.tr("Brightness Value"), I18n.tr("Battery"), I18n.tr("Printer"), I18n.tr("Screen sharing"), I18n.tr("Idle Inhibitor"), I18n.tr("Do Not Disturb")];
let longest = ""; let longest = "";
for (let i = 0; i < labels.length; i++) { for (let i = 0; i < labels.length; i++) {
if (labels[i].length > longest.length) if (labels[i].length > longest.length)
@@ -34,12 +34,12 @@ Item {
readonly property var matchLabels: ({ readonly property var matchLabels: ({
"appId": I18n.tr("App ID"), "appId": I18n.tr("App ID"),
"title": I18n.tr("Title"), "title": I18n.tr("Title"),
"isFloating": I18n.tr("Is Floating"), "isFloating": I18n.tr("Floating"),
"isActive": I18n.tr("Is Active"), "isActive": I18n.tr("Active"),
"isFocused": I18n.tr("Is Focused"), "isFocused": I18n.tr("Focused"),
"isActiveInColumn": I18n.tr("Active In Column"), "isActiveInColumn": I18n.tr("Active in Column"),
"isWindowCastTarget": I18n.tr("Cast Target"), "isWindowCastTarget": I18n.tr("Cast Target"),
"isUrgent": I18n.tr("Is Urgent"), "isUrgent": I18n.tr("Urgent"),
"atStartup": I18n.tr("At Startup"), "atStartup": I18n.tr("At Startup"),
"xwayland": I18n.tr("XWayland"), "xwayland": I18n.tr("XWayland"),
"fullscreen": I18n.tr("Fullscreen"), "fullscreen": I18n.tr("Fullscreen"),
@@ -64,7 +64,7 @@ Item {
continue; continue;
const label = labels[k] || k; const label = labels[k] || k;
if (typeof v === "boolean") if (typeof v === "boolean")
out.push(label + ": " + (v ? I18n.tr("yes") : I18n.tr("no"))); out.push(label + ": " + (v ? I18n.tr("Yes") : I18n.tr("No")));
else else
out.push(label + ": " + v); out.push(label + ": " + v);
} }
@@ -699,7 +699,7 @@ Item {
return Object.keys(a).filter(k => a[k] !== undefined && a[k] !== null && a[k] !== "").map(k => { return Object.keys(a).filter(k => a[k] !== undefined && a[k] !== null && a[k] !== "").map(k => {
const val = a[k]; const val = a[k];
if (typeof val === "boolean") if (typeof val === "boolean")
return val ? (labels[k] || k) : (labels[k] || k) + ": " + I18n.tr("off"); return val ? (labels[k] || k) : (labels[k] || k) + ": " + I18n.tr("Off");
return (labels[k] || k) + ": " + val; return (labels[k] || k) + ": " + val;
}); });
} }
@@ -952,7 +952,7 @@ Item {
parts.push("title: " + m.title); parts.push("title: " + m.title);
const base = parts.length > 0 ? parts.join(" · ") : I18n.tr("No match criteria"); const base = parts.length > 0 ? parts.join(" · ") : I18n.tr("No match criteria");
const count = root.matchesOf(externalCard.modelData).length; const count = root.matchesOf(externalCard.modelData).length;
return count > 1 ? I18n.tr("%1 (+%2 more)").arg(base).arg(count - 1) : base; return count > 1 ? I18n.tr("%1 (+%2 more)").arg(base).arg(count - 1) : base;
} }
font.pixelSize: Theme.fontSizeSmall font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText color: Theme.surfaceVariantText
@@ -976,7 +976,7 @@ Item {
return Object.keys(a).filter(k => a[k] !== undefined && a[k] !== null && a[k] !== "").map(k => { return Object.keys(a).filter(k => a[k] !== undefined && a[k] !== null && a[k] !== "").map(k => {
const val = a[k]; const val = a[k];
if (typeof val === "boolean") if (typeof val === "boolean")
return val ? (labels[k] || k) : (labels[k] || k) + ": " + I18n.tr("off"); return val ? (labels[k] || k) : (labels[k] || k) + ": " + I18n.tr("Off");
return (labels[k] || k) + ": " + val; return (labels[k] || k) + ": " + val;
}); });
} }
+1 -1
View File
@@ -218,7 +218,7 @@ Singleton {
// Aggregated battery status // Aggregated battery status
readonly property string batteryStatus: { readonly property string batteryStatus: {
if (!batteryAvailable) { if (!batteryAvailable) {
return I18n.tr("No Battery", "battery status"); return I18n.tr("No battery", "battery status");
} }
const targetBatteries = stateKnownBatteries.length > 0 ? stateKnownBatteries : batteries; const targetBatteries = stateKnownBatteries.length > 0 ? stateKnownBatteries : batteries;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -2756,20 +2756,20 @@
"background", "background",
"blur", "blur",
"colors", "colors",
"compositor",
"does",
"effect",
"frosted", "frosted",
"glass", "glass",
"look", "look",
"newer",
"quickshell",
"requires",
"scheme", "scheme",
"style", "style",
"support",
"theme", "theme",
"transparency", "transparency"
"version"
], ],
"icon": "blur_on", "icon": "blur_on",
"description": "Requires a newer version of Quickshell" "description": "Your compositor does not support background blur (ext-background-effect-v1)"
}, },
{ {
"section": "barElevationEnabled", "section": "barElevationEnabled",
@@ -7749,5 +7749,17 @@
"users" "users"
], ],
"icon": "manage_accounts" "icon": "manage_accounts"
},
{
"section": "_tab_36",
"label": "Autostart Apps",
"tabIndex": 36,
"category": "Settings",
"keywords": [
"apps",
"autostart",
"settings"
],
"icon": "line_start"
} }
] ]
File diff suppressed because it is too large Load Diff