Nm-applet doesn't appear to do anything

What is the purpose of nm-applet? It eats a lot of memory and I can’t use it because it doesn’t appear anywhere. I’m using a desktop instead of a laptop, so is it because of that?

It’s purpose is to access certain settings from your system tray. So if you’re not using a system tray in e.g. your waybar or don’t use that particular tray item, you can safely remove it if you’re concerned about your memory usage (it shouldn’t be that high though). You can still access your network settings through other means. For more information, see e.g. https://wiki.archlinux.org/title/NetworkManager

1 Like

I haven’t changed anything in Waybar at all, which is why I’m confused that there’s nothing in the tray. I’m not sure if the applications icons tray is visible. In the i3wm edition, I had to use xrandr to set my monitor to primary in order for the tray to work properly, but I can’t in this edition because there’s no equivalent that I’m aware of.

Is the tray working properly? I haven’t changed anything, except for moving the nm-applet to the left in the waybar config.

Without seeing your config I can’t tell for certain, but to me it looks like you don’t have a system tray enabled. You can see my system tray next to the calendar. There you can also see the nm-applet

In the config file:

	"modules-right": [
		"custom/arrow1",
		//"custom/alsa",
        "custom/spotify",
		"pulseaudio",
		//"sndio",
		"custom/arrow2",
		"network",
		"custom/arrow3",
		"memory",
		"custom/arrow4",
		"cpu",
		//"custom/arrow5",
		//"temperature",
		//"custom/arrow6",
		//"sway/language",
		"custom/arrow7",
		"battery",
		"custom/arrow8",
		"tray",
		"clock#date",
		"custom/arrow9",
		"clock#time",
        "custom/power"
	],

You will need to enable tray to get your system tray to the waybar.

1 Like

This is my waybar config. It’s as it came right after installation, and the tray still doesn’t appear.

// Global 
{
    "layer": "top",
    "position": "top",

    // If height property would be not present, it'd be calculated dynamically
    "height": 30,

    "modules-left": [
        "custom/launcher",
        "sway/workspaces",
        "sway/mode",
    ],
 
    "modules-center": [
    ],

    "modules-right": [
        "network",
        "idle_inhibitor",
        "memory",
        "cpu",
        "pulseaudio",
        "custom/keyboard-layout",
        "battery",
        //"custom/PBPbattery",
        "backlight#icon",
        "backlight#value",
        "clock",
        "tray",
        //"custom/weather",
        "custom/power",
    ],

    // Modules

    "idle_inhibitor": {
        "format": "{icon} ",
        "format-icons":{
            "activated": "",
            "deactivated": ""
        }
    },

    "battery": {
        "states": {
            // "good": 95,
            "warning": 30,
            "critical": 15
        },
        "format": "{capacity}% {icon}",
        "format-charging": "{capacity}% ",
        "format-plugged": "{capacity}% ",
        // "format-good": "", // An empty format will hide the module
        // "format-full": "",
        "format-icons": ["", "", "", "", ""]
    },

    "custom/PBPbattery": {
        "exec": "~/.config/waybar/scripts/PBPbattery.sh",
        "format": "{}",
    },

    "clock": {
        "interval": 10,
        "format-alt": " {:%e %b %Y}", // Icon: calendar-alt
        "format": "{:%H:%M}",
        "tooltip-format": "{:%e %B %Y}"
    },

    "cpu": {
        "interval": 5,
        "format": "  {usage}% ({load})", // Icon: microchip
        "states": {
            "warning": 70,
            "critical": 90,
        },
        "on-click": "xfce4-terminal -e 'htop'",
    },

    "custom/keyboard-layout": {
        "exec": "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4",
        // Interval set only as a fallback, as the value is updated by signal
        "interval": 30,
        "format": "  {}", // Icon: keyboard
        // Signal sent by Sway key binding (~/.config/sway/key-bindings)
        "signal": 1, // SIGHUP
        "tooltip": false,
        "on-click": "~/.config/waybar/scripts/keyhint.sh",
    },

    "memory": {
        "interval": 5,
        "format": " {}%", // Icon: memory
        "on-click": "xfce4-terminal -e 'htop'", 
        "states": {
            "warning": 70,
            "critical": 90
        }
    },

    "network": {
        "interval": 5,
        "format-wifi": "  {essid} ({signalStrength}%)", // Icon: wifi
        "format-ethernet": "  {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
        "format-disconnected": "⚠  Disconnected",
        "tooltip-format": "{ifname}: {ipaddr}",
        "on-click": "xfce4-terminal -e 'nmtui'",
    },
    "network#vpn": {
        "interface": "tun0",
        "format": "  {essid} ({signalStrength}%)",
        "format-disconnected": "⚠  Disconnected",
        "tooltip-format": "{ifname}: {ipaddr}/{cidr}",
    },

    "sway/mode": {
        "format": "{}",
        "tooltip": false
    },

    "sway/window": {
        "format": "{}",
        "max-length": 120
    },

    "sway/workspaces": {
        "disable-scroll": true,
        "disable-markup" : false,
        "all-outputs": true,
        "format": "  {icon}  ",
        //"format":"{icon}",
        "format-icons": {
            "1": "",
            "2": "",
            "3": "",
            "4": "",
        }
    },

    "pulseaudio": {
        "scroll-step": 1, // %, can be a float
        "format": "{volume}% {icon}",
        "format-bluetooth": "{volume}% {icon}  {format_source}",
        "format-bluetooth-muted": " {icon}  {format_source}",
        "format-muted": "婢 {format_source}",
        "format-source": "{volume}% ",
        "format-source-muted": "",
        "format-icons": {
            "headphone": "",
            "hands-free": "וֹ",
            "headset": "  ",
            "phone": "",
            "portable": "",
            "car": "",
            "default": [""]
        },
        "on-click": "pavucontrol",
        "on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +2%",
        "on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -2%",
    },

    // to use the weather module replace <your_location> with your city or town
    // note: do not use spaces: new york would be newyork
    "custom/weather": {
        "exec": "~/.config/waybar/scripts/weather.sh <your_location>", 
        "return-type": "json",
        "interval": 600,
    },

    "tray": {
        "icon-size": 18,
        "spacing":10,
     },

    "backlight#icon": {
        "format": "{icon}",
        "format-icons": [""],
        "on-scroll-down": "brightnessctl -c backlight set 1%-",
        "on-scroll-up": "brightnessctl -c backlight set +1%"
    },

    "backlight#value" :{
         "format": "{percent}%",
         "on-scroll-down": "brightnessctl -c backlight set 1%-",
         "on-scroll-up": "brightnessctl -c backlight set +1%"
    },

    "custom/firefox": {
        "format": " ",
        "on-click": "exec firefox",
        "tooltip": false
    },

    "custom/terminal": {
        "format": " ",
        "on-click": "exec xfce4-terminal",
        "tooltip": false
    },

    "custom/files": {
        "format": " ",
        "on-click": "exec thunar",
        "tooltip": false
    },

    "custom/launcher": {
        "format":" ",
        "on-click": "exec wofi -c ~/.config/wofi/config -I",
        "tooltip": false,
    },

    "custom/power": {
        "format":"⏻",
        "on-click": "exec ~/.config/waybar/scripts/power-menu.sh",
        "tooltip": false,
    },
}

Ok, so it really seems you system tray is empty. Do you have any other programs running that should show up in the system tray (e.g. telegram, blueman etc.)? If they don’t show up either something might be broken with your system tray.

Other than that you need to make sure that you start nm-applet with the --indicator flag to show up in the system tray.
Your sway config should include (in the default EOS config structure):
config.d/autostart_applications: exec nm-applet --indicator

More info here https://github.com/swaywm/sway/issues/1357

1 Like

The tray does seem to work but nm-applet doesn’t appear in the tray. Since It doesn’t work I’ll just uninstall it. Thank you for the help!

I have this in my autostart file in sway (or simply in your sway config file)

exec nm-applet --indicator

do you run dex?
As i think sway same as i3 will not run xdg/autostart stuff on its own.

also i would try to start it from terminal to see if it is running or simply is not able to start.

1 Like

This doesn’t work for me. I’m not sure why because I didn’t change anything related to waybar or any processes after installing.

No? I’m not sure, but there’s no dex command used in the config file. My .config regarding sway or waybar is the same as the default by the ISO.

disable it and run:
dex --autostart -e sway
after relogin would show what it can start automatically…

1 Like

This is weird. Now the firewall applet shows up but the nm-applet doesn’t.

what happens when starting nm-applet from terminal?

Nothing

pidof nm-applet
if it shows a pid it is running… but it simply do not show up on tray…

2 Likes

[bigrand@bigrand-oem ~]$ pidof nm-applet
515

Can you try to launch waybar in a terminal? Maybe it will give any clue.

killall waybar && waybar &

1 Like

That’s why the --indicator options is important.

Did you kill it before launch it?

Killall nm-applet && nm-applet --indicator

1 Like

It worked! but I’m not sure why but it works now.

This shows the firewall applet but not the nm-applet

This shows the nm-applet correctly. When I reboot my PC it does start but without --indicator(?), but if I reload Sway it doesn’t work.

This seemed to work at the first, but for some reason after doing $mod+shift+c and doing it again didn’t do anything (Apart from opening Waybar like if I reboot my PC i.e. without tray icons).

I’m not sure what’s causing all of this! I have the same configuration right after install. I haven’t done anything apart from bug hunting and testing. Not sure if it’s my PC/Instance or the ISO/Installation that isn’t setup correctly.

How do you start sway, i.e. do you use a display manager like SDDM or GDM? Or do you start it via you .bashrc?

Sway should be able to ‘autostart’ programs on it’s own, given that you start sway correctly.

Also reloading sway with $mod+shift+c will not restart all autostarted programs. If you want to execute commands on reloading, you need to include them with exec_always