From e3b98b7aac36e9d537b981eb9130c6eb2750673b Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 27 Jul 2021 01:05:13 -0400 Subject: [PATCH] Togglable NetworkManager window for waybar using nmtui --- waybar/waybar-nm.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 waybar/waybar-nm.sh diff --git a/waybar/waybar-nm.sh b/waybar/waybar-nm.sh new file mode 100755 index 0000000..54d5c94 --- /dev/null +++ b/waybar/waybar-nm.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +RUNNING=$(pgrep nmtui) + +if [ "$RUNNING" ]; then + kill $RUNNING 2&>1 /dev/null +else + /usr/bin/xterm -e '/usr/bin/nmtui' +fi