integrated vikingowls settings

This commit is contained in:
2025-03-08 19:35:19 +01:00
parent 36396382cc
commit 0590bcc89f
6 changed files with 99 additions and 66 deletions

View File

@@ -1,14 +1,9 @@
.activewindow{ .activewindow{
background: lightgreen; background: lightgreen;
color: black; color: black;
&--xwayland{ &--xwayland{
background: red; background: maroon;
color: black;
}
&--tooltip{
background: darkgrey;
color: white; color: white;
} }
} }

View File

@@ -1,4 +1,4 @@
(deflisten activewindow :initial "..." "RUST_BACKTRACE=1 hyprman -a 2>>/tmp/eww_hyprman_activewindow.log") (deflisten activewindow :initial "..." "hyprman -a 2>>/tmp/eww_hyprman_activewindow.log")
(defvar windowIcons (defvar windowIcons
`{ `{
@@ -15,20 +15,18 @@
(defwidget windowIcon [] (defwidget windowIcon []
(image (image
:limit-width 10
:icon-size: 12 :icon-size: 12
:icon {activewindow.class})) :icon {activewindow.class}))
(defwidget hypr_active_window [] (defwidget hypr_active_window []
(tooltip (tooltip
(label :class "activewindow--tooltip" :text {activewindow.title}) (label :text {activewindow.title})
(box (box
:class "activewindow${activewindow.xwayland == true ? '--xwayland' : ''}" :class "activewindow${activewindow.xwayland == true ? '--xwayland' : ''}"
:halign "left" :halign "left"
:valign "center" :valign "center"
:spacing 1 :spacing 3
(label (label
:limit-width 25 :limit-width 25
:unindent true :unindent true
:text "${activewindow.class}")))) :text "${windowIcons[activewindow.class] ?: windowIcons['generic']} ${activewindow.class}"))))

View File

@@ -1,19 +1,35 @@
.workspacecontainer{ .workspaces {
background: orange; /* Green */
} $light: #bad012;
$dark: #53730a;
/* Orange */
//$light: #fde10e;
//$dark: #ff6520;
background: $dark;
padding: 3px 1rem;
&--ws {
border-radius: 50%;
font-family: 'Symbols Nerd Font Mono';
border: 1px solid blue;
color: black;
.workspace{ &--label {
border-radius: 1rem 1rem; font-size: 0.7rem;
font-family: 'Symbols Nerd Font Mono'; }
font-size: 16px;
border: 1px solid blue; &--active {
color: black; background: $light;
} color: $dark;
border-color: $light;
.wsactive{ }
background: red;
} &--inactive {
background: $dark;
.wsinactive{ color: $dark;
background: yellow; border-color: $light;
}
}
} }

View File

@@ -8,18 +8,19 @@
(defwidget hypr_workspaces [] (defwidget hypr_workspaces []
(box (box
:class "workspacecontainer" :class "workspaces"
:space-evenly false :space-evenly false
:spacing 3 :spacing 3
(for workspace in workspaces (for workspace in workspaces
(eventbox (eventbox
:width 20
:height 20 :height 20
:width 20
:onclick "hyprctl dispatch workspace ${workspace.id}" :onclick "hyprctl dispatch workspace ${workspace.id}"
:cursor "pointer"
:tooltip "${workspace.name}" :tooltip "${workspace.name}"
:class "workspace ${workspace.active == true ? 'wsactive' : 'wsinactive'}" :class "workspaces--ws ${workspace.active == true ? 'workspaces--ws--active' : 'workspaces--ws--inactive'}"
(label (label
:xalign 0 :class "workspaces--ws--label"
:xalign 0.2
:yalign 0.5 :yalign 0.5
:limit-width 1
:text "${workspace.windows > 0 ? workspaceIcons.full : workspaceIcons.empty}"))))) :text "${workspace.windows > 0 ? workspaceIcons.full : workspaceIcons.empty}")))))

View File

@@ -1,19 +1,42 @@
.sysmon{ .sysmon{
background: darkred; * {
border-radius: 0;
}
$border-middle: 1px solid black;
background: transparent;
color: black; color: black;
}
.danger{ .first {
color: red border-radius: 1.5rem 0 0 1rem;
} border-right: $border-middle;
.ram{ }
background: tan;
} .middle {
.disk{ border-right: $border-middle;
background: mediumturquoise; }
}
.cpu{ .last {
background: lightgreen; border-radius: 0 1rem 1.5rem 0;
} }
.net{ .danger{
background: plum; color: red
}
.ram{
background: tan;
}
.disk{
background: mediumturquoise;
}
.cpu{
background: lightgreen;
}
.net{
background: plum;
}
} }

View File

@@ -4,27 +4,27 @@
(box (box
:class 'sysmon' :class 'sysmon'
:space-evenly false :space-evenly false
:spacing 1 :spacing 0
(cpu) (cpu :class "first")
(ram) (ram :class "middle")
(disk) (disk :class "middle")
(net))) (net :class "last")))
(defwidget ram [] (defwidget ram [class]
(tooltip (tooltip
:class 'ram ${EWW_RAM.used_mem_perc > 90 ? 'danger' : ''}' :class 'ram ${EWW_RAM.used_mem_perc > 90 ? 'danger' : ''} ${class}'
(label :text " ${round(EWW_RAM.free_swap/1000000000, 2)} GB/${round(EWW_RAM.total_swap/1000000000, 2)} GB") (label :text " ${round(EWW_RAM.free_swap/1000000000, 2)} GB/${round(EWW_RAM.total_swap/1000000000, 2)} GB")
(label :text " ${round(EWW_RAM.used_mem/1000000000, 2)} GB/${round(EWW_RAM.total_mem/1000000000, 2)} GB"))) (label :text " ${round(EWW_RAM.used_mem/1000000000, 2)} GB/${round(EWW_RAM.total_mem/1000000000, 2)} GB")))
(defwidget disk [] (defwidget disk [class]
(tooltip (tooltip
:class 'disk ${EWW_DISK["/"].used_perc > 90 ? 'danger' : ''}' :class 'disk ${EWW_DISK["/"].used_perc > 90 ? 'danger' : ''} ${class}'
(label :text " ${round(EWW_DISK["/"].free/1000000000, 2)} GB /${round(EWW_DISK["/"].total/1000000000, 2)} GB") (label :text " ${round(EWW_DISK["/"].free/1000000000, 2)} GB /${round(EWW_DISK["/"].total/1000000000, 2)} GB")
(label :text " ${round(EWW_DISK["/"].used_perc,2)}%"))) (label :text " ${round(EWW_DISK["/"].used_perc,2)}%")))
(defwidget cpu [] (defwidget cpu [class]
(tooltip (tooltip
:class 'cpu' :class 'cpu ${class}'
(box :orientation "vertical" (box :orientation "vertical"
(for cpu in {EWW_CPU.cores} (for cpu in {EWW_CPU.cores}
(box (box
@@ -42,10 +42,10 @@
(label :text "${cpu.freq} Hz ${cpu.usage}%")))) (label :text "${cpu.freq} Hz ${cpu.usage}%"))))
(label :text " ${round(EWW_CPU.avg, 2)}%"))) (label :text " ${round(EWW_CPU.avg, 2)}%")))
(defwidget net [] (defwidget net [class]
(box (box
:class 'net' :class 'net ${class}'
:space-evenly false :space-evenly false
(label :text "") (label :text "")
(label :text " ${round(EWW_NET.enp34s0.NET_UP * 8 / 1000000, 2)} Mbit") (label :text " ${round(EWW_NET[netiface].NET_UP * 8 / 1000000, 2)} Mbit")
(label :text " ${round(EWW_NET.enp34s0.NET_DOWN * 8 / 1000000, 2)} Mbit"))) (label :text " ${round(EWW_NET[netiface].NET_DOWN * 8 / 1000000, 2)} Mbit")))