I recently migrated from win XP to #! linux and one of the programs I didn't want to live without was find and run robot. Well, after playing around for several evenings I now have FARR mostly set up to my liking:
- on first "pause" key-press after booting, FARR is loaded via WINE
- subsequent "pauses" summon and dismiss the FARR search window as expected
- the search window is (almost always) focused such that typing triggers searches as expected
- files on both my NTFS (windows) and EXT4 (linux) partition are found as expected
- windows .exe files start via WINE
- document types configured to launch via specific windows apps do so
- document types configured to launch via specific linux apps do so
- unspecified document types consult the linux file manager for a default linux app
- some bugs require workarounds (e.g., ordering searched folders by drag-and-drop does not work, but editing FindAndRunRobot.ini does work)
There were two main issues that required work on my part:
1st problem: WINE alone does not get “pause” to work. Solution: a linux script (I call it “farr.sh") is triggered by “pause” and sends another “pause” to FARR. The same script also focuses the window, and launches FARR in the first place. Here it is:
if [ -z "$(pgrep FindAndRunRobot)" ]
xdotool search --classname FindAndRunRobot key "Pause" search --name "Find And Run Robot 2" windowactivate --sync
Since crunchbang uses openbox as a window manager, the initial hotkey can be set up in ~/.config/openbox/rc.xml as follows:
2nd problem: FARR needs a custom document opener that can trigger both linux and WINE applications as needed. Solution: a windows batch file (which I call “bender.bat” after the wino robot in futurama). Since #! uses thunar as a file manager, thunar can be called to indirectly associate documents with linux applications. One could also bypass thunar and specify everything explicitly. Here is the batch script:
SET bar=goto :thunar
IF %foo:~-2%==.R SET bar=z:\media\third\testing\npp.6.5.minimalist\notepad++.exe "%1"
IF %foo:~-4%==.PDF SET bar=z:\media\third\testing\SumatraPDFPortable\SumatraPDFPortable.exe "%1"
winepath -u "%1" > %TEMP%\temp.txt
SET /P foo=< %TEMP%\temp.txt
SET foo=%foo: =\ %
\bin\sh -c "thunar %foo%"
I think the only part that needs to be customized is the section with if statements (one for each file type).
P.S.: Does anyone know how FARR could tell, without indexing, which files on a linux partition are executable (i.e. read the execute bit)?