firecat53 / networkmanager-dmenu

Control NetworkManager via dmenu
MIT License
783 stars 74 forks source link
dmenu networkmanager rofi

Networkmanager-dmenu

Manage NetworkManager connections with dmenu, Rofi, Bemenu, Wofi or fuzzel instead of nm-applet

NOTE

PR #124 changes rofi_highlight to highlight in config.ini.

Features

Screencast

Installation

Requirements

  1. Python 3.7+
  2. NetworkManager
  3. Dmenu (X), Rofi (X or XWayland), Wofi (Wayland) or Bemenu (X or Wayland)
  4. Python gobject (PyGObject, python-gobject, etc.)
  5. (Debian/Ubuntu based distros) libnm0 (libnm-util-dev on older distributions) and gir1.2-nm-1.0 (you have to explicitly install the latter on Debian Sid)
  6. (optional) The network-manager-applet package (in order to launch the GUI connection editor, if desired. The nm-applet does not need to be started.)
  7. (optional) Pinentry. Make sure to set which flavor of pinentry command to use in the config file.
  8. (optional) ModemManager for WWAN support.
  9. (optional) notify-send for notifications (connected, disconnected, etc.)
  10. (optional) bluez package for bluetooth control

Configuration

Config.ini values

Section Key Default Notes
[dmenu] compact False
dmenu_command dmenu Command can include arguments
list_saved False
pinentry None
active_chars == Prefix of active connection
highlight False Only applicable to rofi / wofi
highlight_fg None Only applicable to wofi
highlight_bg None Only applicable to wofi
highlight_bold True Only applicable to wofi
wifi_chars None String of 4 unicode characters
wifi_icons None String of icon characters
format (depends on compact) Python-style format string
[pinentry] description Get network password
prompt Password:
[dmenu_passphrase] obscure False
obscure_color #222222 Only applicable to dmenu
[editor] gui_if_available True
gui nm-connection-editor
terminal xterm Can include terminal arguments
[nmdm] rescan_delay 5 Adjust delay in re-opening nmdm following rescan

Usage

networkmanager_dmenu [-h] <menu args>

MIT License