Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tofi-drun does not list .desktop-file-missing apps, including some GUI and console apps #184

Open
machitgarha opened this issue Aug 3, 2024 · 3 comments

Comments

@machitgarha
Copy link

First, thanks for the tool, I love high-performance stuff. :)

My problem is I cannot see some applications when I run tofi-drun, including GUI and console applications. The big example for the GUI ones is nm-connection-editor, which doesn't seem to have a .desktop file. Or even a better example: GNOME tweaks.

I think the solution would be to list console applications along. But they should be listed below desktop applications.

@machitgarha machitgarha changed the title tofi-drun does not list .desktop-file-missing applications, including some GUI applications tofi-drun does not list .desktop-file-missing apps, including some GUI and console apps Aug 4, 2024
@Spoljarevic
Copy link

Same, tried everything i could but in my case i still cant see Davinci Resolve, tho it is visible in rofi

@v1ctorio
Copy link

v1ctorio commented Nov 19, 2024

This is not a real fix for the bug and IDK why it's happening but to manually fix it you can just delete tofi's cache, it's located in plain text files on ~/.cache/tofi-<mode>, to delete it (and regen it) you just need to delete these files (rm ~/.cache/tofi-*).
tofi cache

@bigrand
Copy link

bigrand commented Dec 26, 2024

I've been debugging this, and I haven't found a problem with tofi.

I installed nm-connection-editor in Arch Linux, and it seems to create a .desktop file just fine in /usr/share/applications, and it appears in tofi as "Advanced Network Configuration."

Take in mind that some .desktop files have different names depending on the system's language. You can check what the name is by opening the .desktop file in a text editor and looking for the Name= key that matches your system's language.

Some entries will get filtered out when parsing the .desktop files depending on precedence. For example, if you have a .desktop file for Firefox in ~/.local/share/applications, that .desktop file will take priority over the .desktop file at /usr/share/applications. Removing the .desktop file at ~/.local/share/applications should make the /usr/share/applications .desktop file take the spot in tofi.

Also, some .desktop files have keys like NoDisplay= and Hidden=. If they are set to true, they won't be parsed into the tofi applications list. Other keys that may hide the application are NotShowIn= and OnlyShowIn=, which means that they would appear depending on the current desktop (set by the environment variable $XDG_CURRENT_DESKTOP, so make sure it's set correctly).

If somebody can't find their application, basically do the following:

  1. Go to /usr/share/applications/
  2. Find the .desktop file for your application
  3. Open the file and check for the Name= key given your system's language and make sure you are searching the application by its correct name. If the problem is still present,
  4. Copy it and paste it at ~/.local/usr/applications
  5. Open the new .desktop file in a text editor
  6. Check for NoDisplay=, Hidden=, OnlyShownIn=, NotShowIn= keys and remove them
  7. Delete tofi's drun mode cache: ~/.cache/tofi-drun

Also, you can add any application to tofi drun mode by just creating a .desktop file yourself at ~/.local/share/applications. All you need are Name= and Exec= keys.

For example,
~/.local/share/applications/test.desktop

[Desktop Entry]
Name=TestDesktopEntry
Exec=xfce4-about

For tofi-run mode, see #207 (comment).

So, I'm not sure if this is an actual problem. Nonetheless, if somebody could share an application that has this problem and share the package's name + .desktop file, I could look into the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants