Experimental code for controlling Plover via websocket. Ugh, I keep wanting to modify upstream stuff, so you might need to get these working too. I don’t know if anything will work for anyone other than me. But hey, putting it here just in case!
- plover-always-command branch of https://github.com/sachac/plover/tree/plover-always-command
- sacha branch of https://github.com/sachac/plover_websocket_server, can be installed with
plover -s plover_plugins install -e path/to/directory
)
Be sure to enable the Plover websocket server from Plover > Configure > Plugins
.
This is the hydra I’m trying in my config so that I can press <f6> <f6>
twice to toggle Plover:
(defhydra my/plover (:exit t)
("<f1>" plover-websocket-connect "Open websocket")
("<f2>" plover-websocket-add-translation "Add translation")
("<f3>" plover-websocket-lookup "Lookup")
("<f4>" plover-websocket-configure "Configure")
("<f5>" plover-websocket-focus "Focus")
("<f6>" plover-websocket-toggle-plover "Toggle Plover")
("<f7>" plover-websocket-quit "Quit"))
(global-set-key (kbd "<f6>") #'my/plover/body)
;; Might try this too
(global-set-key (kbd "C-;") #'plover-websocket-toggle-plover)
Other things that can work, although they still need a little fiddling:
(plover-websocket-send :add_translation '(:stroke "UT" :translation "Hello world"))
(plover-websocket-send :look_up "SKP-")
(plover-websocket-send :get_translation "because")
- My e-mail address: sacha@sachachua.com
- Site: https://sachachua.com