albertlauncher / albert

A fast and flexible keyboard launcher
https://albertlauncher.github.io
Other
7.24k stars 304 forks source link

Tuning file search results to exclude pycache (or other cache) files #1234

Closed kskollepara closed 1 year ago

kskollepara commented 1 year ago

Description

When I search for a python script, albert shows me the corresponding __pycache__ file and not the python script file. See the screenshot below. image image

Expected behavior

I would like to be able to search the python file. In the above example, I expect custom_functions.py to appear in search results.

Steps to reproduce

Not sure how I can provide further info on reproducing this bug.

Source

Repository: http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_22.04 Running on Ubuntu 22.04

Debug output

``` (albert:114470): Gtk-WARNING **: 10:31:05.423: Theme parsing error: gtk-main.css:8:31: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version (albert:114470): Gtk-WARNING **: 10:31:05.423: Theme parsing error: gtk-main.css:268:18: 'background-color' is not a valid color name Albert version: 0.20.13 Build date: Apr 24 2023 09:58:35 Qt version: 6.2.4 Build ABI: x86_64-little_endian-lp64 Arch (build/current): x86_64/x86_64 Kernel (type/version): linux/5.19.0-41-generic OS: Ubuntu 22.04.2 LTS OS (type/version): ubuntu/22.04 $QT_QPA_PLATFORMTHEME: Platform name: xcb Font: Ubuntu,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1 Binary location: /usr/bin/albert $PWD: /home/kiran $SHELL: /bin/bash $LANG: en_US.UTF-8 Language: English Locale: en_US $XDG_SESSION_TYPE: x11 $XDG_CURRENT_DESKTOP: ubuntu:GNOME $DESKTOP_SESSION: ubuntu $XDG_SESSION_DESKTOP: ubuntu Icon theme: Yaru 10:31:05 [crit:albert] Application has not been terminated graciously 10:31:05 [debg:albert] Checking for a running instance… 10:31:05 [info:albert] There is another instance of albert running. ```
ManuelSchneid3r commented 1 year ago

Maybe you mixed up pyc and py in the mimedilters. Did you really want to get pyc results? I'll close this since for now this is a support question.

This is a bug tracker. For support join one of the community chats.

kskollepara commented 1 year ago

No, I don't want pyc results. I didn't change anything related to mime filters (don't even know how to).

I will refer to community chats, thank you

ManuelSchneid3r commented 1 year ago

You should probably check your files plugin settings.

kskollepara commented 1 year ago

Okay, I added python type to the mime filter and added pyc to the ignored patterns. Now it works, and does not pollute results with pyc files.

It's still weird that I experience this problem for files in that directory, I had been looking up python files at other paths without any problems.

Anyway, Thanks a lot