diff options
author | Guillermo Ramos | 2019-06-27 11:46:06 +0200 |
---|---|---|
committer | Guillermo Ramos | 2019-06-27 11:46:06 +0200 |
commit | 5517d4df87a3e36bfe4534abcb3382bee56349ce (patch) | |
tree | 121a41ff84765f44914e0bfa653d2c8782f4e3c5 /witch.ml | |
parent | e47d86c4cbe5c23c9cbca13841a134021cf1bb4a (diff) | |
download | witch-5517d4df87a3e36bfe4534abcb3382bee56349ce.tar.gz |
Small fixes
Diffstat (limited to 'witch.ml')
-rw-r--r-- | witch.ml | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -89,13 +89,13 @@ module type WM = sig val search_by_title : string -> wid list val title : wid -> string val focus : wid -> unit - val send : wid -> string -> unit + val send : string -> unit end module Xdotool : WM = struct type wid = string let cmdname = "xdotool" - let delay = "200" + let delay = "50" let pp_wid = identity @@ -105,7 +105,7 @@ module Xdotool : WM = struct List.hd (launch_get_output [|cmdname; "getwindowname"; wid|]) let focus wid = launch [|cmdname; "windowfocus"; wid|] - let send wid keys = + let send keys = launch [|cmdname; "type"; "--delay"; delay; keys|] end @@ -187,7 +187,6 @@ module Comm (Wm : WM) = struct print_string "> "; flush_all (); let cmd = read_line () in - sleep 1; let f = match exn_to_opt (fun () -> Ms.find cmd cmdmap) with | None -> print_endline ("Unknown cmd '" ^ cmd ^ "'"); identity | Some f -> f in @@ -195,8 +194,6 @@ module Comm (Wm : WM) = struct | Key -> print_string "> "; in loop st0 - - (* Wm.send wid "awdwawdwawdwawdwa" *) end module MyWm = Xdotool |