hyprshell_windows_lib/
global.rs1use adw::gtk::{ApplicationWindow, Button, FlowBox};
2use core_lib::{Active, ClientId, HyprlandData, MonitorId, WorkspaceId};
3use std::collections::HashMap;
4
5#[derive(Debug)]
6pub struct WindowsOverviewData {
7 pub config: WindowsOverviewConfig,
8 pub window_list: HashMap<ApplicationWindow, WindowsOverviewMonitorData>,
9 pub active: Active,
10 pub initial_active: Active,
11 pub hypr_data: HyprlandData,
12}
13
14#[allow(clippy::struct_excessive_bools)]
15#[derive(Debug)]
16pub struct WindowsOverviewConfig {
17 pub items_per_row: u8,
18 pub scale: f64,
19 pub filter_current_workspace: bool,
20 pub filter_current_monitor: bool,
21 pub filter_same_class: bool,
22}
23
24#[derive(Debug)]
25pub struct WindowsSwitchData {
26 pub config: WindowsSwitchConfig,
27 pub window: ApplicationWindow,
28 pub main_flow: FlowBox,
29 pub workspaces: HashMap<WorkspaceId, Button>,
30 pub clients: HashMap<ClientId, Button>,
31 pub active: Active,
32 pub hypr_data: HyprlandData,
33}
34
35#[allow(clippy::struct_excessive_bools)]
36#[derive(Debug)]
37pub struct WindowsSwitchConfig {
38 pub items_per_row: u8,
39 pub scale: f64,
40 pub filter_current_workspace: bool,
41 pub filter_current_monitor: bool,
42 pub filter_same_class: bool,
43 pub switch_workspaces: bool,
44}
45
46#[derive(Debug)]
47pub struct WindowsOverviewMonitorData {
48 pub id: MonitorId,
49 pub workspaces_flow: FlowBox,
50 pub workspaces: HashMap<WorkspaceId, adw::gtk::Box>,
51 pub clients: HashMap<ClientId, Button>,
52}
53
54impl WindowsOverviewMonitorData {
55 pub fn new(id: MonitorId, workspaces_flow: FlowBox) -> Self {
56 Self {
57 id,
58 workspaces_flow,
59 workspaces: HashMap::new(),
60 clients: HashMap::new(),
61 }
62 }
63}