make name the core block info

This commit is contained in:
2026-07-12 18:19:41 +02:00
parent f5e1ba1104
commit 9a7710d675
7 changed files with 43 additions and 9 deletions
+3 -3
View File
@@ -109,7 +109,7 @@ private struct DimensionWrapper: Decodable {
styles: nil
)
let config = PHConfig(theme: "default", window: "default", blocks: nil, env: nil, monitors: nil)
let blocks = try PHBlock.load(from: "[[block]]\ncommand = \"echo x\"")
let blocks = try PHBlock.load(from: "[[block]]\nname = \"x\"\ncommand = \"echo x\"")
let controller = BarController(config: config, screen: screen, theme: theme, blocks: blocks, debug: false)
let frame = BarWindow.computeFrame(from: controller)
@@ -128,7 +128,7 @@ private struct DimensionWrapper: Decodable {
styles: nil
)
let config = PHConfig(theme: "default", window: "abs", blocks: nil, env: nil, monitors: nil)
let blocks = try PHBlock.load(from: "[[block]]\ncommand = \"echo x\"")
let blocks = try PHBlock.load(from: "[[block]]\nname = \"x\"\ncommand = \"echo x\"")
let controller = BarController(config: config, screen: screen, theme: theme, blocks: blocks, debug: false)
let frame = BarWindow.computeFrame(from: controller)
@@ -155,7 +155,7 @@ private struct DimensionWrapper: Decodable {
styles: nil
)
let config = PHConfig(theme: "default", window: "inset", blocks: nil, env: nil, monitors: nil)
let blocks = try PHBlock.load(from: "[[block]]\ncommand = \"echo x\"")
let blocks = try PHBlock.load(from: "[[block]]\nname = \"x\"\ncommand = \"echo x\"")
let controller = BarController(config: config, screen: screen, theme: theme, blocks: blocks, debug: false)
let frame = BarWindow.computeFrame(from: controller)