Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nm-applet in swaybar. #1357

Closed
PeaceAlways opened this issue Sep 16, 2017 · 27 comments
Closed

nm-applet in swaybar. #1357

PeaceAlways opened this issue Sep 16, 2017 · 27 comments

Comments

@PeaceAlways
Copy link

PeaceAlways commented Sep 16, 2017

Is it possible to add nm-applet in swaybar if yes how?. If no, is it going to be implemented?.
Thank You.

@ddevault
Copy link
Contributor

Currently only icons using StatusNotifierItem are supported. Support for legacy Xembed icons will come later.

@PeaceAlways
Copy link
Author

Can you please suggest some replacement that can be placed over swaybar. For networks and bluetooth.

@ddevault
Copy link
Contributor

Beats me. I would just use nmtui from a terminal.

@ywalterh
Copy link

Re-visiting this, I've installed nm-applet using AUR network-manager-applet-indicator package and start it with nm-applet --indicator, the icon shows! However, clicking it doesn't do anything. Notification works as well.

@ianyfan
Copy link
Contributor

ianyfan commented Feb 27, 2019

@walterhuangio See #3249

@grahamc
Copy link
Contributor

grahamc commented Jul 10, 2019

For future seekers, nm-applet's connection editor does work under sway just fine if you directly execute nm-connection-editor.

@koponomarenko
Copy link

nm-connection-editor - a graphical user interface,
network-manager-applet - a system tray applet (nm-applet).

It is possible to use nm-connection-editor only (without network-manager-applet).

@mb720
Copy link

mb720 commented Jan 7, 2020

Beats me. I would just use nmtui from a terminal.

nm-applet's advantage is that it makes discovering and connecting to WPA2 Enterprise networks quite easy. nmtui does not allow discovering networks while already being connected, as far as I know.

@KristerV
Copy link

KristerV commented Jan 10, 2020

currently under Arch just nm-applet doesn't do anything and nm-applet --indicator crashes:

(process:4139): nm-applet-ERROR **: 10:48:19.442: Error: --indicator requested but indicator support not available
[1]    4139 trace trap (core dumped)  nm-applet --indicator

nmtui it is I guess..

nm-applet's connection editor does work under sway just fine if you directly execute nm-connection-editor

I couldn't figure this UI out for the life of me.

nmtui does not allow discovering networks

It does. Under the "Activate a connection" menu it show's new connections. Asks for password and everything. But I must say it doesn't show all connections all the time. Also It doesn't seem to always ask for a password (though obviously it will then not connect). Ahh.. I miss nm-applet.

Usually I'd default to wifi-menu actually. But for some reason this wasn't able to connect to my new wifi.

@M4a1x
Copy link

M4a1x commented Jan 16, 2020

Just found this issue via Google and wanted to leave my 2ct:

@KristerV Are you using Arch? If so, you need to use network-manager-applet-indicator, also see Wiki from the AUR as AppIndicator support is not compiled into the main package. (As @walterhdev pointed out)

An alternative I currently favor is using networkmanager_dmenu which can also be found in the AUR with bemenu as backend. To do this, just place this config in ~/.config/networkmanager-dmenu/config.ini:

[dmenu]
dmenu_command = /usr/bin/bemenu

for more options see the example config in /usr/share/doc/networkmanager-dmenu-git/config.ini.example

It supports the most important stuff like discovering and connecting to new networks, opening the connection manager, connecting to vpns, setting up new connections, etc

@pavlix
Copy link

pavlix commented Apr 12, 2020

I wonder why nm-applet --indicator just exists without any icon or error message for me. I worked on nm-applet appindicator improvements in the past, long ago when I was using Enlightenment for a short period of time. It used to work well. No need for Xembed cruft any more. I tried the one in openSUSE Tumbleweed and it is apparently built with appindicator support.

@pavlix
Copy link

pavlix commented Apr 12, 2020

For everyone who bumps into the same issue, nm-applet quits quietly when it's already running. The solution was:

killall nm-applet
nm-applet --indicator

However, it doesn't open the menu for some reason. Now the icon is there. I'm happy using nm-cli for all connectivity most of the time but it would be nice to have a complete support. Does swaybar implement the appindicator menu or not?

@progandy
Copy link
Contributor

progandy commented Apr 12, 2020

@pavlix The menu isn't implemented yet: #5161

You should also find out where it is started without indicator support and change that.

@andrewnicolalde
Copy link

Just found this issue via Google and wanted to leave my 2ct:

@KristerV Are you using Arch? If so, you need to use network-manager-applet-indicator, also see Wiki from the AUR as AppIndicator support is not compiled into the main package. (As @walterhdev pointed out)

An alternative I currently favor is using networkmanager_dmenu which can also be found in the AUR with bemenu as backend. To do this, just place this config in ~/.config/networkmanager-dmenu/config.ini:

[dmenu]
dmenu_command = /usr/bin/bemenu

for more options see the example config in /usr/share/doc/networkmanager-dmenu-git/config.ini.example

It supports the most important stuff like discovering and connecting to new networks, opening the connection manager, connecting to vpns, setting up new connections, etc

Curiously this package appears to have been removed from the AUR.

@andrewnicolalde
Copy link

andrewnicolalde commented Jun 26, 2020

Ah, looks like the default network-manager-applet package on Arch linux now supports appindicators.

Source: https://lists.archlinux.org/pipermail/aur-requests/2020-June/041394.html

@atakangah
Copy link

Ah, looks like the default network-manager-applet package on Arch linux now supports appindicators.

Source: https://lists.archlinux.org/pipermail/aur-requests/2020-June/041394.html

Does that mean it will work with sway? And if yes, how do I implement it. Because currently I only use nm-applet --indicator to show network status on swaybar.

@xkonni
Copy link

xkonni commented Jan 27, 2021

any news on this? i can still use nm-applet --indicator, but not without indicator.

@rumpelsepp
Copy link

#5161

@maxnoe
Copy link

maxnoe commented Aug 6, 2021

exec nm-applet --indicator in sway/config works fine now for me on arch using sway and waybar

@mb720
Copy link

mb720 commented Aug 6, 2021

It shows the current WiFi signal strength, which is nice.

Thanks for implementing this.

Is it supposed to show a menu with available connections when clicking on it? Because it doesn't react to clicks on my system.

Addendum from Tuesday 2021-10-26: I now see an exquisite menu when using waybar and clicking on the tray icon. At the time I wrote this comment (when I didn't get the menu on click) I was using a shell script for my status bar: bar { status_command ~/.config/sway/status.sh }.

@maxnoe
Copy link

maxnoe commented Aug 6, 2021

I get the menu when clicking:

nmapplet

@wakatara
Copy link

@maxnoe

Are you using it under Xwayland or under Wayland? I just installed under sway and Wayland and do not get the drop down networks menu on click (though do get the appindicator)

... also, are you just using the standard
exec nm-applet --indicator
in your sway config file or some other command that had extra magic on it?

(I'd like the network list too... 😄 )

@maxnoe
Copy link

maxnoe commented Oct 26, 2021

@wakatara How can I test if it runs under xwayland or wayland? I have xwayland running, but as the fonts are smooth, I'd bet it's wayland.

Yes, just exec nm-applet --indicator towards the bottom of the config.

@wakatara
Copy link

wakatara commented Oct 26, 2021

@maxnoe
Lol... it's an excellent question. I am unsure how to determine whether a particular app is using Wayland or XWayland. I am using the same commend, but like others in the thread, only get the indicator icon, no menu on click.

May I ask how you installed it on your system? I'm using the lastest Arch and used yay -S to install it. Just wondering if you perhaps used a more up to date version or perhps dev one that I should favour over the current install.

(and thanks for writing back so promptly!).
PS> On the Xwayland question, perhaps check to see if anything else it running in XWayland when the system comes up with a ps aux | grep -i xwayland ? Only easy thing I could think of off top of head.

@maxnoe
Copy link

maxnoe commented Oct 26, 2021

@wakatara No, I am also just using the latest official packages / aur packages.

Edit: re the xwayland stuff, this is how you get a list of running xwayland apps:

❯ xlsclients
maxnoe-x1  slack

no nm-applet... (I checked when the list was open)

@rpigott
Copy link
Member

rpigott commented Oct 26, 2021

@wakatara The menu is not yet implemented in swaybar.

@fkohrt
Copy link

fkohrt commented Dec 27, 2022

In case anybody has issues with adding exec nm-applet --indicator to ~/.config/sway/config, try exec_always instead:

exec_always nm-applet --indicator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests