Coder Social home page Coder Social logo

Categories not showing about nwg-drawer HOT 14 CLOSED

nwg-piotr avatar nwg-piotr commented on August 19, 2024
Categories not showing

from nwg-drawer.

Comments (14)

nwg-piotr avatar nwg-piotr commented on August 19, 2024

I checked /usr/share/nwg-drawer and I do have all the necessary files in the desktop-directories directory. On both machines, I use default settings without any modification.

That's where we take category names from. We would need a special program version to debug this issue, and you'd have to build it locally, run, and show me the output. Would you like me to prepare it?

I also noticed that on thinkcentre, nwg-drawer automatically copies drawer.css to my local config folder, even after I try to delete it. This was not the case on my thinkpad.

It's expected behavior. It should always be like this. You can edit the file, but if you delete it, it'll be re-created.

from nwg-drawer.

phdpe avatar phdpe commented on August 19, 2024

We would need a special program version to debug this issue, and you'd have to build it locally, run, and show me the output. Would you like me to prepare it?

Yes, please. I can try to build locally.

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

OK. Now you need to:

  1. Kill your running instance of nwg-drawer, if any: pkill -f nwg-drawer
  2. Clone the check69 branch: git clone https://github.com/nwg-piotr/nwg-drawer.git -b check69
  3. cd nwg-drawer
  4. Run the program w/ the debug flag: go run . -d (it may take quite a lot of time at the first try)
  5. Show me the terminal output.

from nwg-drawer.

phdpe avatar phdpe commented on August 19, 2024

here it is... it seems like (1) even though it says it was copying the css file to local folder, it did not (2) it was looking for dir files in local folder as well.

# github.com/gotk3/gotk3/glib
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_source’:
cgo-gcc-prolog:71:2: warning: ‘g_binding_get_source’ is deprecated: Use 'g_binding_dup_source' instead [-Wdeprecated-declarations]
In file included from /usr/include/glib-2.0/glib-object.h:22,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from ../../go/pkg/mod/github.com/gotk3/[email protected]/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:113:23: note: declared here
  113 | GObject *             g_binding_get_source          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_target’:
cgo-gcc-prolog:107:2: warning: ‘g_binding_get_target’ is deprecated: Use 'g_binding_dup_target' instead [-Wdeprecated-declarations]
/usr/include/glib-2.0/gobject/gbinding.h:117:23: note: declared here
  117 | GObject *             g_binding_get_target          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
time="2022-09-20T17:15:31-04:00" level=info msg="term: xterm-256color"
time="2022-09-20T17:15:31-04:00" level=info msg="lang: en_US"
time="2022-09-20T17:15:31-04:00" level=info msg="Config dir: /home/user/.config/nwg-drawer"
time="2022-09-20T17:15:31-04:00" level=info msg="Copying file: /home/user/.config/nwg-drawer/drawer.css"
time="2022-09-20T17:15:31-04:00" level=info msg="Found 0 pinned items"
time="2022-09-20T17:15:31-04:00" level=debug msg="Desktop dirs location: /home/user/.local/share/nwg-drawer/desktop-directories"
time="2022-09-20T17:15:31-04:00" level=error msg="Couldn't open /home/user/.local/share/nwg-drawer/desktop-directories/utility.directory"
time="2022-09-20T17:15:31-04:00" level=error msg="Couldn't open /home/user/.local/share/nwg-drawer/desktop-directories/development.directory"
time="2022-09-20T17:15:31-04:00" level=error msg="Couldn't open /home/user/.local/share/nwg-drawer/desktop-directories/game.directory"
time="2022-09-20T17:15:31-04:00" level=error msg="Couldn't open /home/user/.local/share/nwg-drawer/desktop-directories/graphics.directory"
time="2022-09-20T17:15:31-04:00" level=error msg="Couldn't open /home/user/.local/share/nwg-drawer/desktop-directories/internet-and-network.directory"
time="2022-09-20T17:15:31-04:00" level=error msg="Couldn't open /home/user/.local/share/nwg-drawer/desktop-directories/office.directory"
time="2022-09-20T17:15:31-04:00" level=error msg="Couldn't open /home/user/.local/share/nwg-drawer/desktop-directories/audio-video.directory"
time="2022-09-20T17:15:31-04:00" level=error msg="Couldn't open /home/user/.local/share/nwg-drawer/desktop-directories/system-tools.directory"
time="2022-09-20T17:15:31-04:00" level=error msg="Couldn't open /home/user/.local/share/nwg-drawer/desktop-directories/other.directory"
time="2022-09-20T17:15:31-04:00" level=info msg="Found 31 desktop files"
time="2022-09-20T17:15:31-04:00" level=info msg="Skipped 0 duplicates; 7 .desktop entries hidden by \"NoDisplay=true\""
time="2022-09-20T17:15:31-04:00" level=info msg="/home/user/.config/nwg-drawer/preferred-apps.json file not found"
time="2022-09-20T17:15:31-04:00" level=info msg="/home/user/.config/nwg-drawer/excluded-dirs file not found"
time="2022-09-20T17:15:32-04:00" level=info msg="Preferring dark theme variants"
time="2022-09-20T17:15:32-04:00" level=error msg="ERROR: /home/user/.config/nwg-drawer/drawer.css css file not found or erroneous. Using GTK styling."
time="2022-09-20T17:15:32-04:00" level=error msg="<broken file>:1:0Failed to import: Error opening file /home/user/.config/nwg-drawer/drawer.css: No such file or directory"
time="2022-09-20T17:15:32-04:00" level=warning msg="/home/user/.config/user-dirs.dirs file not found, using defaults"

** (nwg-drawer:93344): WARNING **: 17:15:32.043: gtk-layer-shell v0.7.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
time="2022-09-20T17:15:32-04:00" level=info msg="UI created in 89 ms. Thank you for your patience."

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

At 1: It works on my side.
At 2: When installed as the AUR package, it should be on its place. See PKGBUILD.

from nwg-drawer.

phdpe avatar phdpe commented on August 19, 2024

PKGBUILD showed it only copies to /usr/share/nwg-drawer/, am I correct? It doesnt copy all the dir files to .local/share/nwg-drawer. Once I copy all the directory files to ~/.local/share/nwg-drawer, all the dirs show up correctly.

package() {
  cd "$srcdir"
  install -d "$pkgdir"/usr/share/"$pkgname"/desktop-directories
  install -Dm644 -t "$pkgdir"/usr/share/"$pkgname"/desktop-directories/ "$pkgname"-"$pkgver"/desktop-directories/*
  install -Dm644 -t "$pkgdir"/usr/share/"$pkgname" "$pkgname"-"$pkgver"/drawer.css
  install -Dm755 -t "$pkgdir"/usr/bin "$pkgname"-"$pkgver"/bin/"$pkgname"
}

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

We don't use .local/share/nwg-drawer.

func setUpCategories() {
	p := filepath.Join(getDataHome(), "nwg-drawer/desktop-directories")

and getDataHome() is as below:

func getDataHome() string {
	if os.Getenv("XDG_DATA_HOME") != "" {
		return os.Getenv("XDG_DATA_HOME")
	}
	return "/usr/share/"
}

Anything wrong with your XDG_DATA_HOME environment variable?

[edit] Hmmm, it seems it should point to $HOME/.local/share...

from nwg-drawer.

phdpe avatar phdpe commented on August 19, 2024

it's set to $HOME/.local/share in fish. It seems like your code is pointing to local.

set -gx XDG_DATA_HOME $HOME/.local/share

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

It seems the code is wrong, and it shows up if you set the XDG_DATA_HOME variable.

from nwg-drawer.

phdpe avatar phdpe commented on August 19, 2024

[edit] Hmmm, it seems it should point to $HOME/.local/share...

Yeah... since I have it set, it's looking for XDG_DATA_HOME rather than XDG_DATA_DIRS

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Alright, I'll give up on the env variable, and use the usr/share/ path. What do you think?

from nwg-drawer.

phdpe avatar phdpe commented on August 19, 2024

Alright, I'll give up on the env variable, and use the usr/share/ path. What do you think?

I cant make the decision as I have next to zero development experience. I'm just glad to find a bug!

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

I need a coffee to make a decision. One way or another, thanks for pointing out the bug.

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

It should be alright now, or at least I hope so. Can't release yet, as I fixed some deprecation errors, that appeared in Go 1.19. It needs a couple of days of testing.

from nwg-drawer.

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.