defaults.rs (1357B)
1 use crate::client::Client; 2 use crate::decoration::ColorScheme; 3 use crate::decoration::Decoration; 4 use crate::decoration::Frame; 5 use crate::layout::Layout; 6 use crate::zone::Zone; 7 8 use winsys::geometry::Dim; 9 use winsys::geometry::Extents; 10 use winsys::geometry::Padding; 11 12 #[macro_export] 13 macro_rules! WM_NAME ( 14 () => { "wzrd" }; 15 ); 16 17 pub const WORKSPACE_NAMES: [&str; 10] = ["main", "web", "term", "4", "5", "6", "7", "8", "9", "10"]; 18 19 impl Client { 20 pub const MIN_CLIENT_DIM: Dim = Dim { 21 w: 75, 22 h: 50, 23 }; 24 25 pub const PREFERRED_CLIENT_DIM: Dim = Dim { 26 w: 480, 27 h: 260, 28 }; 29 } 30 31 impl Decoration { 32 pub const NO_DECORATION: Self = Self { 33 border: None, 34 frame: None, 35 }; 36 37 pub const FREE_DECORATION: Self = Self { 38 border: None, 39 frame: Some(Frame { 40 extents: Extents { 41 left: 3, 42 right: 1, 43 top: 1, 44 bottom: 1, 45 }, 46 colors: ColorScheme::DEFAULT, 47 }), 48 }; 49 } 50 51 impl Layout { 52 pub const MAX_MAIN_COUNT: u32 = 15; 53 pub const MAX_GAP_SIZE: u32 = 300; 54 pub const MAX_MARGIN: Padding = Padding { 55 left: 700, 56 right: 700, 57 top: 400, 58 bottom: 400, 59 }; 60 } 61 62 impl Zone { 63 pub const MIN_ZONE_DIM: Dim = Dim { 64 w: 25, 65 h: 25, 66 }; 67 }