GithubHelp home page GithubHelp logo

t0fik / networkmanager-dmenu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from firecat53/networkmanager-dmenu

0.0 0.0 0.0 163 KB

Control NetworkManager via dmenu

License: MIT License

Python 100.00%

networkmanager-dmenu's Introduction

Networkmanager-dmenu

NOTE: Python 2.x support ended as of 2019/11/13

Manage NetworkManager connections with dmenu instead of nm-applet

Features

  • Connect to existing NetworkManager wifi or wired connections
  • Connect to new wifi connections. Requests passphrase if required
  • Connect to _existing_ VPN, Wireguard, GSM/WWAN and Bluetooth connections
  • Enable/Disable wifi, WWAN, bluetooth and networking
  • Launch nm-connection-editor GUI
  • Support for multiple wifi adapters
  • Optional Pinentry support for secure passphrase entry
  • Delete existing connections
  • Rescan wifi networks
  • Uses notify-send for notifications if available

License

  • MIT

Requirements

  1. Python 3.2+
  2. NetworkManager
  3. Dmenu. Basic support is included for Rofi, but most Rofi configuration/theming should be done via Xresources or Rofi themes. The Suckless password patch is supported if desired.
  4. Python gobject (PyGObject, python-gobject, etc.)
  5. (Debian/Ubuntu based distros) libnm-util-dev 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.)

Installation

  • Copy script somewhere in $PATH OR
  • Set your dmenu_command in config.ini if it's not 'dmenu' (for example dmenu_run or rofi). The alternate command should still respect the -l, -p and -i flags.
  • To customize dmenu appearance, copy config.ini.example to ~/.config/networkmanager-dmenu/config.ini and edit.
  • If using dmenu for passphrase entry (pinentry not set), dmenu options in the [dmenu_passphrase] section of config.ini will override those in [dmenu] so you can, for example, set the normal foreground and background colors to be the same to obscure the passphrase. The Suckless password patch -P option is supported if that patch is installed.
  • Set default terminal (xterm, urxvtc, etc.) command in config.ini if desired.
  • If using Rofi, you can try some of the command line options in config.ini or set them using the dmenu_command setting, but I haven't tested most of them so I'd suggest configuring via .Xresources where possible.
  • Saved connections can be listed if desired. Set list_saved = True under [dmenu] in config.ini. If set to False, saved connections are still accessible under a "Saved connections" sub-menu.
  • If desired, copy the networkmanager_dmenu.desktop to /usr/share/applications or ~/.local/share/applications.
  • If you want to run the script as $USER instead of ROOT, set PolicyKit permissions. The script is usable for connecting to pre-existing connections without setting these, but you won't be able to enable/disable networking or add new connections.

Usage

  • Run script or bind to keystroke combination
  • If desired, dmenu or Rofi options can be passed on the command line instead of or in addition to the config file. These will override options in the config file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.