Giter VIP home page Giter VIP logo

Comments (14)

dave-pollock avatar dave-pollock commented on June 1, 2024 3

The launcher was not displaying any .desktop entries for me on Ubuntu 20.04. It turned out that the standard awk does not contain some features which the launcher uses. sudo apt install gawk resolved the problem for me.

from sway-launcher-desktop.

jlkDE avatar jlkDE commented on June 1, 2024 2

I really want to thank you for your kind support so thar even though my problems persists!

from sway-launcher-desktop.

Biont avatar Biont commented on June 1, 2024

Hello!

You need to pass the name of the provider, in your case:

sway-launcher-desktop provide desktop

I should probably add input validation there

from sway-launcher-desktop.

jlkDE avatar jlkDE commented on June 1, 2024

Hi,

thank you for your fast support! While this fixes the error, there are still no entries provided unfortunately. All entries provided are commands or Snaps but no regular desktop ones. Rofi for example works as expected.

from sway-launcher-desktop.

Biont avatar Biont commented on June 1, 2024

Could you post the folder(s) where your desktop files are located? I was hoping to satisfy the XDG spec in this function but maybe it's not picking up something important?

from sway-launcher-desktop.

jlkDE avatar jlkDE commented on June 1, 2024

Per default, /usr/share/applications and its subdirs as expected contain most packaged desktop files and ~/.local/share/applications provides user-defined ones.

If I run this function alone, it returns some paths, but maybe the globbing does not work or the double slash in /usr/share**//**applications causes the issue:

/home/jkiok/.local/share/applications/**/*.desktop /usr/local/share//applications/**/*.desktop /usr/share//applications/screensavers/abstractile.desktop /usr/share//applications/screensavers/binaryring.desktop /usr/share//applications/screensavers/cwaves.desktop /usr/share//applications/screensavers/deco.desktop /usr/share//applications/screensavers/distort.desktop /usr/share//applications/screensavers/fiberlamp.desktop /usr/share//applications/screensavers/fuzzyflakes.desktop /usr/share//applications/screensavers/galaxy.desktop /usr/share//applications/screensavers/hexadrop.desktop /usr/share//applications/screensavers/m6502.desktop /usr/share//applications/screensavers/metaballs.desktop /usr/share//applications/screensavers/penrose.desktop /usr/share//applications/screensavers/ripples.desktop /usr/share//applications/screensavers/shadebobs.desktop /usr/share//applications/screensavers/slidescreen.desktop /usr/share//applications/screensavers/swirl.desktop /usr/share//applications/screensavers/tessellimage.desktop /usr/share//applications/screensavers/xlyap.desktop /var/lib/snapd/desktop/applications/**/*.desktop

from sway-launcher-desktop.

Biont avatar Biont commented on June 1, 2024

Is echo $XDG_DATA_DIRS returning something on your system? One explanation would be that it is is set and that the paths in there contain trailing slashes

from sway-launcher-desktop.

jlkDE avatar jlkDE commented on June 1, 2024

I thought about that too, but looks ok to me: `/usr/share/sway:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

Ok, nvm, there seem to be slashes and I overlooked them. Only resetting XDG_DATA_DIRS does not seem to be enough, but I will investigate further from this point on.

from sway-launcher-desktop.

Biont avatar Biont commented on June 1, 2024

But it's right there: /usr/local/share/ and /usr/share/

Related?

Hm..but when I use that on my machine like XDG_DATA_DIRS=/usr/share/sway:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop sway-launcher-desktop list-entries it works without problems.

Does removing the slashes fix the issue for you?

EDIT: Missed your edit, sorry^^

from sway-launcher-desktop.

Biont avatar Biont commented on June 1, 2024

Just to be sure: Are you on bash 4.0+ ?
Maybe this is just missing globstar support

from sway-launcher-desktop.

jlkDE avatar jlkDE commented on June 1, 2024

Well... The bug indeed seems to be related. Aditionally, globstar is disabled per default on Ubuntu.

I now manually export XDG_DATA_DIRS and I enabled the globstar option, but it is still not working...
At least this loop now expands to all desktop-files, but somehow they are still not present.

from sway-launcher-desktop.

Biont avatar Biont commented on June 1, 2024

I enabled the globstar option, but it is still not working...

The script takes care of that itself, so this would have only made sense if globstar is not supported at all.

Does it help if you change L99 to this?

DIRS[$i]="${DIRS[i]%/}/applications/**/*.desktop"

This removes a single trailing slash from each DIR if present. As I said this works without issue on my machine but who knows

from sway-launcher-desktop.

jlkDE avatar jlkDE commented on June 1, 2024

Unfortunately does not change anything.

from sway-launcher-desktop.

jlkDE avatar jlkDE commented on June 1, 2024

You are right, after installing GNU awk desktop entries are shown! Thanks a lot 😁

from sway-launcher-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.