mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
refactor(include): Add missing layout include & normalize config banners
- The Display config process ID now includes the output name in NiriService
This commit is contained in:
@@ -347,14 +347,13 @@ Item {
|
||||
|
||||
readonly property var status: KeybindsService.dmsStatus
|
||||
readonly property bool showLegacy: KeybindsService.readOnly
|
||||
readonly property bool showError: !showLegacy && !status.included && status.exists
|
||||
readonly property bool showWarning: !showLegacy && status.included && status.overriddenBy > 0
|
||||
readonly property bool showSetup: !showLegacy && !status.exists
|
||||
readonly property bool showSetup: !showLegacy && !status.included
|
||||
|
||||
color: (showLegacy || showError || showWarning || showSetup) ? Theme.withAlpha(Theme.primary, 0.15) : Theme.withAlpha(Theme.primary, 0)
|
||||
border.color: (showLegacy || showError || showWarning || showSetup) ? Theme.withAlpha(Theme.primary, 0.3) : Theme.withAlpha(Theme.primary, 0)
|
||||
color: (showLegacy || showWarning || showSetup) ? Theme.withAlpha(Theme.primary, 0.15) : Theme.withAlpha(Theme.primary, 0)
|
||||
border.color: (showLegacy || showWarning || showSetup) ? Theme.withAlpha(Theme.primary, 0.3) : Theme.withAlpha(Theme.primary, 0)
|
||||
border.width: 1
|
||||
visible: (showLegacy || showError || showWarning || showSetup) && !KeybindsService.loading
|
||||
visible: (showLegacy || showWarning || showSetup) && !KeybindsService.loading
|
||||
|
||||
Column {
|
||||
id: warningSection
|
||||
@@ -384,8 +383,6 @@ Item {
|
||||
return I18n.tr("Hyprland conf mode");
|
||||
if (warningBox.showSetup)
|
||||
return I18n.tr("First Time Setup");
|
||||
if (warningBox.showError)
|
||||
return I18n.tr("Binds Include Missing");
|
||||
if (warningBox.showWarning)
|
||||
return I18n.tr("Possible Override Conflicts");
|
||||
return "";
|
||||
@@ -393,17 +390,16 @@ Item {
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
font.weight: Font.Medium
|
||||
color: Theme.primary
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
}
|
||||
|
||||
StyledText {
|
||||
readonly property string bindsFile: KeybindsService.currentProvider === "niri" ? "dms/binds.kdl" : KeybindsService.currentProvider === "hyprland" ? "dms/binds-user.lua" : "dms/binds.conf"
|
||||
text: {
|
||||
if (warningBox.showLegacy)
|
||||
return I18n.tr("This install is still using hyprland.conf. Run dms setup to migrate before editing shortcuts in Settings.");
|
||||
if (warningBox.showSetup)
|
||||
return I18n.tr("Click 'Setup' to create %1 and add include to config.").arg(bindsFile);
|
||||
if (warningBox.showError)
|
||||
return I18n.tr("%1 exists but is not included in config. Custom keybinds will not work until this is fixed.").arg(bindsFile);
|
||||
return I18n.tr("Click 'Setup' to create %1 and add include to your compositor config.").arg("dms/binds");
|
||||
if (warningBox.showWarning) {
|
||||
const count = warningBox.status.overriddenBy;
|
||||
return I18n.ntr("%1 DMS bind may be overridden by config binds that come after the include.", "%1 DMS binds may be overridden by config binds that come after the include.", count).arg(count);
|
||||
@@ -420,14 +416,8 @@ Item {
|
||||
|
||||
DankButton {
|
||||
id: fixButton
|
||||
visible: !warningBox.showLegacy && (warningBox.showError || warningBox.showSetup)
|
||||
text: {
|
||||
if (KeybindsService.fixing)
|
||||
return I18n.tr("Fixing...");
|
||||
if (warningBox.showSetup)
|
||||
return I18n.tr("Setup");
|
||||
return I18n.tr("Fix Now");
|
||||
}
|
||||
visible: !warningBox.showLegacy && warningBox.showSetup
|
||||
text: KeybindsService.fixing ? I18n.tr("Setting up...") : I18n.tr("Setup")
|
||||
backgroundColor: Theme.primary
|
||||
textColor: Theme.primaryText
|
||||
enabled: !KeybindsService.fixing
|
||||
|
||||
Reference in New Issue
Block a user