September 4th, 2009 By: Daniel
Whenever I find myself typing the same thing over and over again, I have to come up with some way to avoid the repetition. And one thing I do a lot is fill out web forms that require things like credit card numbers and unique email addresses. For a while I tried using Parcellite (a clipboard manager) but it wasn’t really designed for what I wanted to use it for. Finally with the inspiration of this thread I was able to cobble together a solution that does just what I want.
First I created a snippets directory and filled it with files that contained the text to insert or scripts to generate the desired text:
First I created a snippets directory and filled it with files that contained the text to insert or scripts to generate the desired text:
Then I put this little script in ~/bin:
And then I mapped that script to a handy key combination in compiz. So now whenever I need a test credit card number, phone number, or email address I can just do c, type the first few characters to select the right snippet, hit return and it gets pasted in to whatever I’m working on.
Notes and caveats:
- I had to aptitude install some packages to get dmenu and xdotool to work.
- dmenu is ugly and has no mouse support.
- Pasting into vim has occasional issues.
No comments:
Post a Comment