summaryrefslogtreecommitdiffstats
path: root/workspace.txt
blob: d9b3020a98451f0a985a0ba84f4760ce7f73953e (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
# https://raw.githubusercontent.com/swaywm/sway/master/sway/sway-ipc.7.scd


node types:

  root
    output
      workspace
        floating_con
        con



GET /workspaces :: [Workspace] (in arbitrary order; may be reordered)
GET /workspace/:name/windows :: [Window]  (in decreasing z-order)
GET /workspace/:name/window/:id :: Window
GET /workspace/:name/window/:id/title :: Text
...



data Workspace = Workspace
  { workspace_geometry :: Geometry -- sway:rect xmonad:screen-geometry?
  , workspace_focused :: Bool -- sway:focused xmonad:?
  , workspace_name :: Text  -- sway:name xmonad:tag -- uniqueness is assumed
  , workspace_windows :: [Window] -- sway:nodes xmonad:[focus]<>down<>up
  }

data Window = Window
  { window_id :: Int -- sway:id xmonad:id -- uniqueness is assumed
  , window_title :: Text -- sway:name xmonad:title
  , window_geometry :: Geometry -- sway:rect
  , window_focused :: Bool -- sway:focused xmonad:implict-from-workspace
  , window_urgent :: Bool -- sway:urgent xmonad:urgent
  }