nwg-piotr / nwg-panel

GTK3-based panel for sway and Hyprland Wayland compositors
MIT License
629 stars 44 forks source link

[BUG] No network/bluetooth icon in tray #269

Closed owpk closed 11 months ago

owpk commented 11 months ago

Describe the bug Desktop info: OS: Manjaro Linux x86_64 Host: KLVD-WXX9 M1010 Kernel: 6.5.5-1-MANJARO Uptime: 4 mins Packages: 1127 (pacman) Shell: zsh 5.9 Resolution: 2160x1440 WM: sway Theme: Adwaita [GTK2], Everforest-Dark [GTK3] Icons: Adwaita [GTK2], Papirus-Dark-Maia [GTK3] Terminal: alacritty CPU: 11th Gen Intel i5-1135G7 (8) @ 4.200GHz GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] Memory: 4376MiB / 15796MiB

nwg-panel startup logs:

Running instance found, PID 3766, sending SIGINT
Common settings {'restart-on-display': True, 'restart-delay': 500, 'processes-backgroud-only': True, 'processes-own-only': True}
Dependencies check: {'light': True, 'brightnessctl': False, 'ddcutil': True, 'pamixer': True, 'pactl': True, 'playerctl': True, 'wlr-randr': True, 'hyprctl': False, 'upower': True, 'swaync': True, 'python-requests': True}
Running on sway
Error loading json: [Errno 2] No such file or directory: '/home/owpk/.local/share/nwg-panel/calendar.json'
Error loading json: [Errno 2] No such file or directory: '/home/owpk/.local/share/nwg-panel/calendar.json'
Panel 'panel-top': output: eDP-1, position: top, layer: bottom, width: 1661, height: 25
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.erikreider.swaync.cc was not provided by any .service files
Could not connect to CC service. Will wait for connection...
Error loading json: [Errno 2] No such file or directory: '/home/owpk/.local/share/nwg-panel/calendar.json'

I have network manager installed and running:

❯ sudo systemctl status NetworkManager.service
[sudo] password for owpk:
● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; preset: disabled)
     Active: active (running) since Sat 2023-11-04 18:42:42 +08; 6min ago
       Docs: man:NetworkManager(8)
   Main PID: 692 (NetworkManager)
      Tasks: 4 (limit: 18927)
     Memory: 37.9M
        CPU: 1.013s
     CGroup: /system.slice/NetworkManager.service
             └─692 /usr/bin/NetworkManager --no-daemon

my nwg-panel configs:

  {
    "name": "panel-top",
    "output": "",
    "layer": "bottom",
    "position": "top",
    "controls": "right",
    "width": "auto",
    "height": 25,
    "homogeneous": false,
    "margin-top": 0,
    "margin-bottom": 0,
    "padding-horizontal": 0,
    "padding-vertical": 0,
    "spacing": 0,
    "items-padding": 0,
    "icons": "",
    "css-name": "panel-top",
    "modules-left": [
      "button-sample",
      "sway-taskbar"
    ],
    "modules-center": [
      "clock",
      "playerctl"
    ],
    "modules-right": [
      "scratchpad",
      "tray"
    ],
    "controls-settings": {
      "components": [
        "brightness",
        "volume",
        "battery",
        "processes"
      ],
      "commands": {
        "battery": ""
      },
      "show-values": true,
      "interval": 1,
      "icon-size": 16,
      "hover-opens": false,
      "leave-closes": true,
      "click-closes": false,
      "css-name": "controls-window",
      "custom-items": [
        {
          "name": "Pavucontrol",
          "icon": "audio-volume-high-symbolic",
          "cmd": "pavucontrol"
        },
        {
          "name": "Panel settings",
          "icon": "nwg-panel",
          "cmd": "floating nwg-panel-config"
        }
      ],
      "menu": {
        "name": "Exit",
        "icon": "system-shutdown-symbolic",
        "items": [
          {
            "name": "Lock",
            "cmd": "swaylock -f -c 000000"
          },
          {
            "name": "Logout",
            "cmd": "swaymsg exit"
          },
          {
            "name": "Reboot",
            "cmd": "systemctl reboot"
          },
          {
            "name": "Shutdown",
            "cmd": "systemctl -i poweroff"
          }
        ]
      },
      "output-switcher": false,
      "backlight-controller": "light",
      "backlight-device": "",
      "window-width": 0,
      "window-margin-horizontal": 0,
      "window-margin-vertical": 0,
      "root-css-name": "controls-overview",
      "battery-low-level": 20,
      "battery-low-interval": 3,
      "processes-label": "Processes",
      "angle": 0.0
    },
    "tray": {
      "root-css-name": "tray",
      "inner-css-name": "inner-tray"
    },
...

There is no network status icon in tray module:

image

Maybe there is some issue with missing fonts ?

nwg-piotr commented 11 months ago

Check if you installed libappindicator-gtk3.

owpk commented 11 months ago

@nwg-piotr yes, was installed:

❯ sudo pacman -S libappindicator-gtk3
warning: libappindicator-gtk3-12.10.0.r298-3 is up to date -- reinstalling
nwg-piotr commented 11 months ago

You started NetworkManager.service?

owpk commented 11 months ago

@nwg-piotr Yes, installed enabled running and connected to network (same after reboot)

❯ sudo systemctl status NetworkManager.service
[sudo] password for owpk:

● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; preset: disabled)
     Active: active (running) since Sat 2023-11-04 18:42:42 +08; 6min ago
       Docs: man:NetworkManager(8)
   Main PID: 692 (NetworkManager)
      Tasks: 4 (limit: 18927)
     Memory: 37.9M
        CPU: 1.013s
     CGroup: /system.slice/NetworkManager.service
             └─692 /usr/bin/NetworkManager --no-daemon
nwg-piotr commented 11 months ago

No more ideas. Check if it works for you from my live iso. https://github.com/nwg-piotr/nwg-iso

owpk commented 11 months ago

@nwg-piotr I figure out there is problem with some fonts/missing icons/dependency, after reconnecting to network i got empty space between some icons, probably its network icon, any suggestions pls ? What is default behavior when i click to this icon ? image

nwg-piotr commented 11 months ago

Empty spaces may come from some Electron apps. They stopped working with my tray several months ago.

Fonts have nothing to do with the tray icons, as they are always graphical.

I remember having several issues while testing nwg-shell on Manjaro. I didn't care much, as what I pay attention to is vanilla Arch. Other distros have their packagers, and it's their business to make things work. See: https://nwg-piotr.github.io/nwg-shell/derivatives

owpk commented 11 months ago

@nwg-piotr I found the problem. I needed to add this line to my sway autorun configuration:

exec nm-applet --indicator

Also.

I want to say that I like all the nwg-* projects, but I really need to be able to add custom status elements like for example in waybar (for example to see the current status of RAM utilization), I think it can be realized with non-clickable buttons and display there the information obtained from any script. I think I am not alone, I will add a request for feature. Thank you!

nwg-piotr commented 11 months ago

Use executors and gopsuinfo:

image

Or better: try out the full implementation with nwg-iso. You can see all the stuff w/o installation.

owpk commented 11 months ago

@nwg-piotr Thx! I'll try it