(defwidget mycpu [coreid] (box :space-evenly false :orientation "v" (label :class "bg-cool-text" :text "Core ${coreid}" ) (box :class "bg-graph-container" (graph :class "bg-graph" :width 100 :height 50 :thickness 3 :min 0 :max 100 :value {EWW_CPU.cores[coreid].usage} :time-range "30s" :line-style "round" ) ) ) ) (defwidget bgdecors [] (centerbox :space-evenly false :orientation "h" (box :space-evenly false :orientation "v" :valign "center" (box :space-evenly false :orientation "v" :halign "start" :class "bg-module" (centerbox (box :orientation "h" :space-evenly false (label :xalign 0.5 :class "bg-icon" :text "") (label :xalign 0 :class "bg-text bg-title" :text "CPU x${arraylength(EWW_CPU.cores)}") ) (box) (box :orientation "h" :space-evenly false (label :xalign 1 :class "bg-text" :text "${cpuname}") ) ) (box :space-evenly false :orientation "v" ; :valign "center" :width 150 :height 30 (box :space-evenly false :orientation "h" (mycpu :coreid 0) (mycpu :coreid 1) (mycpu :coreid 2) ) (box :space-evenly false :orientation "h" (mycpu :coreid 3) (mycpu :coreid 4) (mycpu :coreid 5) ) (box :space-evenly false :orientation "h" (mycpu :coreid 6) (mycpu :coreid 7) (mycpu :coreid 8) ) (box :space-evenly false :orientation "h" (mycpu :coreid 9) (mycpu :coreid 10) (mycpu :coreid 11) ) ) ) (box :space-evenly false :orientation "v" :valign "end" (box :class "bg-module bg-date" :space-evenly false :orientation "v" :halign "start" :valign "end" (label :xalign 0 :class "bg-decor-dow" ; Hyperland maybe? :text "${time.day}" ) (label :xalign 0 :class "bg-decor-date" :text "${time.date}" ) ) ) ) (box :space-evenly false :orientation "v" :valign "center" :width 150 :height 30 ; (graph ; :class "bg-graph" ; :width 155 ; :height 25 ; :thickness 3 ; :value {EWW_CPU.cores[0].usage} ; :time-range "30s" ; ; :line-style "round" ; ) ) (box :space-evenly false :orientation "v" :halign "end" :valign "center" (box :space-evenly false :orientation "v" :class "bg-module" :valign "end" (centerbox (box :orientation "h" :space-evenly false (label :xalign 0.5 :class "bg-icon" :text "") (label :xalign 0 :class "bg-text bg-title" :text "Network") ) (box) (box) ) (box :orientation "h" (label :halign "start" :xalign 0 :class "bg-cool-text" :text "Up: ${EWW_NET["wlan0"].NET_UP} bytes") ) (button ; Button to make this not draggable (box :class "bg-graph-container" (graph :class "bg-graph" :width 100 :height 50 :thickness 3 :dynamic true :value {EWW_NET["wlan0"].NET_UP} :time-range "30s" :line-style "round" ) ) ) (box :orientation "h" (label :halign "start" :xalign 0 :class "bg-cool-text" :text "Down: ${EWW_NET["wlan0"].NET_DOWN} bytes") ) (button ; Button to make this not draggable (box :class "bg-graph-container" (graph :class "bg-graph" :width 100 :height 50 :thickness 3 :dynamic true :value {EWW_NET["wlan0"].NET_DOWN} :time-range "30s" :line-style "round" ) ) ) ) (box :space-evenly false :orientation "v" :class "bg-module" :valign "end" (centerbox (box :orientation "h" :space-evenly false (label :xalign 0.5 :class "bg-icon" :text "") (label :xalign 0 :class "bg-text bg-title" :text "Memory") ) (box) (box :orientation "h" (label :xalign 1 :class "bg-text bg-title" :text "(${memory.total})") ) ) (box :orientation "h" (label :halign "start" :xalign 0 :class "bg-cool-text" :text "+${memory.used}") (label :halign "end" :xalign 1 :class "bg-cool-text" :text "-${memory.free}") ) (button ; Button to make this not draggable (box :class "bg-graph-container" (graph :class "bg-graph" :width 100 :height 50 :thickness 3 :min 0 :max 100 :value {memory.percentage} :time-range "30s" :line-style "round" ) ) ) (centerbox (box :orientation "h" :space-evenly false (label :xalign 0.5 :class "bg-icon" :text "") (label :xalign 0 :class "bg-text bg-title" :text "Swap") ) (box) (box :orientation "h" (label :xalign 1 :class "bg-text bg-title" :text "(${memory.swaptotal})") ) ) (box :orientation "h" (label :halign "start" :xalign 0 :class "bg-cool-text" :text "+${memory.swapused}") (label :halign "end" :xalign 1 :class "bg-cool-text" :text "-${memory.swapfree}") ) (button ; Button to make this not draggable ; (scale ; :class "bg-progress" ; :value {memory.swappercentage} ; ) (box :class "bg-graph-container" (graph :class "bg-graph" :width 100 :height 50 :thickness 3 :min 0 :max 100 :value {memory.swappercentage} :time-range "30s" :line-style "round" ) ) ) ) (box :space-evenly false :orientation "v" :class "bg-module" :valign "end" (centerbox (box :orientation "h" :space-evenly false (label :xalign 0.5 :class "bg-icon" :text "") (label :xalign 0 :class "bg-text bg-title" :text "Disk usage") ) (box) (box :orientation "h" (label :xalign 1 :class "bg-text bg-title" :text "(${disksize})") ) ) (box :orientation "h" (label :halign "start" :xalign 0 :class "bg-cool-text" :text "+${diskused}") (label :halign "end" :xalign 1 :class "bg-cool-text" :text "-${diskfree}") ) (button ; Button to make this not draggable (scale :class "bg-progress" :value {diskfreepercent} ) ) ) ) ) ) (defwindow bg-decor :focusable false :stacking "bottom" :windowtype "normal" :wm-ignore true :geometry (geometry :x 0 :y 0 :width "100%" :height "100%" :anchor "left center" ) :monitor 0 (bgdecors) )