pop-os / launcher

Modular IPC-based desktop launcher service
Mozilla Public License 2.0
228 stars 47 forks source link

fix(launcher): Exclude GNOME Initial Setup #45

Closed mmstick closed 2 years ago

13r0ck commented 2 years ago

I am still seeing initial setup in 21.10

Screenshot from 2021-10-18 17-11-27

13r0ck commented 2 years ago

Initial setup no longer shows with latest commit.

Tested on 21.10 :+1: 21.04 :+1: 20.04 :+1:

jacobgkau commented 2 years ago

It looks like the gnome-initial-setup.desktop file already had NoDisplay=true set, but that wasn't being respected by the launcher because we only respect NoDisplay=true if OnlyShowIn is not set:

// And also avoid showing anything that's set as `NoDisplay`
if !only_show_in && entry.no_display() {
    continue;
}

Is this behavior correct? The spec doesn't seem to specify whether NoDisplay or OnlyShowIn should take precedence (probably because it doesn't make sense to OnlyShowIn something that's not supposed to display anywhere), but it seems like NoDisplay should mean no display.

(Hardcoding G-I-S like this PR does wouldn't be necessary if NoDisplay took precedence, if I'm understanding correctly.)

mmstick commented 2 years ago

Some desktop entries, such as gnome-control-center panels, also specify NoDisplay=true and have OnlyShowIn=GNOME set, but we do want them to display of course. I'm not 100% certain on the precise precedence either.

jacobgkau commented 2 years ago

Some desktop entries, such as gnome-control-center panels, also specify NoDisplay=true and have OnlyShowIn=GNOME set, but we do want them to display of course.

Ahh, that's why we did that, because we wanted them to show up as Launcher search results but not in the Applications menu. It's too bad there's not a SearchResultsOnly flag or something.

Since the Applications menu seems to handle those .desktop files separately (Settings panels are shown in their own section of search results), maybe it would make sense to separate Settings panels into a different Launcher plugin eventually. But it's probably not too big of a deal.