Right click on connection => open manager

This commit is contained in:
Thomas Dehaeze 2020-11-25 12:21:04 +01:00
parent f3d6cd381e
commit e02fa0dc0b

View File

@ -775,10 +775,10 @@
type = internal/network type = internal/network
interface = ens12u2u4u4 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-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 label-disconnected-foreground = #777
#+end_src #+end_src
@ -790,13 +790,24 @@
format-connected = <label-connected> format-connected = <label-connected>
format-disconnected = <label-disconnected> format-disconnected = <label-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-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 label-disconnected-foreground = #777
#+end_src #+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 ** Toggle Wifi or Ethernet
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/connection-toggle.sh :header-args: :tangle ~/.config/polybar/scripts/connection-toggle.sh