Page 1 of 1

How to make keyboard shortcut Strg-f open pFind in Rox filer?

Posted: Wed Aug 14, 2024 3:40 pm
by RSH

I know, there's a file /root/.config/rox.sourceforge.net/ROX-Filer/menus2 that contains a line

Code: Select all

; (gtk_accel_path "<filer>/Datei/Suchen" "<Primary>f")

.
But I can't see an option to execute a program from within this file.

So, how do I make Rox filer open pFind on keyboard shortcut Strg-f to search the current directory?


Re: How to make keyboard shortcut Strg-f open pFind in Rox filer?

Posted: Wed Aug 14, 2024 7:28 pm
by HerrBert

IIRC, to use keyboard shortcuts in ROX-Filer you have to enable it in gtk configuration:

rox-tastaturkürzel.jpg
rox-tastaturkürzel.jpg (69.51 KiB) Viewed 527 times

Re: How to make keyboard shortcut Strg-f open pFind in Rox filer?

Posted: Fri Aug 16, 2024 2:38 am
by williams2

You can drag an app like pfind
( /usr/share/applications/pfind.desktop )
to the Rox Pinboard (desktop)
to create a clickable icon.

You can right click the desktop icon
to configure a keyboard shortcut.

Or you can configure a KB shortcut in JWM,
using JWMdesk.


Re: How to make keyboard shortcut Strg-f open pFind in Rox filer?

Posted: Fri Aug 16, 2024 6:37 am
by MochiMoppel
RSH wrote: Wed Aug 14, 2024 3:40 pm

So, how do I make Rox filer open pFind on keyboard shortcut Strg-f to search the current directory?

You can't. It's not possible. Use the right-click menu instead.

@williams2 A desktop icon wouldn't do what the OP asks for but at least it could be useful if the user could drag a directory from ROX-Filer onto the icon. Ideally pFind would accept the directory as "Current directory" and would limit searches to this directory.
However pFind has a bug in the if condition, starting in line 542:

Code: Select all

if [ `echo $1 | grep d` ]; then
	export OVERRIDE_SEARCHPATHS="$2"
	export CURDIR="$2"
	export RADIOBUTTON_PATH_PUPPY=false
	export RADIOBUTTON_PATH_MNT=false
	export RADIOBUTTON_PATH_CURRENT=true
	export RADIOBUTTON_PATH_ALL=false
	shift
fi

When dragging a directory onto the pfind.desktop icon, the directory is treated as argument $1, and in the "best" case pFind ignores it. If however the directory has a 'd' i its name the condition will match, RADIOBUTTON_PATH_CURRENT becomes true and CURDIR, which was $PWD, now becomes empty, causing a search in the whole filesystem. Quite the opposite of what was intended.

For this to work, the .desktop file needs a -d option (Exec=pfind -d), just like pFinds AppRun ("/usr/local/pfind/pfind" -d "$@").
But then just clicking on the desktop icon would match the if condition with an empty $2. Again the worst case.

I've given up on pFind because there is so much to fix. Instead of the sloppy if condition maybe something like this would be better:

Code: Select all

if [[ $1 = -d && -d $2 ]]; then