From 156cdd1dc2d22a7d9b58e9d4c71f57b969900f7a Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Wed, 25 Nov 2020 12:21:04 +0100 Subject: [PATCH] Right click on connection => open manager --- polybar.org | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/polybar.org b/polybar.org index f147111..1764c50 100644 --- a/polybar.org +++ b/polybar.org @@ -775,10 +775,10 @@ type = internal/network interface = ens12u2u4u4 - label-connected = %{A1:bash ~/.config/polybar/scripts/connection-toggle.sh ens12u2u4u4 >/dev/null 2>%1 &:} %local_ip%%{A} + label-connected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh wlp2s0 >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh ens12u2u4u4 >/dev/null 2>%1 &:} %local_ip%%{A}%{A} label-connected-foreground = ${colors.fg} - label-disconnected = %{A1:bash ~/.config/polybar/scripts/connection-toggle.sh ens12u2u4u4 >/dev/null 2>%1 &:}%{A} + label-disconnected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh wlp2s0 >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh ens12u2u4u4 >/dev/null 2>%1 &:}%{A}%{A} label-disconnected-foreground = #777 #+end_src @@ -790,13 +790,24 @@ format-connected = format-disconnected = - label-connected = %{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 >/dev/null 2>%1 &:}直 %essid%%{A} + label-connected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh wlp2s0 >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 >/dev/null 2>%1 &:}直 %essid%%{A}%{A} label-connected-foreground = ${colors.fg} - label-disconnected = %{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 >/dev/null 2>%1 &:}直%{A} + label-disconnected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh wlp2s0 >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 >/dev/null 2>%1 &:}直%{A}%{A} label-disconnected-foreground = #777 #+end_src +** Run Network Manager +:PROPERTIES: +:header-args: :tangle ~/.config/polybar/scripts/connection-manager.sh +:header-args+: :comments both :mkdirp yes +:header-args+: :shebang "#!/usr/bin/env bash" +:END: + +#+begin_src bash + $TERMINAL -e 'sudo nmtui' +#+end_src + ** Toggle Wifi or Ethernet :PROPERTIES: :header-args: :tangle ~/.config/polybar/scripts/connection-toggle.sh