Files
amane-config/src/main.rs
T

62 lines
1.8 KiB
Rust

mod ai;
mod art;
mod config;
mod control;
mod edge;
mod glyph;
mod home;
mod hypr;
mod island;
mod last;
mod map;
mod notices;
mod parse;
mod pods;
mod prompt;
mod settings;
mod sound;
mod spectrum;
mod stats;
mod surface;
mod system;
mod png;
mod theme;
mod tray;
mod workspaces;
use amane::{App, Palette, Service};
fn main() {
// config.toml first: the font is chosen once, before anything draws
config::load();
// the card's glow follows the cover art, which art::Art copies to this one path
Palette::write().open(&art::palette_file(), 8);
// one island on every monitor (the card opens only on one of them), a workspace pill top left
// and the control centre top right on each; all three hidden until the pointer rests on the
// top edge (edge.rs), whose strip comes first so the bar lies over it. the config window
// (settings.rs) is a normal window, opened on demand
App::new()
.font(&config::appearance::font::family())
.ipc("island", island::command)
.ipc("control", control::command)
.ipc("tray", tray::command)
.ipc("config", settings::command)
.ipc("pods", pods::command)
.window_per_monitor(edge::spacer)
.window_per_monitor(edge::view)
.window_per_monitor(island::view)
// the small pills beside the island, and their cards in the middle
.window_per_monitor(pods::row_view)
.window_per_monitor(pods::card_view)
.window_per_monitor(workspaces::view)
.window_per_monitor(control::view)
.window_per_monitor(control::menu_view)
.window_per_monitor(tray::menu_view)
// last, so the popups lie over the control centre
.window_per_monitor(notices::popups)
.window_per_monitor(prompt::view)
.run();
}