#!/bin/bash RUNNING=$(pgrep nmtui) if [ "$RUNNING" ]; then kill $RUNNING 2&>1 /dev/null else /usr/bin/uxterm -e '/usr/bin/nmtui' fi