💥 eww(bar/workspaces): fix workspace indicator with a literal script
This commit is contained in:
@@ -1,36 +1,72 @@
|
||||
|
||||
(defwidget toggle-grid []
|
||||
(box :class "toggle-grid"
|
||||
(grid-toggle :class "network"
|
||||
:icon ""
|
||||
:header "Network"
|
||||
:active true ; This sets if toggle is enabled or not, put condition check here
|
||||
:body "Connected" ; Generally put state here
|
||||
:visible true
|
||||
:max-width 128
|
||||
:max-height 48
|
||||
:onclick "notify-send 'Network' 'toggle network with nmcli!'"
|
||||
:orientation "vertical"
|
||||
(box :orientation "horizontal"
|
||||
:class "row"
|
||||
(grid-toggle :class "network"
|
||||
:icon ""
|
||||
:header "Network"
|
||||
:active true ; This sets if toggle is enabled or not, put condition check here
|
||||
:body "Connected" ; Put state here (e.g.: enabled, disabled)
|
||||
:visible true
|
||||
:onclick "notify-send 'Network' 'toggle network with nmcli!'"
|
||||
)
|
||||
(grid-toggle :class "bluetooth"
|
||||
:icon ""
|
||||
:header "Bluetooth"
|
||||
:active false
|
||||
:body "Connected"
|
||||
:visible true
|
||||
:onclick "notify-send 'Network' 'toggle network with nmcli!'"
|
||||
)
|
||||
(grid-toggle :class "dnd"
|
||||
:icon ""
|
||||
:header "Do Not Disturb"
|
||||
:active false
|
||||
:body "Disabled"
|
||||
:visible true
|
||||
:onclick "notify-send 'Network' 'toggle network with nmcli!'"
|
||||
)
|
||||
)
|
||||
(box :orientation "horizontal"
|
||||
:class "row"
|
||||
:space-evenly false
|
||||
(grid-toggle :class "airplane"
|
||||
:icon ""
|
||||
:header "Airplane Mode"
|
||||
:active false
|
||||
:body "Disabled"
|
||||
:visible true
|
||||
:onclick "notify-send 'Network' 'toggle network with nmcli!'"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget grid-toggle [ class onclick active ?icon header body visible max-width max-height ]
|
||||
(defwidget grid-toggle [ class onclick active ?icon header body visible ]
|
||||
(eventbox :visible "${visible}"
|
||||
:onclick "${onclick}"
|
||||
:class "${class} ${ active ? 'active' : '' }"
|
||||
:class "grid-toggle ${class} ${ active == true ? 'active' : '' } button"
|
||||
(box :class "toggle"
|
||||
:space-evenly false
|
||||
:orientation "horizontal"
|
||||
:width 142
|
||||
:height 52
|
||||
|
||||
(label :class "icon"
|
||||
:visible { icon != "" ? true : false }
|
||||
:valign "center"
|
||||
"${icon}")
|
||||
:text "${icon}")
|
||||
|
||||
(box :orientation "vertical"
|
||||
:space-evenly false
|
||||
(label :class "header"
|
||||
"${header}")
|
||||
:text "${header}"
|
||||
:xalign 0)
|
||||
(label :class "body"
|
||||
"${body}")
|
||||
:text "${body}"
|
||||
:xalign 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user