update eww perf widget

This commit is contained in:
primardj 2024-03-25 00:50:41 +00:00
parent 371f2cd91c
commit b191db5e6b
2 changed files with 291 additions and 226 deletions

View file

@ -7,46 +7,97 @@
} }
.perf_box { .proc_box {
margin-left: 7px; margin-left: 4px;
margin-right: 4px;
} }
.perf_bar { .perf_bar {
/*color: #FFFFFF;*/ /*color: #FFFFFF;*/
/*background: #1d2021;*/ /*background: #1d2021;*/
margin: 5px; margin: 3px 6px;
progress { progress {
min-width: 17px; min-width: 25px;
border-radius: 4px;
background: #ff5d00; background: #ff5d00;
} }
} }
.perf_box {
margin-left: 8px;
margin-right: 4px;
}
.bat_bar { .bat_bar {
margin: 3px; margin: 3px 3px;
progress { progress {
min-width: 13px; min-width: 19px;
border-radius: 4px;
background: #ff9900; background: #ff9900;
} }
} }
.ram_bar { .ram_bar {
margin: 3px; margin: 3px 3px;
progress { progress {
min-width: 13px; min-width: 19px;
border-radius: 4px;
background: #ff8866; background: #ff8866;
} }
} }
.swap_bar { .swap_bar {
margin: 3px; margin: 3px 3px;
progress { progress {
min-width: 13px; min-width: 19px;
border-radius: 4px;
background: #444444; background: #444444;
} }
} }
.perf_label {
color: #FFA500;
margin-top: 3px;
padding: 5px 10px 5px 10px;
background: rgba(54,42,40,1.0);
border-radius: 10px;
}
.val_label {
color: #FFA500;
margin: 3px 0px 3px 4px;
padding: 5px 10px 5px 10px;
background: rgba(54,42,40,1.0);
border-radius: 10px;
}
.disks_box {
color: #FFA500;
margin: 3px 0px 3px 0px;
padding: 5px 10px 5px 10px;
background: rgba(54,42,40,1.0);
border-radius: 10px;
}
.disk_bar {
margin: 3px 3px;
background: rgba(45,21,20,1.0);
border-radius: 4px;
progress {
/*min-width: 10px;*/
border-radius: 4px;
background: #aacc44;
}
}

View file

@ -15,8 +15,20 @@
:initial "0" :initial "0"
`echo $(free | grep Swap | awk '{print $4/$2 * 100.0}') | cut -d '.' -f 1 `) `echo $(free | grep Swap | awk '{print $4/$2 * 100.0}') | cut -d '.' -f 1 `)
(defpoll all_disks :interval "1s"
:initial ""
`print_yuck_disks_mounted`)
;(defvar all_disks
; "(box :orientation 'v'
; (label :text 'Jaaj 1')
; (label :text 'Jaaj 2'))" )
(defwidget perf [] (defwidget perf []
(box
:space-evenly false
:orientation "v"
(box (box
:space-evenly false :space-evenly false
:orientation "h" :orientation "h"
@ -26,7 +38,7 @@
:orientation "v" :orientation "v"
(box (box
:space-evenly false :space-evenly false
:height 500 :height 499
:orientation "h" :orientation "h"
:class "proc_box" :class "proc_box"
(progress (progress
@ -80,7 +92,7 @@
:orientation "v" :orientation "v"
:class "perf_bar")) :class "perf_bar"))
(label (label
:class "val_label" :class "perf_label"
:text "${cpu_avg} %") :text "${cpu_avg} %")
) )
(box (box
@ -93,7 +105,7 @@
(box (box
:space-evenly false :space-evenly false
:orientation "h" :orientation "h"
:height 152 :height 143
:class "perf_box" :class "perf_box"
(progress (progress
:flipped true :flipped true
@ -146,7 +158,7 @@
(box (box
:space-evenly false :space-evenly false
:orientation "h" :orientation "h"
:height 152 :height 143
:class "perf_box" :class "perf_box"
(progress (progress
:flipped true :flipped true
@ -199,7 +211,7 @@
(box (box
:space-evenly false :space-evenly false
:orientation "h" :orientation "h"
:height 152 :height 143
:class "perf_box" :class "perf_box"
(progress (progress
:flipped true :flipped true
@ -249,6 +261,8 @@
) )
) )
(literal :content all_disks)
)
) )