diff options
author | Thomas Letan <lthms@soap.coffee> | 2022-08-27 15:48:08 +0200 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2022-08-27 15:48:08 +0200 |
commit | 50e07034d9e7b431bef3086f55b0417767e3f5b5 (patch) | |
tree | 4052430a9b978f3f574afd8ce3e08f7ca03fdfcb | |
parent | Make spatialmsg send commands to spatial instead of just code (diff) |
Rename 'Spatial_sway_ipc' into 'Spatial_ipc'
-rw-r--r-- | bin/spatial/main.ml | 6 | ||||
-rw-r--r-- | bin/spatial/state.ml | 7 | ||||
-rw-r--r-- | bin/spatialmsg/main.ml | 2 | ||||
-rw-r--r-- | lib/spatial_ipc/dune (renamed from lib/spatial_sway_ipc/dune) | 2 | ||||
-rw-r--r-- | lib/spatial_ipc/spatial_ipc.ml (renamed from lib/spatial_sway_ipc/spatial_sway_ipc.ml) | 2 | ||||
-rw-r--r-- | lib/spatial_ipc/spatial_ipc.mli (renamed from lib/spatial_sway_ipc/spatial_sway_ipc.mli) | 0 |
6 files changed, 9 insertions, 10 deletions
diff --git a/bin/spatial/main.ml b/bin/spatial/main.ml index f0ed017..daee93f 100644 --- a/bin/spatial/main.ml +++ b/bin/spatial/main.ml @@ -1,6 +1,6 @@ open Sway_ipc_types -type input = From_sway of Event.t | From_client of Spatial_sway_ipc.socket +type input = From_sway of Event.t | From_client of Spatial_ipc.socket let workspace_handle (ev : Event.workspace_event) state = match ev.change with @@ -52,7 +52,7 @@ let event_handle ev state = | From_sway _ -> assert false | From_client socket -> ( let+ handle_res = - Spatial_sway_ipc.( + Spatial_ipc.( handle_next_command ~socket state { handler = State.client_command_handle }) in @@ -81,7 +81,7 @@ let merge_streams l = let main () = let open Lwt.Syntax in let* stream_sway = Sway_ipc.subscribe [ Window; Workspace ] in - let* stream_client = Spatial_sway_ipc.create_server () in + let* stream_client = Spatial_ipc.create_server () in let stream = merge_streams [ diff --git a/bin/spatial/state.ml b/bin/spatial/state.ml index 234efa1..f592b5b 100644 --- a/bin/spatial/state.ml +++ b/bin/spatial/state.ml @@ -132,11 +132,10 @@ let init default_full_view default_maximum_visible = let client_command_handle : type a. - state -> - a Spatial_sway_ipc.t -> - ((state * bool * int64 option) option * a) Lwt.t = + state -> a Spatial_ipc.t -> ((state * bool * int64 option) option * a) Lwt.t + = fun state cmd -> - let open Spatial_sway_ipc in + let open Spatial_ipc in Lwt.return @@ (match cmd with | Run_command cmd -> diff --git a/bin/spatialmsg/main.ml b/bin/spatialmsg/main.ml index 63d5d8c..e5357d6 100644 --- a/bin/spatialmsg/main.ml +++ b/bin/spatialmsg/main.ml @@ -1,4 +1,4 @@ -open Spatial_sway_ipc +open Spatial_ipc let () = let cmd = Sys.argv.(1) |> command_of_string_exn in diff --git a/lib/spatial_sway_ipc/dune b/lib/spatial_ipc/dune index 0203c64..fd055c2 100644 --- a/lib/spatial_sway_ipc/dune +++ b/lib/spatial_ipc/dune @@ -1,4 +1,4 @@ (library - (name spatial_sway_ipc) + (name spatial_ipc) (public_name spatial-sway.ipc) (libraries mltp-ipc)) diff --git a/lib/spatial_sway_ipc/spatial_sway_ipc.ml b/lib/spatial_ipc/spatial_ipc.ml index 1efb8a9..66444c9 100644 --- a/lib/spatial_sway_ipc/spatial_sway_ipc.ml +++ b/lib/spatial_ipc/spatial_ipc.ml @@ -57,7 +57,7 @@ let command_of_string str = let command_of_string_exn str = match command_of_string str with | Some x -> x - | None -> raise (Invalid_argument "Spatial_sway_ipc.command_of_string_exn") + | None -> raise (Invalid_argument "Spatial_ipc.command_of_string_exn") let command_to_string = function | Focus dir -> Format.sprintf "focus %s" (direction_to_string dir) diff --git a/lib/spatial_sway_ipc/spatial_sway_ipc.mli b/lib/spatial_ipc/spatial_ipc.mli index a99592f..a99592f 100644 --- a/lib/spatial_sway_ipc/spatial_sway_ipc.mli +++ b/lib/spatial_ipc/spatial_ipc.mli |