Eww: Modularized and improved CSS
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
(defvar date_rev false)
|
||||
|
||||
(defwidget clock []
|
||||
(box
|
||||
:class "module datetime"
|
||||
(defwidget clock-mod []
|
||||
(module
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update date_rev=true"
|
||||
:onhoverlost "${EWW_CMD} update date_rev=false"
|
||||
(overlay
|
||||
(box
|
||||
:orientation "v"
|
||||
(button
|
||||
:class "hour" hour)
|
||||
(button
|
||||
:class "minute" minute))
|
||||
(revealer
|
||||
:reveal date_rev
|
||||
(box
|
||||
:class "datetime"
|
||||
(overlay
|
||||
(box
|
||||
:orientation "v"
|
||||
(button
|
||||
:class "hour" hour)
|
||||
(button
|
||||
:class "minute" minute))
|
||||
(revealer
|
||||
:reveal date_rev
|
||||
(box
|
||||
:class "date"
|
||||
:orientation "v"
|
||||
@@ -25,7 +26,13 @@
|
||||
(button
|
||||
:onclick "${EWW_CMD} open --toggle calendar"
|
||||
:onrightclick "${EWW_CMD} open --toggle powermenu"
|
||||
:class "month" month)))))))
|
||||
:class "month" month))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defpoll hour :interval "15s" "date '+%H'")
|
||||
(defpoll minute :interval "15s" "date '+%M'")
|
||||
|
@@ -1,16 +1,17 @@
|
||||
(deflisten net :initial '{"name":"","icon":""}'"scripts/net/net")
|
||||
|
||||
(defwidget net []
|
||||
(box
|
||||
:class "module"
|
||||
:orientation "v"
|
||||
(button
|
||||
:class "net"
|
||||
:tooltip {net.name}
|
||||
{net.icon})
|
||||
(defwidget net-mod []
|
||||
(module
|
||||
(box
|
||||
:orientation "v"
|
||||
(button
|
||||
:class "net"
|
||||
:tooltip {net.name}
|
||||
{net.icon})
|
||||
|
||||
(button
|
||||
:class "blt"
|
||||
(label :class "icon-text" :text "B"))
|
||||
(button
|
||||
:class "blt"
|
||||
(label :class "icon-text" :text "B"))
|
||||
)
|
||||
)
|
||||
)
|
@@ -4,38 +4,40 @@
|
||||
|
||||
(deflisten battery :initial '{"visible":false,"percentage":0.0,"color":"#FFFFFF"}' "scripts/sys/battery")
|
||||
|
||||
(defwidget sys []
|
||||
(button
|
||||
:onclick "${EWW_CMD} open --toggle sys"
|
||||
(box
|
||||
(defwidget sys-mod []
|
||||
(module
|
||||
(button
|
||||
:class "module"
|
||||
:onclick "${EWW_CMD} open --toggle sys"
|
||||
(box
|
||||
:orientation "v"
|
||||
(circular-progress
|
||||
:value {EWW_CPU.avg}
|
||||
:class "cpubar"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "C"))
|
||||
(circular-progress
|
||||
:value {EWW_CPU.avg}
|
||||
:class "cpubar"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "C"))
|
||||
|
||||
(circular-progress
|
||||
:value {gpu.devices[0].GRBM2?.CommandProcessor-Graphics?.value?:0}
|
||||
:class "gpubar"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "G"))
|
||||
(circular-progress
|
||||
:value {gpu.devices[0].GRBM2?.CommandProcessor-Graphics?.value?:0}
|
||||
:class "gpubar"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "G"))
|
||||
|
||||
(circular-progress
|
||||
:value {100*memory.used/memory.total}
|
||||
:class "membar"
|
||||
:thickness 6
|
||||
:tooltip "${memory.human.used} / ${memory.human.total}"
|
||||
(label :class "icon-text" :text "M"))
|
||||
(circular-progress
|
||||
:value {100*memory.used/memory.total}
|
||||
:class "membar"
|
||||
:thickness 6
|
||||
:tooltip "${memory.human.used} / ${memory.human.total}"
|
||||
(label :class "icon-text" :text "M"))
|
||||
|
||||
(circular-progress
|
||||
:value {battery.percentage}
|
||||
:class "batbar"
|
||||
:visible {battery.visible}
|
||||
:style "color: ${battery.color};"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "B"))
|
||||
(circular-progress
|
||||
:value {battery.percentage}
|
||||
:class "batbar"
|
||||
:visible {battery.visible}
|
||||
:style "color: ${battery.color};"
|
||||
:thickness 6
|
||||
(label :class "icon-text" :text "B"))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@@ -1,6 +1,7 @@
|
||||
(deflisten workspace :initial '[]' "scripts/workspaces")
|
||||
|
||||
(defwidget workspaces []
|
||||
(defwidget workspace-mod []
|
||||
(module
|
||||
(eventbox
|
||||
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
|
||||
(box
|
||||
@@ -13,4 +14,4 @@
|
||||
; :tooltip {ws.tooltip}
|
||||
(box
|
||||
:class `${ws.focused ? "focused" : ""}`
|
||||
:height 3))))))
|
||||
:height 3)))))))
|
||||
|
Reference in New Issue
Block a user