You are not logged in.
Having recently switched to NetworkManager (connman was just too unstable for me on some connections), I was trying to avoid running nm-applet and stalonetray with my Monsterwm setup, so I came up with this script to manage NetworkManager via dmenu and nmcli. From the README:
Nmcli-dmenu
===============
Small script to 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 connections
- Enable/Disable networking
- Launch nm-connection-editor GUI
License
-------
- MIT
Requirements
------------
1. Python 2.7+ or 3.2+
2. NetworkManager
3. Dmenu
Installation
------------
- Edit dmenu parameters if desired
- Copy script somewhere in $PATH
Usage
--------
- Run script or bind to keystroke combination
Let me know if you have any suggestions for improvement!
Scott
Offline
You are awesome! I had plans to write a dmenu script for nmcli but never got myself to starting it. I also have issues with connman, so I'll now try your script and see how it goes.
Offline
I love this, thank you very much --- I may even start using network manager now just because of this script
Offline
Thanks for the kind words. Couple of minor upgrades since I first posted:
1. Wifi connections are sorted by signal strength
2. Active connection(s) (Wifi and VPN) are marked with a '**'
Scott
Offline
Ok, there's one thing I really don't like and it's the hardcoded colors and font for dmenu. I'd just use
DMENU = ("dmenu -l {} -p {} -i")
or give an opportunity to collect the colors and font from a config file, if existent. I compile mine directly into dmenu.
Btw, PKGBUILD
# Maintainer: sekret, mail=$(echo c2VrcmV0QHBvc3Rlby5zZQo= | base64 -d)
_pkgname=nmcli-dmenu
pkgname=$_pkgname-git
pkgver=r8.ca85698
pkgrel=1
pkgdesc="Control NetworkManager via dmenu"
arch=('any')
url="https://github.com/firecat53/nmcli-dmenu"
license=('MIT')
depends=('python' 'networkmanager' 'dmenu')
makedepends=('git')
optdepends=('network-manager-applet: for the nm-connection-editor GUI')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$_pkgname::git+https://github.com/firecat53/$_pkgname.git")
md5sums=('SKIP')
pkgver() {
cd "$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
install -Dm755 "$srcdir/$_pkgname/nmcli_dmenu" "$pkgdir/usr/bin/nmcli_dmenu"
install -Dm644 "$srcdir/$_pkgname/LICENSE.txt" "$pkgdir/usr/share/license/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:
Last edited by sekret (2014-05-17 06:32:53)
Offline
@sekret - thanks for the PKGBUILD! I'll get that up in the AUR here in the next couple of days and look into using a small config file to set dmenu options.
Thanks,
Scott
Offline
It would be great if I could pass agruments to your script. I made rough version of it, you might see it on github, I made a pullrequest for you. I wanted to pass -b to it, this was what I started from
Offline