From fc54b89b57a838549fac9b1cd3868d6c793b981e Mon Sep 17 00:00:00 2001 From: hesam-init Date: Fri, 28 Jun 2024 22:44:52 +0330 Subject: [PATCH] fix: eww control panel --- hypr-configs/hyprland/eww/eww.scss | 6 +- .../hyprland/eww/src/control-panel/main.yuck | 83 +++++++++++-------- 2 files changed, 55 insertions(+), 34 deletions(-) diff --git a/hypr-configs/hyprland/eww/eww.scss b/hypr-configs/hyprland/eww/eww.scss index 0c317db..b6afb0d 100644 --- a/hypr-configs/hyprland/eww/eww.scss +++ b/hypr-configs/hyprland/eww/eww.scss @@ -1,4 +1,4 @@ -@import "./assets/themes/feverblush.scss"; +@import "./assets/themes/fullerene.scss"; @import "./src/sidebar/styles.scss"; @@ -21,6 +21,10 @@ // font-smooth: never; } +.border { + border: 2px white solid; +} + tooltip { background-color: $surface0; color: $white0; diff --git a/hypr-configs/hyprland/eww/src/control-panel/main.yuck b/hypr-configs/hyprland/eww/src/control-panel/main.yuck index 2a09869..dd64b44 100644 --- a/hypr-configs/hyprland/eww/src/control-panel/main.yuck +++ b/hypr-configs/hyprland/eww/src/control-panel/main.yuck @@ -8,9 +8,11 @@ ) :stacking "overlay" :monitor 0 - (control_widget)) + + (control_widget) +) -(defwidget control_widget[?short] +(defwidget control_widget [] (box :class "controlpanelwindow" :space-evenly false @@ -20,24 +22,27 @@ (user) (chooser) ; (weather) - (coolmpd :h 150 :permashow true) + + ; (coolmpd :h 150 :permashow true) + (box :orientation "h" :space-evenly false - :height 160 + :height 180 :halign "fill" (timer) (bigslides)) + (box :space-evenly false :orientation "v" :vexpand true - :visible {!short} - (tricontrol) - (notiweathertoggle)) + :visible true + (toolbox) + (notifications_weather_box)) )) -(defwidget tricontrol[] +(defwidget toolbox [] (eventbox :cursor "pointer" (box @@ -231,7 +236,7 @@ (label :halign "start" :text "${datehour < 12 ? 'Good morning' : datehour < 18 ? 'Good afternoon' : datehour < 22 ? 'Good evening' : 'Good night'} ${hostname}") (label :halign "start" :text uptime :style "font-size: 12px;")))))) -(defwidget notiweathertoggle[] +(defwidget notifications_weather_box [] (box :orientation "v" :halign "fill" @@ -239,6 +244,7 @@ :vexpand true :class "unbarwidget" :space-evenly false + (box :orientation "h" (button @@ -253,13 +259,19 @@ :vexpand true :hexpand true :space-evenly false + (revealer :reveal {!revealWeather} - :transition "slideright" + :hexpand {!revealWeather} + :transition "slideleft" + (notificationlog)) + (revealer :reveal revealWeather - :transition "slideleft" + :hexpand revealWeather + :transition "slideright" + (weather))))) (defwidget weather[] @@ -268,9 +280,9 @@ :orientation "v" :halign "fill" :valign "fill" - :width 320 :vexpand true :space-evenly false + (weathermain) (scroll :hscroll false @@ -419,20 +431,20 @@ :text "󰃞"))) (defwidget notificationlog [] - (box - :halign "fill" - :valign "fill" - :width 320 - :vexpand true - :space-evenly false - :orientation "v" - (overlay + (overlay + (box + :halign "fill" + :valign "fill" :vexpand true + :space-evenly false + :orientation "v" + (scroll :hscroll false :vscroll true :vexpand true :valign "fill" + (box :orientation "v" :valign "start" @@ -445,19 +457,24 @@ :hexpand true :vexpand false :height 80 - :class "fadeoutbox")) - (box - :orientation "h" - (button - :onclick "./scripts/notifManage --clear" - (label - :class "title" - :text "Clear All")) - (button - :onclick "./scripts/notifManage --toggle" - (label - :class { notifications.dnd ? "titlesel" : "title"} - :text "Do Not Disturb"))))) + :class "fadeoutbox") + (box + :orientation "h" + (button + :onclick "./scripts/notifManage --clear" + (label + :class "title" + :text "Clear All")) + (button + :onclick "./scripts/notifManage --toggle" + (label + :class { notifications.dnd ? "titlesel" : "title"} + :text "Do Not Disturb"))) + ) + + ) + +) (defwidget quote [] (box