! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Automatically select last used app
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-appfinder
Component:
General

Comments

Description Nicolas Michel 2012-09-07 09:33:51 CEST
Hello,

There is a feature I like in gnome-shell (not sufficient to stay there - I'm using XFCE) and so I'd like to see it in xfce :
In gnome-shell, when you go to the "activities" (pressing the "Super" key or put the mouse in the top left corner) you can start typing something and like appfinder it search through ".desktop" and displays the matching list. What is cool is it selects automatically the last launched app regarding to the same results.

Here is a relevant example of its benefit:
I'm using guake as terminal so I can make it full screen and switch easilly with my more traditional desktop workflow (net surfing, document writing ...).
When typing "gua" in the search box of the xfce4-appfinder (without the --collapsed switch - so I get the full gui)  there are 2 results :
- Guake Preferences
- Guake Terminal

Of course the one I want to launch is "Guake Terminal", not the Preferences. With gnome-shell, the first time I had to click on the Guake Terminal to launch it. Every further times, I only had to :
1) push on the "Super" key going to the activities
2) type "gua"
3) press enter

To do the same with the application finder :
1) push on the "Super" key (or the default binding alt-F3 - don't matter)
2) type guake
3) press enter (the it gives the focus on the search result list)
4) press the down arrow key (to select guake terminal)
5) press enter

Of course I could use the mouse and double click on the item I want but my purpose is to not use the mouse as you can do with the gnome-shell "activities" feature.

Of course I now added the guake app at the session start to it loads automatically into the background and I only have to press my binding key (F12) to make it foreground. But it was an exemple here to highlight the feature of the gnome-shell activities.

So it would be like a smart autocompletion ;)
Comment 1 Andre Miranda editbugs 2019-05-16 03:56:14 CEST
*** Bug 9450 has been marked as a duplicate of this bug. ***
Comment 2 Andre Miranda editbugs 2019-05-16 04:01:45 CEST
FWIW, with appfinder 4.13+ you don't need to press enter twice, text matching and sorting improved a lot, but it still misses this smartness to sort results based on usage history.
Xfce 4.14 is right around the corner, I hope to work on this next cycle, but patches are more than welcome.
Comment 3 Mahmoud Khalil 2020-02-12 15:21:28 CET
Hi, I'm interested in working on this, so maybe anyone could guide me?

What I have in mind is mapping the number of usages to each .desktop item, or to each item in the tree model, and then start sorting based on that.

I haven't completely read the whole code base of appfinder yet, so any guidance or mentoring would be really appreciated.
Comment 4 Andre Miranda editbugs 2020-02-12 18:46:52 CET
Hi Mahmoud,
I think "frecency" (google it) is more convenient for users because apps that were used a lot in the past will stay at top for a long time.

First try to compile, make small modifications and check if the works before going for the real deal.
Well, I can't say much about the code, basically you'll have to extend xfce_appfinder_window_sort_items in a way that takes into account the frecency instead of alphabetical order. Actually, I think it makes sense to write another function have this feature as optional.

If you need more help, please contact me at #xfce-dev.
Comment 5 Git Bot editbugs 2020-05-22 05:10:42 CEST
Mahmoud Khalil referenced this bugreport in commit ddea0a250d36b66942ff514d8ca2c2b3557eaa5b

Sort by frecency (Bug #9265)

https://gitlab.xfce.org/xfce/xfce4-appfinder/commit/ddea0a250d36b66942ff514d8ca2c2b3557eaa5b
Comment 6 Andre Miranda editbugs 2020-05-22 05:14:13 CEST
Finally merged, this will be available in xfce4-appfinder 4.16, thanks a lot Mahmoud!

Bug #9265

Reported by:
Nicolas Michel
Reported on: 2012-09-07
Last modified on: 2020-05-22
Duplicates (1):

People

Assignee:
Nick Schermer
CC List:
3 users

Version

Version:
4.14.0

Attachments

Additional information