From f6219ce3c2d5b2f4aede4b81271bf86ef360472f Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 22:45:08 +0200 Subject: [PATCH 1/3] rename Overview to BackgroundOverlay everywhere --- README.md | 9 +++++++-- modules/{Overview.qml => BackgroundOverlay.qml} | 2 +- modules/qmldir | 2 +- shell.qml | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) rename modules/{Overview.qml => BackgroundOverlay.qml} (95%) diff --git a/README.md b/README.md index eb76b0f..0a3d7e4 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ exactly when you should be most suspicious. - Per-module accent colors that change based on state, with animated transitions. Battery blinks when critical and sends desktop notifications, because the robot cares about your hardware more than you do - Audio visualizer on album art via cava — because the robot watched too many r/unixporn posts and couldn't help itself - Screen corner rounding — tiny overlay windows with quarter-circle masks, click-transparent, configurable via `screenRadius`. The gradient top border curves to match, because the robot has opinions about pixel alignment -- Overview widgets — clock and date rendered on the background layer, visible in the gaps between workspace rows when niri's overview is active. Always there, never in the way +- Background overlay — clock and date rendered on the background layer, visible behind windows and in niri overview gaps. Always there, never in the way - Weather via wttrbar with configurable arguments and rich HTML tooltips - Power menu with lock, suspend, logout, reboot, shutdown - Event-driven updates for network, bluetooth, and power profiles via dbus-monitor/nmcli monitor — no more 5-second polling lag @@ -83,6 +83,11 @@ programs.nova-shell.modules = { # modules with extra config backlight.step = 2; # brightness adjustment % weather.args = [ "--nerd" "--location" "Berlin" ]; # wttrbar arguments + temperature.warm = 55; # °C threshold for warm color + temperature.hot = 75; # °C threshold for hot color + battery.warning = 30; # % for warning notification + battery.critical = 10; # % for critical blink + notification + cpu.interval = 2000; # polling interval in ms }; ``` @@ -130,7 +135,7 @@ Full list of theme keys and their defaults: | `barSpacing` | `12` | Gap between modules (px) | | `moduleSpacing` | `4` | Icon-to-label gap within a module (px) | | `radius` | `4` | Corner radius for flyouts and menus (px) | -| `screenRadius` | `20` | Screen corner rounding, 0 to disable (px) | +| `screenRadius` | `15` | Screen corner rounding, 0 to disable (px) | ### Systemd service diff --git a/modules/Overview.qml b/modules/BackgroundOverlay.qml similarity index 95% rename from modules/Overview.qml rename to modules/BackgroundOverlay.qml index b3f1a9b..b0bfa74 100644 --- a/modules/Overview.qml +++ b/modules/BackgroundOverlay.qml @@ -12,7 +12,7 @@ PanelWindow { WlrLayershell.layer: WlrLayer.Background WlrLayershell.exclusiveZone: -1 - WlrLayershell.namespace: "nova-overview" + WlrLayershell.namespace: "nova-background-overlay" mask: Region {} anchors.top: true diff --git a/modules/qmldir b/modules/qmldir index fe1da51..e7839d9 100644 --- a/modules/qmldir +++ b/modules/qmldir @@ -33,4 +33,4 @@ IdleInhibitor 1.0 IdleInhibitor.qml Notifications 1.0 Notifications.qml Power 1.0 Power.qml Privacy 1.0 Privacy.qml -Overview 1.0 Overview.qml +BackgroundOverlay 1.0 BackgroundOverlay.qml diff --git a/shell.qml b/shell.qml index 1cf07ef..ec9007c 100644 --- a/shell.qml +++ b/shell.qml @@ -19,7 +19,7 @@ ShellRoot { screen: scope.modelData } - Overview { + BackgroundOverlay { screen: scope.modelData } From 0eeaa6a04ee83c29f9f50d8b7997825640739e4f Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 22:47:33 +0200 Subject: [PATCH 2/3] window title: grow to content, spacer takes remaining space --- modules/Bar.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Bar.qml b/modules/Bar.qml index 80e4361..e400ba7 100644 --- a/modules/Bar.qml +++ b/modules/Bar.qml @@ -138,12 +138,12 @@ PanelWindow { } } M.BarGroup { - Layout.fillWidth: true clip: true M.WindowTitle { visible: M.Modules.windowTitle.enable } } + Item { Layout.fillWidth: true } } // ---- right ---- From 974613d811ce2d417e1e3971fc4afead44c2f97a Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 22:48:04 +0200 Subject: [PATCH 3/3] nix fmt --- modules/Bar.qml | 4 +++- modules/BarGroup.qml | 10 +++------- modules/Mpris.qml | 15 ++++++--------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/modules/Bar.qml b/modules/Bar.qml index e400ba7..fd59ff4 100644 --- a/modules/Bar.qml +++ b/modules/Bar.qml @@ -143,7 +143,9 @@ PanelWindow { visible: M.Modules.windowTitle.enable } } - Item { Layout.fillWidth: true } + Item { + Layout.fillWidth: true + } } // ---- right ---- diff --git a/modules/BarGroup.qml b/modules/BarGroup.qml index 13a6251..7c6cfe0 100644 --- a/modules/BarGroup.qml +++ b/modules/BarGroup.qml @@ -11,16 +11,12 @@ Item { // Auto-compute border color from top gradient position (base0C → base09) readonly property real _posFrac: { const scr = QsWindow.window?.screen; - if (!scr) return 0.5; + if (!scr) + return 0.5; const gx = mapToGlobal(width / 2, 0).x - scr.x; return Math.max(0, Math.min(1, gx / scr.width)); } - property color borderColor: Qt.rgba( - M.Theme.base0C.r + (M.Theme.base09.r - M.Theme.base0C.r) * _posFrac, - M.Theme.base0C.g + (M.Theme.base09.g - M.Theme.base0C.g) * _posFrac, - M.Theme.base0C.b + (M.Theme.base09.b - M.Theme.base0C.b) * _posFrac, - 1 - ) + property color borderColor: Qt.rgba(M.Theme.base0C.r + (M.Theme.base09.r - M.Theme.base0C.r) * _posFrac, M.Theme.base0C.g + (M.Theme.base09.g - M.Theme.base0C.g) * _posFrac, M.Theme.base0C.b + (M.Theme.base09.b - M.Theme.base0C.b) * _posFrac, 1) visible: row.visibleChildren.length > 0 diff --git a/modules/Mpris.qml b/modules/Mpris.qml index 4754ac5..ada56ba 100644 --- a/modules/Mpris.qml +++ b/modules/Mpris.qml @@ -39,14 +39,7 @@ M.BarSection { Process { id: cavaProc running: root.playing - command: ["sh", "-c", - "cfg=$(mktemp /tmp/nova-cava-XXXXXX.conf);" + - "cat > \"$cfg\" << 'CAVAEOF'\n" + - "[general]\nbars=16\nframerate=30\n[output]\nmethod=raw\nraw_target=/dev/stdout\ndata_format=ascii\nascii_max_range=100\n" + - "CAVAEOF\n" + - "trap 'rm -f \"$cfg\"' EXIT;" + - "exec cava -p \"$cfg\"" - ] + command: ["sh", "-c", "cfg=$(mktemp /tmp/nova-cava-XXXXXX.conf);" + "cat > \"$cfg\" << 'CAVAEOF'\n" + "[general]\nbars=16\nframerate=30\n[output]\nmethod=raw\nraw_target=/dev/stdout\ndata_format=ascii\nascii_max_range=100\n" + "CAVAEOF\n" + "trap 'rm -f \"$cfg\"' EXIT;" + "exec cava -p \"$cfg\""] stdout: SplitParser { splitMarker: "\n" onRead: line => { @@ -250,7 +243,11 @@ M.BarSection { color: M.Theme.base0E radius: 1 - Behavior on height { NumberAnimation { duration: 50 } } + Behavior on height { + NumberAnimation { + duration: 50 + } + } } } }