@@ -64,6 +64,7 @@ fn main() { |
| 64 | 64 | state.borders.unfocused_color = |
| 65 | 65 | tarmac::platform::border::BorderColor::from_hex(&config.settings.border_color_unfocused); |
| 66 | 66 | state.borders.radius = config.settings.border_radius; |
| 67 | + state.borders.spawn(); |
| 67 | 68 | state.discover_and_observe(); |
| 68 | 69 | WM_STATE.with(|s| *s.borrow_mut() = Some(state)); |
| 69 | 70 | |
@@ -280,7 +281,7 @@ fn generate_default_config_if_missing(path: &std::path::Path) { |
| 280 | 281 | if let Some(parent) = path.parent() { |
| 281 | 282 | let _ = std::fs::create_dir_all(parent); |
| 282 | 283 | } |
| 283 | | - let default_config = r#"-- tarmac configuration |
| 284 | + let default_config = r##"-- tarmac configuration |
| 284 | 285 | -- ~/.config/tarmac/init.lua |
| 285 | 286 | |
| 286 | 287 | -- Modifier key: "command", "option", or "control" |
@@ -359,9 +360,15 @@ gar.bind("mod+shift+r", "reload") |
| 359 | 360 | -- gar.rule({ app_name = "System Settings" }, { floating = true }) |
| 360 | 361 | -- gar.rule({ app_name = "Safari" }, { workspace = 2 }) |
| 361 | 362 | |
| 363 | +-- Borders (set border_width > 0 to enable ers) |
| 364 | +gar.set("border_width", "4") |
| 365 | +gar.set("border_color_focused", "#5294e2") |
| 366 | +gar.set("border_color_unfocused", "#59595980") |
| 367 | +gar.set("border_radius", "10") |
| 368 | + |
| 362 | 369 | -- Autostart (uncomment as needed) |
| 363 | 370 | -- gar.exec_once("sketchybar") |
| 364 | | -"#; |
| 371 | +"##; |
| 365 | 372 | |
| 366 | 373 | match std::fs::write(path, default_config) { |
| 367 | 374 | Ok(()) => tracing::info!(?path, "generated default config"), |
@@ -774,6 +781,7 @@ fn reload_config() { |
| 774 | 781 | &config.settings.border_color_unfocused, |
| 775 | 782 | ); |
| 776 | 783 | state.borders.radius = config.settings.border_radius; |
| 784 | + state.borders.restart(); |
| 777 | 785 | // Reapply layout with potentially new gap/bar values |
| 778 | 786 | state.apply_layout(); |
| 779 | 787 | state.update_borders(); |