Thursday 25 November 2010

Pager and menu button using dzen2

This is what they look like. They go nicely with tint2.




There are three scripts. One is combined, and the other two are just the menu and just the workspaces, so you can have them at different corners. They use xdotool to simulate the menu and change workspace button presses and should work under most environments (except probably compiz, because it's funny about virtual desktops).

Scripts here

You'll want to change the coordinates, the xdotool shortcuts and probably the colours. These are all at the top of the scripts.

Tuesday 9 November 2010

Quickly search several PDFs at once

Takes PDFs as arguments, and can be used with nautilus-actions or thunar's custom actions. The script uses grep and thus grep regex, but i've added easy conditional searching at the expense of some limitations regarding normal grep conditionals. You're presented with this when you run it, which just about covers things:

The search ignores case. Conditionals cannot be joined. Let me know if this is a problem.
Wildcards:
A single . represents any character, and an asterisk represents zero or more occurances of the preceeding character eg:
'c...h' will find catch, clash, cloth, coach etc.
'c.*h' will find caliph, cash, catch, cheesecloth etc.
Conditionals:
OR : '(this|that|the)' will show lines containing 'this', 'that', or 'the'.
AND : '(this&&that&&the)' will search for lines that contain 'this', 'that' and 'the'.
NOT : '(this!that)' will search for lines that contain 'this' but don't contain 'that'

The script can be downloaded here. You'll need pdftotext for this to work.