New backup 2025-03-03 23:00:01
This commit is contained in:
parent
9c2d1122d4
commit
ab2783c58e
3 changed files with 46 additions and 12 deletions
|
@ -49,7 +49,8 @@ circular-progress {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin: 0px 2px;
|
margin: 0px 2px;
|
||||||
}
|
}
|
||||||
.reveal_children>box {
|
.reveal_children>box,
|
||||||
|
.reveal_children>button {
|
||||||
border-left: 2px solid $color1;
|
border-left: 2px solid $color1;
|
||||||
}
|
}
|
||||||
.rightgroup>label,
|
.rightgroup>label,
|
||||||
|
@ -82,7 +83,8 @@ label {
|
||||||
transition-property: background-color;
|
transition-property: background-color;
|
||||||
transition-duration: .25s;
|
transition-duration: .25s;
|
||||||
}
|
}
|
||||||
.workspaces .focused {
|
.workspaces .focused,
|
||||||
|
.active {
|
||||||
background-color: $color1;
|
background-color: $color1;
|
||||||
}
|
}
|
||||||
.workspaces button:first-child {
|
.workspaces button:first-child {
|
||||||
|
|
|
@ -43,14 +43,6 @@
|
||||||
:class {inhibit_active ? "active" : ""}
|
:class {inhibit_active ? "active" : ""}
|
||||||
{inhibit_active ? "" : ""}))
|
{inhibit_active ? "" : ""}))
|
||||||
|
|
||||||
(defpoll vpn_active :initial false
|
|
||||||
:interval "5s"
|
|
||||||
"scripts/vpn-status")
|
|
||||||
(defwidget vpn []
|
|
||||||
(button :onclick 'notify-send "test"'
|
|
||||||
:class {vpn_active ? "active" : ""}
|
|
||||||
{vpn_active ? "" : ""}))
|
|
||||||
|
|
||||||
(defwidget systemtray []
|
(defwidget systemtray []
|
||||||
(systray
|
(systray
|
||||||
:class "systray"
|
:class "systray"
|
||||||
|
@ -76,6 +68,40 @@
|
||||||
:duration {duration ?: "500ms"}
|
:duration {duration ?: "500ms"}
|
||||||
(children :nth 1))))))
|
(children :nth 1))))))
|
||||||
|
|
||||||
|
(defpoll vpn_active :initial false
|
||||||
|
:interval "5s"
|
||||||
|
"scripts/vpn-status")
|
||||||
|
|
||||||
|
(defvar reveal_vpn false)
|
||||||
|
(defwidget vpn []
|
||||||
|
(revealer-on-hover
|
||||||
|
:revealvar reveal_vpn
|
||||||
|
:revealvar-name "reveal_vpn"
|
||||||
|
(button :onclick 'notify-send "test"'
|
||||||
|
:class {vpn_active ? "active" : ""}
|
||||||
|
{vpn_active ? "" : ""})
|
||||||
|
(vpn_children)))
|
||||||
|
|
||||||
|
(defpoll home_vpn_active :initial false
|
||||||
|
:interval "5s"
|
||||||
|
"scripts/vpn-status Home")
|
||||||
|
|
||||||
|
(defpoll proton_vpn_active :initial false
|
||||||
|
:interval "5s"
|
||||||
|
"scripts/vpn-status Proton")
|
||||||
|
|
||||||
|
(defwidget vpn_children []
|
||||||
|
(box :class "reveal_children"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly false
|
||||||
|
:halign "center"
|
||||||
|
(button :onclick 'notify-send "test home"'
|
||||||
|
:class {home_vpn_active ? "active" : ""}
|
||||||
|
{home_vpn_active ? "" : ""})
|
||||||
|
(button :onclick 'notify-send "test proton"'
|
||||||
|
:class {proton_vpn_active ? "active" : ""}
|
||||||
|
{proton_vpn_active ? "" : ""})))
|
||||||
|
|
||||||
(defvar reveal_sysmem false)
|
(defvar reveal_sysmem false)
|
||||||
(defwidget sysmem []
|
(defwidget sysmem []
|
||||||
(revealer-on-hover
|
(revealer-on-hover
|
||||||
|
|
|
@ -3,8 +3,14 @@
|
||||||
nm_active=`nmcli con show --active`
|
nm_active=`nmcli con show --active`
|
||||||
vpn_active='false'
|
vpn_active='false'
|
||||||
|
|
||||||
if echo "${nm_active}" | grep -q 'vpn' || echo "${nm_active}" | grep -q 'wireguard';then
|
if [ -z ${1} ];then
|
||||||
vpn_active='true'
|
if echo "${nm_active}" | grep -q 'vpn' || echo "${nm_active}" | grep -q 'wireguard';then
|
||||||
|
vpn_active='true'
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if echo "${nm_active}" | grep -q "${1}";then
|
||||||
|
vpn_active='true'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf '%s' "${vpn_active}"
|
printf '%s' "${vpn_active}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue