vpn eww and eww crash
This commit is contained in:
@@ -83,6 +83,29 @@
|
||||
:visible {!bt.powered}
|
||||
:text "Disabled")))
|
||||
|
||||
; --- WireGuard ---
|
||||
|
||||
(defwidget wg-row [wg]
|
||||
(box :orientation "v" :space-evenly false :class "wg-row"
|
||||
(box :orientation "h" :space-evenly false :valign "center"
|
||||
(label :class "wg-name ${wg.up ? 'wg-up' : 'wg-down'}" :halign "start" :hexpand true :text {wg.name})
|
||||
(button
|
||||
:class "net-toggle-btn ${wg.up ? 'net-toggle-on' : 'net-toggle-off'}"
|
||||
:onclick "scripts/net/wg-toggle ${wg.name}"
|
||||
:tooltip {wg.up ? "Disconnect" : "Connect"}
|
||||
(label :text {wg.up ? "" : ""})))
|
||||
(box :orientation "v" :space-evenly false :visible {wg.up}
|
||||
(netinfo-row :label "IP" :value {wg.ip})
|
||||
(netinfo-row :label "Peer" :value {wg.endpoint != "" ? "${wg.peers} · ${wg.endpoint}" : wg.peers})
|
||||
(netinfo-row :label "Traffic" :value " ${wg.rx} ${wg.tx}"))
|
||||
(label :class "netinfo-dim" :halign "start" :visible {!wg.up} :text "Down")))
|
||||
|
||||
(defwidget wireguard-net-section []
|
||||
(box :orientation "v" :space-evenly false :class "sys-section"
|
||||
(section-header :title "WireGuard" :accent "wg-accent")
|
||||
(for wg in {net.wireguard}
|
||||
(wg-row :wg {wg}))))
|
||||
|
||||
; --- Root ---
|
||||
|
||||
(defwidget net-win []
|
||||
@@ -94,4 +117,7 @@
|
||||
(box :class "section-sep")
|
||||
(wifi-net-section)
|
||||
(box :class "section-sep")
|
||||
(box :visible {arraylength(net.wireguard) > 0} :space-evenly false :orientation "v"
|
||||
(wireguard-net-section)
|
||||
(box :class "section-sep"))
|
||||
(bluetooth-net-section)))
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
(pm-btn :icon "" :label "Sign out"
|
||||
:onclick "hyprctl eval \"hl.dispatch(hl.dsp.exit())\"")
|
||||
(pm-btn :icon "" :label "Cancel"
|
||||
:onclick "eww close powermenu")))))))
|
||||
:onclick "${EWW_CMD} --no-daemonize close powermenu")))))))
|
||||
|
||||
(defwindow powermenu
|
||||
:monitor 0
|
||||
|
||||
Reference in New Issue
Block a user