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

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
RSH
Posts: 102
Joined: Tue May 28, 2024 7:33 pm
Location: Kassel
Has thanked: 49 times
Been thanked: 36 times
Contact:

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

Post 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?

My OS: ArtStudio64 - a Woof-CE built from Bionic 18.04
Running in RAM only, no save file, no save folder
www.youtube.com/@RainerSteffenHain

HerrBert
Posts: 350
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 18 times
Been thanked: 119 times

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

Post 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 524 times
williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

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

Post 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.

User avatar
MochiMoppel
Posts: 1196
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 20 times
Been thanked: 415 times

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

Post 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
Post Reply

Return to “Users”