summaryrefslogtreecommitdiffstats
path: root/src/Pager/Types.hs
blob: a2ea5aac72b17eeda91ee0c9236995fb9a95c6ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{-# LANGUAGE TemplateHaskell #-}
module Pager.Types where

import Data.Text (Text)
import Scanner (Scan)


data Action
  = None
  | FocusWorkspace Text

data Command =
  ViewWorkspace |
  ShiftWindowToWorkspace Int |
  ShiftWindowToAndViewWorkspace Int

data Event =
    EResize Int Int |
    EScan Scan |
    EShutdown

data Geometry = Geometry
  { geometry_x :: Int
  , geometry_y :: Int
  , geometry_width :: Int
  , geometry_height :: Int
  }

data Window = Window
  { window_id :: Int
  , window_title :: Text
  , window_geometry :: Geometry
  , window_focused :: Bool
  , window_urgent :: Bool
  }

data Workspace = Workspace
  { workspace_geometry :: Geometry
  , workspace_focused :: Bool
  , workspace_name :: Text
  , workspace_windows :: [Window] -- sorted by z-order, earlier windows overlap later ones
  }