diff --git a/hypr-configs/hyprland/eww/assets/scss/_modules.scss b/hypr-configs/hyprland/eww/assets/scss/_modules.scss index 72b7d1e..63f53ee 100644 --- a/hypr-configs/hyprland/eww/assets/scss/_modules.scss +++ b/hypr-configs/hyprland/eww/assets/scss/_modules.scss @@ -44,3 +44,32 @@ } } } + +.media-player { + @extend .panel-widget; + + padding: 0px; + + .player-cover { + transition: 600ms ease; + margin: get-token(margin); + border-radius: get-token(border-radius); + background-repeat: no-repeat; + background-size: cover; + background-position: center; + opacity: 0.1; + } + + .player-controls { + label { + font-size: get-token(font-sizes, large); + padding: 15px; + } + } + + .player-info { + label { + font-size: get-token(font-sizes, large); + } + } +} diff --git a/hypr-configs/hyprland/eww/assets/scss/_native.scss b/hypr-configs/hyprland/eww/assets/scss/_native.scss index d48c222..9e7c0a2 100644 --- a/hypr-configs/hyprland/eww/assets/scss/_native.scss +++ b/hypr-configs/hyprland/eww/assets/scss/_native.scss @@ -68,6 +68,7 @@ checkbutton { border-radius: 24px; background-color: $surface1; padding: 4px; + check { min-height: 15px; min-width: 15px; diff --git a/hypr-configs/hyprland/eww/assets/scss/windows/_control-panel.scss b/hypr-configs/hyprland/eww/assets/scss/windows/_control-panel.scss index c1c6075..95c8e7b 100644 --- a/hypr-configs/hyprland/eww/assets/scss/windows/_control-panel.scss +++ b/hypr-configs/hyprland/eww/assets/scss/windows/_control-panel.scss @@ -1,5 +1,5 @@ .control-panel { - padding: 0.4em; + padding: get-token(padding, small); background-color: $base; } @@ -94,21 +94,6 @@ margin: 5px; } -.coolmpd label { - color: $white0; -} - -.mpdcover { - transition: 500ms ease; - background-color: $surface0; - margin: 5px; - border-radius: 5px; - background-repeat: no-repeat; - background-size: cover; - background-position: center; - opacity: 0.3; -} - .circiconcontain { border-radius: 70px; background-color: $surface0; diff --git a/hypr-configs/hyprland/eww/src/dashboard/styles.scss b/hypr-configs/hyprland/eww/assets/scss/windows/_dashboard.scss similarity index 65% rename from hypr-configs/hyprland/eww/src/dashboard/styles.scss rename to hypr-configs/hyprland/eww/assets/scss/windows/_dashboard.scss index c1bca56..d73c058 100644 --- a/hypr-configs/hyprland/eww/src/dashboard/styles.scss +++ b/hypr-configs/hyprland/eww/assets/scss/windows/_dashboard.scss @@ -1,3 +1,9 @@ +.dashboard { + padding: get-token(padding); + border-radius: get-token(border-radius); + background-color: $base; +} + .heading { font-size: 25px; color: $accent; diff --git a/hypr-configs/hyprland/eww/assets/scss/windows/_vertical-bar.scss b/hypr-configs/hyprland/eww/assets/scss/windows/_vertical-bar.scss index 5832b2d..0a0fc91 100644 --- a/hypr-configs/hyprland/eww/assets/scss/windows/_vertical-bar.scss +++ b/hypr-configs/hyprland/eww/assets/scss/windows/_vertical-bar.scss @@ -26,22 +26,6 @@ background-color: $red; } -// .mpd label { -// color: $sky; -// } -// -// .playerctl label { -// color: $sapphire; -// } - -.mpd_controls label { - font-family: "Symbols Nerd Font"; - min-width: 1em; - min-height: 1em; - font-size: 30px; - padding: 15px; -} - .seektime { trough { min-height: 10px; diff --git a/hypr-configs/hyprland/eww/eww.scss b/hypr-configs/hyprland/eww/eww.scss index eb61254..9e8e058 100644 --- a/hypr-configs/hyprland/eww/eww.scss +++ b/hypr-configs/hyprland/eww/eww.scss @@ -6,8 +6,8 @@ @import "./assets/scss/windows/control-panel"; @import "./assets/scss/windows/vertical-bar"; +@import "./assets/scss/windows/dashboard"; -@import "./src/dashboard/styles.scss"; @import "./src/dock/styles.scss"; @import "./src/desktop/styles.scss"; @import "./src/notification/styles.scss"; diff --git a/hypr-configs/hyprland/eww/eww.yuck b/hypr-configs/hyprland/eww/eww.yuck index 2592b13..0bd933c 100644 --- a/hypr-configs/hyprland/eww/eww.yuck +++ b/hypr-configs/hyprland/eww/eww.yuck @@ -12,11 +12,11 @@ (include "./src/windows/_vertical-bar.yuck") (include "./src/windows/_control-panel.yuck") +(include "./src/windows/_dashboard.yuck") (include "./setups.yuck") (include "./src/wallpapers/main.yuck") -(include "./src/dashboard/main.yuck") (include "./src/dock/main.yuck") (include "./src/desktop/main.yuck") (include "./src/notification/main.yuck") diff --git a/hypr-configs/hyprland/eww/setups.yuck b/hypr-configs/hyprland/eww/setups.yuck index 547715f..d6cce2d 100644 --- a/hypr-configs/hyprland/eww/setups.yuck +++ b/hypr-configs/hyprland/eww/setups.yuck @@ -21,4 +21,15 @@ :exclusive true :wm-ignore false - (VerticalBar)) \ No newline at end of file + (VerticalBar)) + +(defwindow dashboard + :geometry (geometry + :x 0 + :y 0 + :width 800 + :height 420 + :anchor "center") + :stacking "overlay" + :monitor 0 + (Dashboard)) diff --git a/hypr-configs/hyprland/eww/src/-modules/_media.yuck b/hypr-configs/hyprland/eww/src/-modules/_media.yuck index 4096a4c..7ae64f7 100644 --- a/hypr-configs/hyprland/eww/src/-modules/_media.yuck +++ b/hypr-configs/hyprland/eww/src/-modules/_media.yuck @@ -20,6 +20,56 @@ (button :onclick "playerctl next" (label :class "icon" :text "󰒭"))))) +(defwidget MediaPlayer [h permashow] +(box +:class "media-player" +(overlay + (box + :orientation "v" + :halign "fill" + :height h + :class { pcover != "" ? "player-cover" : ""} + :style "background-image: url('${pcover}')" + :visible {permashow ? true : pcover != "" }) + (box + :orientation "h" + :space-evenly false + :halign "center" + :valign "center" + :spacing 10 + (image :image-width 100 :image-height 100 :path { pcover == "" ? "./assets/image/emptympd.png" : pcover }) + (box + :orientation "v" + :space-evenly false + :width 200 + :halign "center" + :valign "center" + :class "player-info" + + (scroll + :hscroll true + :vscroll false + (label :text psong)) + + (scroll + :hscroll true + :vscroll false + (label :text partist)) + + (box + :orientation "h" + :class "player-controls" + (button :onclick "playerctl previous" + (label :text "󰒮")) + (button :style "padding-right: 3px;" :onclick "playerctl play-pause" + (label :text { pstatus == "Playing" ? "" : ""} )) + (button :onclick "playerctl next" + (label :text "󰒭")))))) +) + +) + + (defwindow MusicPlayerPopup :geometry (geometry :width "440" diff --git a/hypr-configs/hyprland/eww/src/_definitions.yuck b/hypr-configs/hyprland/eww/src/_definitions.yuck index ac9714c..84e3178 100644 --- a/hypr-configs/hyprland/eww/src/_definitions.yuck +++ b/hypr-configs/hyprland/eww/src/_definitions.yuck @@ -99,30 +99,30 @@ (defpoll weatherjson :initial '{ "FeelsLikeC": "0", - "FeelsLikeF": "0", - "cloudcover": "0", - "humidity": "0", - "localObsDateTime": "2000-00-00 07:27 AM", - "observation_time": "07:27 AM", - "precipInches": "0.0", - "precipMM": "0.0", - "pressure": "0", - "pressureInches": "0", - "temp_C": "0", - "temp_F": "0", - "uvIndex": "0", - "visibility": "0", - "visibilityMiles": "0", - "weatherCode": "727", - "weatherDesc": [{"value": "Idk"}], - "weatherIconUrl": [{"value": ""}], - "winddir16Point": "", - "winddirDegree": "0", - "windspeedKmph": "0", - "windspeedMiles": "0", - "icon": "idk", - "hourly": [] - }' +"FeelsLikeF": "0", +"cloudcover": "0", +"humidity": "0", +"localObsDateTime": "2000-00-00 07:27 AM", +"observation_time": "07:27 AM", +"precipInches": "0.0", +"precipMM": "0.0", +"pressure": "0", +"pressureInches": "0", +"temp_C": "0", +"temp_F": "0", +"uvIndex": "0", +"visibility": "0", +"visibilityMiles": "0", +"weatherCode": "727", +"weatherDesc": [{"value": "Idk"}], +"weatherIconUrl": [{"value": ""}], +"winddir16Point": "", +"winddirDegree": "0", +"windspeedKmph": "0", +"windspeedMiles": "0", +"icon": "idk", +"hourly": [] +}' :interval "1h" :run-while revealControlpanel "./scripts/weather.py") diff --git a/hypr-configs/hyprland/eww/src/windows/_control-panel.yuck b/hypr-configs/hyprland/eww/src/windows/_control-panel.yuck index b3ba48f..52bb70e 100644 --- a/hypr-configs/hyprland/eww/src/windows/_control-panel.yuck +++ b/hypr-configs/hyprland/eww/src/windows/_control-panel.yuck @@ -10,7 +10,7 @@ (chooser) ; (weather) - (coolmpd :h 160 :permashow true) + (MediaPlayer :h 160 :permashow true) (box :orientation "h" @@ -478,45 +478,4 @@ :width 300)) (label :class "quoteauthor" - :text "- ${quotejson.author}"))) - -(defwidget coolmpd [h permashow] - (overlay - (box - :orientation "v" - :halign "fill" - :height h - :class { pcover != "" ? "mpdcover" : "panel-widget"} - :style "background-image: url('${pcover}')" - :visible {permashow ? true : pcover != "" }) - (box - :orientation "h" - :space-evenly false - :halign "center" - :valign "center" - :spacing 10 - (image :image-width 100 :image-height 100 :path { pcover == "" ? "./assets/image/emptympd.png" : pcover }) - (box - :orientation "v" - :space-evenly false - :width 200 - :halign "center" - :valign "center" - :class "coolmpd" - (scroll - :hscroll true - :vscroll false - (label :style "font-size: 20px;" :text psong)) - (scroll - :hscroll true - :vscroll false - (label :text partist)) - (box - :orientation "h" - :class "mpd_controls" - (button :onclick "playerctl previous" - (label :text "󰒮")) - (button :style "padding-right: 3px;" :onclick "playerctl play-pause" - (label :text { pstatus == "Playing" ? "" : ""} )) - (button :onclick "playerctl next" - (label :text "󰒭"))))))) + :text "- ${quotejson.author}"))) \ No newline at end of file diff --git a/hypr-configs/hyprland/eww/src/dashboard/main.yuck b/hypr-configs/hyprland/eww/src/windows/_dashboard.yuck similarity index 94% rename from hypr-configs/hyprland/eww/src/dashboard/main.yuck rename to hypr-configs/hyprland/eww/src/windows/_dashboard.yuck index 3b659de..699be7e 100644 --- a/hypr-configs/hyprland/eww/src/dashboard/main.yuck +++ b/hypr-configs/hyprland/eww/src/windows/_dashboard.yuck @@ -1,29 +1,22 @@ - -(defwindow dashboard - :geometry (geometry - :x 0 - :y 0 - :width 800 - :height 420 - :anchor "center") - :stacking "overlay" - :monitor 0 - (structure)) - -(defwidget structure [] +(defwidget Dashboard [] (box - :class "popup" + :class "dashboard" :space-evenly false :orientation "v" + (duser :name "Failed" :tag "failed.sh" :pfp "./assets/image/roundpfp.png") + (box :space-evenly true :orientation "h" :vexpand true + (box :space-evenly false :orientation "v" - (coolmpd :h 150 :permashow true) + + (MediaPlayer :h 150 :permashow true) + (box :space-evenly false :orientation "h" @@ -35,6 +28,7 @@ (theme)) (dcal) )) + (box :orientation "v" :space-evenly false