[feature request] Define a dbus handler that can execute any command (including those that are not registered with girara_inputbar_command_add)
In config.c
(link to specific lines), I've noticed that there are some commands that are defined to be evaluted in the input bar.
This makes it possible to call those commands using the ExecuteCommand
handler. For example, I can show the document info in a Zathura instance by executing the following command in a terminal.
dbus-send --type="method_call" --dest=org.pwmt.zathura.PID-25400 /org/pwmt/zathura org.pwmt.zathura.ExecuteCommand string:"info"
There are some commands which can't be executed through ExecuteCommand
since an attempt to do that results in Zathura showing Not a valid command: <<command>>
.
I propose that all commands are available to be called through Dbus. I believe this would be beneficial for users since users would have more options to control Zathura through Dbus. Personally, I would like to execute the commands for navigation (e.g. navigate next
, navigate previous
, scroll up
, scroll left
), so that I can move through Zathura from Emacs without leaving the buffer where I'm editing text.
Currently, Zathura commands that can be called through the DBus handler ExecuteCommand
are those that are defined using girara_inputbar_command_add
, so if we plan to add all commands, we would need to add as much girara_inputbar_command_add
lines as the number of commands. I believe a more convenient way to do this is to define a handler in dbus-interface.c
that can evaluate absolutely any Zathura shortcut function. It would behave as ExecuteCommand
, but the difference is that commmands needn't to be registered through girara_inputbar_command_add
.