Bug 396325 - Allow separate launching of locate tool
Summary: Allow separate launching of locate tool
Status: REPORTED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: 2.7.0
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-08 23:21 UTC by dufferzafar
Modified: 2018-07-13 05:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dufferzafar 2018-07-08 23:21:07 UTC
One of the reasons I use Krusader is because of it's inbuilt locate search UI (brought by Ctrl+Shift+L by default.) 

It would be great if there were a way to launch Krusader directly in this mode.

So something like: "krusader --locate" could be run from any directory which will not show the main Krusader window, but only the Locate panel one.
Comment 1 Toni Asensi Esteve 2018-07-09 18:15:57 UTC
Dear Dufferzafar, adding features also involves writing and maintaining more source code in the future, writing and maintaining more documentation in the future, having more things to test and to take into account when developing Krusader in the future, etc.

I'm afraid that there are too few people wanting this feature, although probably an automation tool like Xdotool can be used to achieve this, and also using it is also be useful to many, many programs, not just Krusader, which is very beneficial! Sometimes those automating utilities save a lot of time!

If no developer added that new code to Krusader: to launch Krusader and simulate that you press Ctrl+Shift+L (to "locate"), I would execute:
    krusader & sleep 1s && xdotool key Ctrl+Shift+L
Does it work for you?
Comment 2 dufferzafar 2018-07-10 04:56:26 UTC
Hey Toni, I'm a dev myself, so I totally understand the debt that new features can create. And as you said, nobody else has asked for this. So this is certainly low priority.

I'd actually like to take a stab at it myself. I'll try to build Krusader from source and then work on this.

Do you have any ideas on HOW this can be implemented in code? Which file will involve most of the changes etc.

---

In the meanwhile, I've extended your xdotool approach to do this:

lokate() {
    krusader 2>/dev/null & sleep 1s && xdotool key Ctrl+Shift+L && xdotool type "$1"
}

I'll use the above function and see if it works for me.

---

Thanks a lot for taking the time to respond :)
Comment 3 Toni Asensi Esteve 2018-07-11 20:39:25 UTC
> Do you have any ideas on HOW this can be implemented in code? Which file will
> involve most of the changes etc.

I haven't worked with those sections of the source code of Krusader :-(
Comment 4 Nikita Melnichenko 2018-07-13 05:41:10 UTC
I think instead of "krusader --locate" it's better to refactor the GUI code, so that it could be built as a separate tool as well as bundled into Krusader.

(In reply to dufferzafar from comment #2)
> ... I'm a dev myself ...
> 
> I'd actually like to take a stab at it myself. I'll try to build Krusader
> from source and then work on this.

Feel free to try it out and submit a patch to https://phabricator.kde.org where we can review and iterate. For dev questions please use krusader-devel mailing list.