diff --git a/README.md b/README.md index 6e5ad80..7324f9a 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,8 @@ programs.nova-shell.modules = { # modules with extra config backlight.step = 2; # brightness adjustment % - weather.args = [ "--nerd" "--location" "Berlin" ]; # wttrbar arguments + weather.args = [ "--nerd" "--location" "Berlin" ]; # wttrbar arguments + weather.interval = 3600000; # refresh interval in ms (default 1h) temperature.warm = 55; # °C threshold for warm color temperature.hot = 75; # °C threshold for hot color battery.warning = 30; # % for warning notification diff --git a/modules/Bar.qml b/modules/Bar.qml index 26c70a7..2f8402b 100644 --- a/modules/Bar.qml +++ b/modules/Bar.qml @@ -142,9 +142,12 @@ PanelWindow { } } M.BarGroup { + id: _windowTitleGroup Layout.minimumWidth: 0 clip: true - M.WindowTitle {} + M.WindowTitle { + width: Math.max(0, centerSection.x - _windowTitleGroup.x - 2 * M.Theme.groupPadding - M.Theme.groupSpacing) + } } Item { Layout.fillWidth: true diff --git a/modules/WindowTitle.qml b/modules/WindowTitle.qml index 7c9a897..4280dc6 100644 --- a/modules/WindowTitle.qml +++ b/modules/WindowTitle.qml @@ -7,7 +7,7 @@ import "." as M M.BarSection { id: root spacing: M.Theme.moduleSpacing - visible: M.Modules.windowTitle.enable && M.NiriIpc.available && M.NiriIpc.focusedTitle !== "" + visible: M.Modules.windowTitle.enable && M.NiriIpc.focusedTitle !== "" tooltip: M.NiriIpc.focusedAppId ? M.NiriIpc.focusedAppId + "\n" + M.NiriIpc.focusedTitle : M.NiriIpc.focusedTitle @@ -19,6 +19,7 @@ M.BarSection { } IconImage { + id: _icon visible: root._iconSource !== "" source: root._iconSource implicitSize: M.Theme.fontSize + 2 @@ -35,5 +36,6 @@ M.BarSection { color: root.accentColor elide: Text.ElideRight anchors.verticalCenter: parent.verticalCenter + width: root.width - (_icon.visible ? _icon.width + root.spacing : 0) } }