scorpion-26 / gBar

Blazingly fast status bar written with GTK
MIT License
459 stars 17 forks source link

HM Module faulty #66

Closed Mikilio closed 5 months ago

Mikilio commented 8 months ago

Builds but doesn't run because it expects defaults

What doesn't work? Please be as precise as possible. e.g.: "gBar crashes on hovering the RAM sensor module. No other modules are affected."

Steps to Reproduce

Use the hm-module as described in README.md and start bar from terminal

Expected behavior

Bar should start

Screenshots/Error logs

Without extra config

› gBar 1
Set value for AudioInput: false
...
Cannot open network device! Disabling Network widget.
Info: No CSS found in /home/mikilio/.config
Info: No CSS found in /home/mikilio/.local/share
Info: No CSS found in /usr/local/share
Info: No CSS found in /usr/share
No CSS file found!
[Exiting due to assert failed]

With extraCSS=""

› gBar 1
Set value for AudioInput: false
...
Cannot open network device! Disabling Network widget.
/nix/store/ayg065nw0xi1zsyi8glfh5pn4sfqd8xg-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/r7a2dfjms7aywic5ry7crk4l9wmhjkwy-gvfs-1.50.6/lib/gio/modules/libgvfsdbus.so)
Failed to load module: /nix/store/r7a2dfjms7aywic5ry7crk4l9wmhjkwy-gvfs-1.50.6/lib/gio/modules/libgvfsdbus.so
CSS found and loaded successfully!
Cannot find plugin library!
[Exiting due to assert failed]

Solution I browsed the Code and saw that absolute paths like /usr/share etc. are being used. These paths don't exist so the executable can not find any installed files by gBar. Abiding by XDG specifications and using environment variables like XDG_DATA_DIRS.

Information about your system and gBar

scorpion-26 commented 8 months ago

Yeah, I don't check XDG_DATA_DIRS, but I do check XDG_DATA_HOME. This is the reason the first one doesn't work but the second does. (The HM writes to extraCSS to .config/gBar/style.css) The second one asserts, because you executed the wrong command. You want gBar bar 1 for the bar. gBar 1 is not a valid command.

Though thinking about it I probably want to add a check for XDG_DATA_DIRS

Mikilio commented 8 months ago

Actually, I might make a PR for that if it helps :) Thanks a lot for gBar!

scorpion-26 commented 8 months ago

If you want to make a PR, that would be awesome!