fix: eww control panel

This commit is contained in:
hesam-init 2024-06-28 22:44:52 +03:30
parent 5a593d3ea1
commit fc54b89b57
2 changed files with 55 additions and 34 deletions

View file

@ -1,4 +1,4 @@
@import "./assets/themes/feverblush.scss"; @import "./assets/themes/fullerene.scss";
@import "./src/sidebar/styles.scss"; @import "./src/sidebar/styles.scss";
@ -21,6 +21,10 @@
// font-smooth: never; // font-smooth: never;
} }
.border {
border: 2px white solid;
}
tooltip { tooltip {
background-color: $surface0; background-color: $surface0;
color: $white0; color: $white0;

View file

@ -8,9 +8,11 @@
) )
:stacking "overlay" :stacking "overlay"
:monitor 0 :monitor 0
(control_widget))
(control_widget)
)
(defwidget control_widget[?short] (defwidget control_widget []
(box (box
:class "controlpanelwindow" :class "controlpanelwindow"
:space-evenly false :space-evenly false
@ -20,24 +22,27 @@
(user) (user)
(chooser) (chooser)
; (weather) ; (weather)
(coolmpd :h 150 :permashow true)
; (coolmpd :h 150 :permashow true)
(box (box
:orientation "h" :orientation "h"
:space-evenly false :space-evenly false
:height 160 :height 180
:halign "fill" :halign "fill"
(timer) (timer)
(bigslides)) (bigslides))
(box (box
:space-evenly false :space-evenly false
:orientation "v" :orientation "v"
:vexpand true :vexpand true
:visible {!short} :visible true
(tricontrol) (toolbox)
(notiweathertoggle)) (notifications_weather_box))
)) ))
(defwidget tricontrol[] (defwidget toolbox []
(eventbox (eventbox
:cursor "pointer" :cursor "pointer"
(box (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 "${datehour < 12 ? 'Good morning' : datehour < 18 ? 'Good afternoon' : datehour < 22 ? 'Good evening' : 'Good night'} ${hostname}")
(label :halign "start" :text uptime :style "font-size: 12px;")))))) (label :halign "start" :text uptime :style "font-size: 12px;"))))))
(defwidget notiweathertoggle[] (defwidget notifications_weather_box []
(box (box
:orientation "v" :orientation "v"
:halign "fill" :halign "fill"
@ -239,6 +244,7 @@
:vexpand true :vexpand true
:class "unbarwidget" :class "unbarwidget"
:space-evenly false :space-evenly false
(box (box
:orientation "h" :orientation "h"
(button (button
@ -253,13 +259,19 @@
:vexpand true :vexpand true
:hexpand true :hexpand true
:space-evenly false :space-evenly false
(revealer (revealer
:reveal {!revealWeather} :reveal {!revealWeather}
:transition "slideright" :hexpand {!revealWeather}
:transition "slideleft"
(notificationlog)) (notificationlog))
(revealer (revealer
:reveal revealWeather :reveal revealWeather
:transition "slideleft" :hexpand revealWeather
:transition "slideright"
(weather))))) (weather)))))
(defwidget weather[] (defwidget weather[]
@ -268,9 +280,9 @@
:orientation "v" :orientation "v"
:halign "fill" :halign "fill"
:valign "fill" :valign "fill"
:width 320
:vexpand true :vexpand true
:space-evenly false :space-evenly false
(weathermain) (weathermain)
(scroll (scroll
:hscroll false :hscroll false
@ -419,20 +431,20 @@
:text "󰃞"))) :text "󰃞")))
(defwidget notificationlog [] (defwidget notificationlog []
(box (overlay
:halign "fill" (box
:valign "fill" :halign "fill"
:width 320 :valign "fill"
:vexpand true
:space-evenly false
:orientation "v"
(overlay
:vexpand true :vexpand true
:space-evenly false
:orientation "v"
(scroll (scroll
:hscroll false :hscroll false
:vscroll true :vscroll true
:vexpand true :vexpand true
:valign "fill" :valign "fill"
(box (box
:orientation "v" :orientation "v"
:valign "start" :valign "start"
@ -445,19 +457,24 @@
:hexpand true :hexpand true
:vexpand false :vexpand false
:height 80 :height 80
:class "fadeoutbox")) :class "fadeoutbox")
(box (box
:orientation "h" :orientation "h"
(button (button
:onclick "./scripts/notifManage --clear" :onclick "./scripts/notifManage --clear"
(label (label
:class "title" :class "title"
:text "Clear All")) :text "Clear All"))
(button (button
:onclick "./scripts/notifManage --toggle" :onclick "./scripts/notifManage --toggle"
(label (label
:class { notifications.dnd ? "titlesel" : "title"} :class { notifications.dnd ? "titlesel" : "title"}
:text "Do Not Disturb"))))) :text "Do Not Disturb")))
)
)
)
(defwidget quote [] (defwidget quote []
(box (box