Biont / sway-launcher-desktop

TUI Application launcher with Desktop Entry support. Made for SwayWM, but runs anywhere
GNU General Public License v3.0
606 stars 28 forks source link

Old entries are still displayed #46

Closed p00f closed 2 years ago

p00f commented 3 years ago

Desktop entries from uninstalled programs are still displayed in the list, even after running sudo update-desktop-databse and deleting the launcher history file

For example, I get an entry for Covergrid here even after uninstalling it image On the top you can see that sed can't find the desktop file, which probably comes from here https://github.com/Biont/sway-launcher-desktop/blob/74ed255995f5935804235daf731471a422d44075/sway-launcher-desktop.sh#L68

Can I clear it somehow?

p00f commented 3 years ago

@Biont where are the desktop entries taken from?

Biont commented 3 years ago

I find it very strange that this happens after deleting the history file - because that's the only place where stale entries would be coming from. Are you using multiple providers and maybe missed one @p00f ?

The entries are read using this configuration: ${XDG_DATA_HOME-${HOME}/.local/share}:${XDG_DATA_DIRS-/usr/local/share:/usr/share} There's no cache or anything at play here.

p00f commented 3 years ago

I add HIST_FILE="~/.local/state/swaylauncher_history" as an argument (because latest XDG spec says logs and history go to $XDG_STATE_HOME which is ~/.local/state). When I removed that argument and let it save in ~/.cache, the stale entries are gone.

Also earlier there were some duplicate entries, ~which are gone now too~

maricn commented 2 years ago

fixed by https://github.com/Biont/sway-launcher-desktop/pull/58 - you can sway-launcher-desktop purge since v1.6.0

Biont commented 2 years ago

Thanks @maricn

I tracked the useful remark about XDG_STATE_HOME in #65 so we can close here