How to take Screenshot of Website with Vimperator

94 Views Asked by At

I use vim and Firefox + Vimperator, now I want to be able to create page screenshots with Vimperator by a single Vimperator command to create a thumbnail of websites later.

Vimperator seems to not have a screenshot functionality. I know you can do it through the debugger or the developer Toolbar using Shift+F2 to open it and then screenshot --fullpage and I even can open the Toolbar using Vimperator, but I didn't manage to input something there.

I tried with the sequence <S-F2><CR>screenshot, but after the Toolbar loads, Vimperator already ran all following commands (screenshot) as a sequence in normal mode.

How can I achieve taking website screenshots using a single Vimperator command?


Update:

I experimented a bit more and almost achieved a workaround using this sequence:

<S-F2>:js liberator.sleep(300)<CR><S-F2>screenshot --fullpage<CR> where

  • <S-F2> opens the Developer Toolbar
  • :js liberator.sleep(300)<CR> take a break to let firefox load the toolbar (could probably be lower than 300ms)
  • <S-F2> to again gain focus of the toolbar
  • screenshot --fullpage just input in the toolbar

The problem that occurs now is that I can not 'enter' with <CR> as the toolbar does not recognize any input. Only if I manually enter a whitespace it realizes the screenshot input and lets me 'send' the command.

Of course I am also open to other workarounds not using the Developer Toolbar.

0

There are 0 best solutions below