eww: syswin layout change

This commit is contained in:
soraefir 2023-11-21 20:33:19 +01:00
parent c58f0dceda
commit 66bb6d3d6b
3 changed files with 47 additions and 44 deletions

View File

@ -30,7 +30,9 @@ color: $base0B;
font-weight: 900;
}
.cpu-core-usage, .gpu-core-usage {
.cpu-core-usage, .gpu-core-usage, .memory-usage {
background-color: $bg0;
border-radius: $border-radius;
padding: 2pt;
@ -38,26 +40,34 @@ color: $base0B;
}
.cpu-core-usage trough *, .gpu-core-usage trough * {
.cpu-core-usage trough * {
background-color: $base0C;
border-radius: $border-radius;
padding: 2pt;
}
.gpu-core-usage trough * {
background-color: $base0E;
border-radius: $border-radius;
padding: 2pt;
}
.memory-usage trough * {
background-color: $base08;
border-radius: $border-radius;
padding: 2pt;
}
.spacer {
color: $bg1;
padding: $gaps-window;
margin:0;
}
.sys-win {
margin: $gaps-screen;
}
.sys-win-sub {
@include window;
background-color: $bg1;
color: $fg;
margin: $gaps-screen;
padding: .5em;
margin: $gaps-window;
}

View File

@ -66,13 +66,7 @@ tooltip {
margin: $gaps-screen 0;
}
scale trough {
background-color: $bg1;
border-radius: 24px;
margin: 0 1rem;
min-height: 10px;
min-width: 70px;
}
.grey {
background-color: $base02;

View File

@ -1,16 +1,18 @@
(defwidget cpu-sys-win []
(box
:orientation "v"
:space-evenly false
:class "sys-win-sub"
(box
:orientation "v"
(for core in {EWW_CPU.cores}
(box
:space-evenly false
:class "cpu-core ${core.core}"
(progress
:value {core.usage}
:orientation "v"
:orientation "h"
:flipped true
:class "cpu-core-usage"
:tooltip "core${core.core} @ ${core.freq}Mhz"
@ -18,68 +20,60 @@
)
)
)
(box :class "spacer" "")
(progress
:value {100*memory.used/memory.total}
:orientation "v"
:flipped true
:class "gpu-core-usage"
:tooltip "RAM"
)
)
)
(defwidget gpu-sys-win []
(box
:orientation "v"
:space-evenly false
:class "sys-win-sub"
(progress
:value {gpu.devices[0].GRBM2.CommandProcessor-Compute.value}
:orientation "v"
:orientation "h"
:flipped true
:class "gpu-core-usage"
:tooltip "Compute"
)
(progress
:value {gpu.devices[0].GRBM2.CommandProcessor-Fetcher.value}
:orientation "v"
:orientation "h"
:flipped true
:class "gpu-core-usage"
:tooltip "Fetcher"
)
(progress
:value {gpu.devices[0].GRBM2.CommandProcessor-Graphics.value}
:orientation "v"
:orientation "h"
:flipped true
:class "gpu-core-usage"
:tooltip "Graphics"
)
(box :class "spacer" "")
(box :class "spacer")
(progress
:value {gpu.devices[0].gpu_activity.GFX.value}
:orientation "v"
:orientation "h"
:flipped true
:class "gpu-core-usage"
:tooltip "GFX"
)
(progress
:value {gpu.devices[0].gpu_activity.Memory.value}
:orientation "v"
:orientation "h"
:flipped true
:class "gpu-core-usage"
:tooltip "Memory"
)
(progress
:value {gpu.devices[0].gpu_activity.MediaEngine.value}
:orientation "v"
:orientation "h"
:flipped true
:class "gpu-core-usage"
:tooltip "Media"
)
(box :class "spacer" "")
(box :class "spacer")
(progress
:value {100*gpu.devices[0].VRAM.TotalVRAMUsage.value/gpu.devices[0].VRAM.TotalVRAM.value}
:orientation "v"
:orientation "h"
:flipped true
:class "gpu-core-usage"
:tooltip "VRAM"
@ -90,23 +84,28 @@
(defwidget ram-sys-win []
(box
:space-evenly false
:class "sys-win-sub"
(progress
:value {100*memory.used/memory.total}
:orientation "h"
:flipped true
:class "memory-usage"
:tooltip "RAM"
)
)
)
(defwidget sys-win []
(box
:class "sys-win"
:space-evenly false
:orientation "v"
(box
:space-evenly false
:orientation "h"
(cpu-sys-win)
(box :class "spacer")
(box :class "spacer")
(gpu-sys-win)
)
(box :class "spacer")
(box :class "spacer")
(ram-sys-win)
)
)