zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #05027
Re: Zim plugins: Terminal
Hmm, it seems like the signature of feed_child changed between versions.
I created a new branch which tries to address this issue.
see
https://github.com/datenwurm/zim-plugin-terminal/tree/001-vte_terminal_feed_child_type_error
Hope this helps!
Thanks for your suggestions:
* display the current path in the title
I've looked into this but this would require quite a few code changes.
If you want to implement this checkout
https://github.com/Guake/guake/blob/master/guake/terminal.py
* a keyboard shortcut to close and (re)open the terminal window and to
switch focus to/from the terminal window
I've looked into this but very few zim plugins use custom shortcuts and
there is always the chance that the defined shortcuts are getting into
conflict with others.
If you want to implement this checkout the following code snippet:
from zim.actions import toggle_action
class TerminalPluginWidget(...):
@toggle_action(_('Terminal'), accelerator="F7", menuhits='view') # T:
def toggle_show_terminal(self, active):
# Code to focus terminal
On Sat, Oct 31, 2020 at 7:34 PM Johan Vromans <jvromans@xxxxxxxxxxx> wrote:
> On Sat, 31 Oct 2020 18:42:43 +0100, Thomas Engel <realdatenwurm@xxxxxxxxx>
> wrote:
>
> > Are there any errors when running zim in debug-mode (zim --debug)?
>
> There seems to be something wrong with line 186.
>
> self.terminalview.feed_child(CLEAR_COMMAND, len(CLEAR_COMMAND))
>
> TypeError: Vte.Terminal.feed_child() takes exactly 2 arguments (3 given)
>
> When I remove the 2nd arg, which should be legal, it yields:
>
> TypeError: Item 0: Must be number, not str
>
> I can't explain...
>
> When I uncomment the line I do indeed get the terminal window and
> everything seems to function fine.
>
> Suggestions:
>
> - display the current path in the title (it now reads "Terminal", not very
> useful).
>
> - a keyboard shortcut to close and (re)open the terminal window
>
> - a keyboard shortcut to switch focus to/from the terminal window
>
> Good job!
>
> -- Johan
>
> _______________________________________________
> Mailing list: https://launchpad.net/~zim-wiki
> Post to : zim-wiki@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help : https://help.launchpad.net/ListHelp
>
References