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