diff --git a/core/internal/windowrules/providers/niri_parser.go b/core/internal/windowrules/providers/niri_parser.go index 2f991cee..5bb5ec45 100644 --- a/core/internal/windowrules/providers/niri_parser.go +++ b/core/internal/windowrules/providers/niri_parser.go @@ -864,10 +864,12 @@ func (p *NiriWritableProvider) formatRule(rule windowrules.WindowRule) string { func formatSizeProperty(name, value string) string { parts := strings.SplitN(value, " ", 2) - if len(parts) != 2 { - return fmt.Sprintf(" %s { }", name) + if len(parts) == 2 { + return fmt.Sprintf(" %s { %s %s; }", name, parts[0], parts[1]) } - sizeType := parts[0] - sizeValue := parts[1] - return fmt.Sprintf(" %s { %s %s; }", name, sizeType, sizeValue) + // Bare number without type prefix — default to "fixed" + if _, err := strconv.Atoi(value); err == nil { + return fmt.Sprintf(" %s { fixed %s; }", name, value) + } + return fmt.Sprintf(" %s { }", name) } diff --git a/quickshell/Modals/WindowRuleModal.qml b/quickshell/Modals/WindowRuleModal.qml index 7490333c..6c9583aa 100644 --- a/quickshell/Modals/WindowRuleModal.qml +++ b/quickshell/Modals/WindowRuleModal.qml @@ -631,7 +631,7 @@ FloatingWindow { anchors.fill: parent font.pixelSize: Theme.fontSizeSmall textColor: Theme.surfaceText - placeholderText: "fixed 800" + placeholderText: "800" backgroundColor: "transparent" enabled: root.visible } @@ -658,7 +658,7 @@ FloatingWindow { anchors.fill: parent font.pixelSize: Theme.fontSizeSmall textColor: Theme.surfaceText - placeholderText: "fixed 600" + placeholderText: "600" backgroundColor: "transparent" enabled: root.visible }