1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-24 05:02:29 +00:00
dotfiles/scripts/.bin/netmenu
J. Fernando Sánchez 0a59f73c8f Menu to change (dis)connect to networks
* Only for NetworkManager
2017-01-14 00:11:34 +01:00

13 lines
400 B
Bash
Executable File

#!/bin/sh
if command -v rofi >/dev/null 2>&1;
then
launcher="rofi -dmenu -i -mesg '""$input""'"
else
launcher="dmenu -fn "-*-cure-medium-*-*-*-11-*-*-*-*-*-*-*" -nb "#101010" -nf "#5f5f5f" -sb "#191
fi
# find "$input" -maxdepth 1 ! -path "$input" -print | sh -c "$launcher" | xargs $0
conname=$(nmcli -t -f NAME con | sh -c "$launcher")
nmcli conn up $conname || nmcli conn down $conname