From 66bb6d3d6bdb5cad62dc0e11b8d6b81a5e2782b5 Mon Sep 17 00:00:00 2001 From: soraefir Date: Tue, 21 Nov 2023 20:33:19 +0100 Subject: [PATCH] eww: syswin layout change --- .../home/wayland/apps/eww/bar/css/_sys.scss | 26 ++++++--- modules/home/wayland/apps/eww/bar/eww.scss | 8 +-- .../wayland/apps/eww/bar/windows/sys.yuck | 57 +++++++++---------- 3 files changed, 47 insertions(+), 44 deletions(-) diff --git a/modules/home/wayland/apps/eww/bar/css/_sys.scss b/modules/home/wayland/apps/eww/bar/css/_sys.scss index ea3a973..76dc192 100644 --- a/modules/home/wayland/apps/eww/bar/css/_sys.scss +++ b/modules/home/wayland/apps/eww/bar/css/_sys.scss @@ -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; } diff --git a/modules/home/wayland/apps/eww/bar/eww.scss b/modules/home/wayland/apps/eww/bar/eww.scss index fb389e0..42b2b77 100644 --- a/modules/home/wayland/apps/eww/bar/eww.scss +++ b/modules/home/wayland/apps/eww/bar/eww.scss @@ -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; diff --git a/modules/home/wayland/apps/eww/bar/windows/sys.yuck b/modules/home/wayland/apps/eww/bar/windows/sys.yuck index 392d632..98f63bb 100644 --- a/modules/home/wayland/apps/eww/bar/windows/sys.yuck +++ b/modules/home/wayland/apps/eww/bar/windows/sys.yuck @@ -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) - (gpu-sys-win) - ) + (cpu-sys-win) + (box :class "spacer") + (box :class "spacer") + (gpu-sys-win) + (box :class "spacer") + (box :class "spacer") + (ram-sys-win) ) )