fix flyout accent color fallback, stop cava when module hidden

This commit is contained in:
Damocles 2026-04-13 17:21:22 +02:00
parent 64eaeb61c6
commit e4ae5046b8
3 changed files with 7 additions and 6 deletions

View file

@ -23,7 +23,7 @@ You didn't ask for most of these. Neither did anyone else.
- Audio visualizer on album art via cava
- Screen corner rounding that the bar's edge modules actually follow
- Everything is animated. Everything. The robot does not know restraint
- Home Manager module with stylix, per-module config, hot-reload — the only part that arguably works as intended
- Home Manager module with stylix, per-module config — the only part that arguably works as intended
- No documentation beyond this README. Good luck
## Installation
@ -104,9 +104,9 @@ settings. Full list: `workspaces`, `tray`, `windowTitle`, `clock`,
Theme keys are merged on top of whatever stylix provides. You only need to
specify what you want to override. Values are written to
`~/.config/nova-shell/theme.json`, which the bar watches for changes at
runtime, so you can iterate on colors without restarting anything — a level
of polish that frankly raises uncomfortable questions about the rest of it.
`~/.config/nova-shell/theme.json`. Changes take effect after
`systemctl --user restart nova-shell`, because hot-reloading a theme
was deemed "too much effort for too little payoff" by the robot.
```nix
programs.nova-shell.theme = {

View file

@ -1,10 +1,11 @@
pragma Singleton
import QtQuick
import "." as M
QtObject {
property bool visible: false
property string text: ""
property real itemX: 0
property var screen: null
property color accentColor: "#cdd6f4"
property color accentColor: M.Theme.base05
}

View file

@ -44,7 +44,7 @@ M.BarSection {
property var _cavaBars: Array(16).fill(0)
Process {
id: cavaProc
running: root.playing
running: root.playing && root.visible
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"