nwg-piotr / nwg-dock

GTK3-based dock for sway
MIT License
173 stars 9 forks source link

No icons for workspace switcher and drawer #15

Closed Mrfiregem closed 2 years ago

Mrfiregem commented 3 years ago

Describe the bug When running nwg-dock, the icons for the ws and drawer aren't loaded, the two buttons become very thin, and do nothing when clicked.

To Reproduce Steps to reproduce the behavior:

  1. Download package from AUR or chaotic-aur
  2. Run nwg-dock

Expected behavior The svg icons installed with the program should be used, and the buttons should be functional.

Screenshot test (Ingore the styling since there's no css file. Issue even if copying over the default css file.)

Desktop (please complete the following information):

Additional context

Using auto-detected launcher command: 'nwg-drawer'
Copying file: /home/cheer/.config/nwg-dock/style.css
/home/cheer/.config/nwg-dock/style.css file not found, using GTK styling
(0x55980473d9a8,0xc000013ff0)
(0x55980473d9a8,0xc00027e080)

** (nwg-dock:758083): WARNING **: 21:24:55.737: gtk-layer-shell v0.6.0 may not work on GTK v3.24.30. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
refreshing...
(0x55980473d9a8,0xc000113e60)
(0x55980473d9a8,0xc000113ef0)
nwg-piotr commented 3 years ago

I'll be fixing another issue in this program tonight. Will take a look a this as well.

nwg-piotr commented 3 years ago

Well, I couldn't confirm. To reproduce the behaviour you described, I had to:

  1. uninstall the AUR package (/usr/share/nwg-drawer folder content is being removed;
  2. build and run the program as described in README, but without the step 4 (sudo make install), which copies files to their desired locations.

After proper package installation you should have the /usr/share/nwg-drawer/ folder with the files hotspot.css & style.css, and the images subfolder, containing 25 .svg files. Please check this path on your machine.

Mrfiregem commented 3 years ago

I assume you mean /usr/share/nwg-dock, but yes, all the files are there. I uninstalled dock and drawer and reinstalled dock after making sure there were no lingering folders. Here's my terminal output after cloning the repo and installing from source:

[πŸ—Έ nwg-dock]β€Ί make get
go get github.com/gotk3/gotk3
go: downloading github.com/gotk3/gotk3 v0.6.1
go get: upgraded github.com/gotk3/gotk3 v0.6.0 => v0.6.1
go get github.com/gotk3/gotk3/gdk
# github.com/gotk3/gotk3/glib
cgo-gcc-prolog: In function β€˜_cgo_26ff448d08b0_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/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:112:23: note: declared here
  112 | GObject *             g_binding_get_source          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function β€˜_cgo_26ff448d08b0_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]
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/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:116:23: note: declared here
  116 | GObject *             g_binding_get_target          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
go get github.com/gotk3/gotk3/glib
# github.com/gotk3/gotk3/glib
cgo-gcc-prolog: In function β€˜_cgo_26ff448d08b0_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/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:112:23: note: declared here
  112 | GObject *             g_binding_get_source          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function β€˜_cgo_26ff448d08b0_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]
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/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:116:23: note: declared here
  116 | GObject *             g_binding_get_target          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
go get github.com/dlasky/gotk3-layershell/layershell
go: downloading github.com/dlasky/gotk3-layershell v0.0.0-20210331230524-5cca0b819261
# github.com/gotk3/gotk3/glib
cgo-gcc-prolog: In function β€˜_cgo_26ff448d08b0_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/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:112:23: note: declared here
  112 | GObject *             g_binding_get_source          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function β€˜_cgo_26ff448d08b0_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]
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/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:116:23: note: declared here
  116 | GObject *             g_binding_get_target          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
go get github.com/joshuarubin/go-sway
go: downloading github.com/joshuarubin/go-sway v0.0.4
go: downloading github.com/joshuarubin/lifecycle v1.0.0
go: downloading go.uber.org/multierr v1.1.0
go: downloading go.uber.org/atomic v1.3.2
go: downloading golang.org/x/sync v0.0.0-20190412183630-56d357773e84
go get github.com/allan-simon/go-singleinstance
go: downloading github.com/allan-simon/go-singleinstance v0.0.0-20210120080615-d0997106ab37
[πŸ—Έ nwg-dock]β€Ί make build
go build -o bin/nwg-dock *.go
# github.com/gotk3/gotk3/glib
cgo-gcc-prolog: In function β€˜_cgo_26ff448d08b0_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/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:112:23: note: declared here
  112 | GObject *             g_binding_get_source          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function β€˜_cgo_26ff448d08b0_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]
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/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:116:23: note: declared here
  116 | GObject *             g_binding_get_target          (GBinding *binding);
      |                       ^~~~~~~~~~~~~~~~~~~~
[πŸ—Έ nwg-dock]β€Ί sudo make install 
[sudo] password for cheer: 
mkdir -p /usr/share/nwg-dock
cp -r images /usr/share/nwg-dock
cp config/* /usr/share/nwg-dock
cp bin/nwg-dock /usr/bin
[πŸ—Έ nwg-dock]β€Ί nwg-dock 
Neither 'nwg-drawer' nor 'nwggrid' command found, and no other launcher specified; hiding the launcher button.
Creating dir: /home/cheer/.config/nwg-dock
Copying file: /home/cheer/.config/nwg-dock/style.css
/home/cheer/.config/nwg-dock/style.css file not found, using GTK styling
(0x6faa40,0xc00010ad70)

** (nwg-dock:597205): WARNING **: 15:40:29.817: gtk-layer-shell v0.6.0 may not work on GTK v3.24.30. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
refreshing...
(0x6faa40,0xc0000125c0)
^C⏎                                                                                                            
[130 nwg-dock]β€Ί exa -T /usr/share/nwg-dock/
/usr/share/nwg-dock
β”œβ”€β”€ hotspot.css
β”œβ”€β”€ images
β”‚  β”œβ”€β”€ 1.svg
β”‚  β”œβ”€β”€ 2.svg
β”‚  β”œβ”€β”€ 3.svg
β”‚  β”œβ”€β”€ 4.svg
β”‚  β”œβ”€β”€ 5.svg
β”‚  β”œβ”€β”€ 6.svg
β”‚  β”œβ”€β”€ 7.svg
β”‚  β”œβ”€β”€ 8.svg
β”‚  β”œβ”€β”€ 9.svg
β”‚  β”œβ”€β”€ 10.svg
β”‚  β”œβ”€β”€ 11.svg
β”‚  β”œβ”€β”€ 12.svg
β”‚  β”œβ”€β”€ 13.svg
β”‚  β”œβ”€β”€ 14.svg
β”‚  β”œβ”€β”€ 15.svg
β”‚  β”œβ”€β”€ 16.svg
β”‚  β”œβ”€β”€ 17.svg
β”‚  β”œβ”€β”€ 18.svg
β”‚  β”œβ”€β”€ 19.svg
β”‚  β”œβ”€β”€ 20.svg
β”‚  β”œβ”€β”€ grid.svg
β”‚  β”œβ”€β”€ icon-missing.svg
β”‚  β”œβ”€β”€ task-empty.svg
β”‚  β”œβ”€β”€ task-multiple.svg
β”‚  └── task-single.svg
└── style.css
nwg-piotr commented 3 years ago

"nwg-dock" of course.

The warnings you see while building come from the gotk3 library and don't affect the program itself.

I'd like to know what (0x6faa40,0xc00010ad70) and (0x6faa40,0xc0000125c0) mean. The released version mistakenly prints some errors as pointers instead on text. It's been already fixed on the debug branch, but I can't merge it yet, due to another issue I'm currently trying to fix. Hopefully it's going to be ready soon. You may either wait a day or two for the new release, or try and build from the debug branch, run and show me the output again.

Mrfiregem commented 3 years ago

Rebuilding with the debug branch helped a lot:

Failed to open file β€œ/home/cheer/.local/share/nwg-dock/images/1.svg”: No such file or directory
Failed to open file β€œ/home/cheer/.local/share/nwg-dock/images/grid.svg”: No such file or directory

Running ln -s /usr/share/nwg-dock/ ~/.local/share/ fixed the issue, but I wonder why the files in /usr/share/nwg-dock aren't being read.

notthewave commented 2 years ago

same problem with the local directory on void-linux