diff --git a/hypr-configs/hyprland/eww/assets/scss/_components.scss b/hypr-configs/hyprland/eww/assets/scss/_components.scss index fe25c49..2b38c0a 100644 --- a/hypr-configs/hyprland/eww/assets/scss/_components.scss +++ b/hypr-configs/hyprland/eww/assets/scss/_components.scss @@ -20,25 +20,25 @@ } .vertical-bar-slider { - scale { - all: unset; + trough { + background-color: $surface2; + border-radius: get-token(border-radius); + min-height: 80px; + min-width: 10px; - trough { - background-color: $surface2; + slider { + background-color: $white2; + border-radius: get-token(border-radius, large); + margin: -10px; + } + + highlight { + background-color: $white0; border-radius: get-token(border-radius); - min-height: 80px; - min-width: 10px; - - slider { - background-color: $white2; - border-radius: get-token(border-radius, large); - margin: -10px; - } - - highlight { - background-color: $white0; - border-radius: get-token(border-radius); - } } } + + .volume-icon { + 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 86aac40..0287660 100644 --- a/hypr-configs/hyprland/eww/assets/scss/_native.scss +++ b/hypr-configs/hyprland/eww/assets/scss/_native.scss @@ -17,6 +17,10 @@ entry { color: $white0; } +scale { + all: unset; +} + calendar { all: unset; background-color: $surface0; diff --git a/hypr-configs/hyprland/eww/assets/scss/windows/_osd.scss b/hypr-configs/hyprland/eww/assets/scss/windows/_osd.scss index 15ea1da..a761130 100644 --- a/hypr-configs/hyprland/eww/assets/scss/windows/_osd.scss +++ b/hypr-configs/hyprland/eww/assets/scss/windows/_osd.scss @@ -1,10 +1,24 @@ -@mixin window { - border-radius: 1rem; - padding: 1rem; - box-shadow: 0 0 4px 2px; - margin: 1rem; +.volume-osd { + @extend .panel-widget; + border-radius: get-token(border-radius, large); + + min-width: 320px; } -.volume-osd { - @include window; +.volume-scale { + trough { + border-radius: get-token(border-radius, large); + min-height: 32px; + background-color: $surface1; + + highlight { + border-radius: get-token(border-radius, large); + background-color: $accent; + } + } + + .volume-icon { + font-size: get-token(font-sizes, large); + margin-left: 8px; + } } diff --git a/hypr-configs/hyprland/eww/eww.scss b/hypr-configs/hyprland/eww/eww.scss index ad09f19..425b5ff 100644 --- a/hypr-configs/hyprland/eww/eww.scss +++ b/hypr-configs/hyprland/eww/eww.scss @@ -8,6 +8,7 @@ @import "./assets/scss/windows/control-panel"; @import "./assets/scss/windows/vertical-bar"; @import "./assets/scss/windows/dashboard"; +@import "./assets/scss/windows/osd"; @import "./src/dock/styles.scss"; @import "./src/desktop/styles.scss"; diff --git a/hypr-configs/hyprland/eww/setups.yuck b/hypr-configs/hyprland/eww/setups.yuck index e254e54..3071f2e 100644 --- a/hypr-configs/hyprland/eww/setups.yuck +++ b/hypr-configs/hyprland/eww/setups.yuck @@ -5,42 +5,42 @@ :y 10 :width 340 :anchor "top left" - ) + ) :stacking "overlay" :monitor 0 - + (ControlPanel)) (defwindow bar :geometry (geometry - :anchor "center left" + :anchor "center left" :height "100%") - + :monitor 0 :exclusive true :wm-ignore false - + (VerticalBar)) (defwindow dashboard - :geometry (geometry - :x 0 - :y 0 - :width 800 - :height 420 - :anchor "center") - :stacking "overlay" - :monitor 0 - (Dashboard)) + :geometry (geometry + :x 0 + :y 0 + :width 800 + :height 420 + :anchor "center") + :stacking "overlay" + :monitor 0 + (Dashboard)) (defwindow osd - :monitor 0 - :stacking "overlay" - :geometry (geometry - :anchor "bottom center" - :width "2px" - :height "2px" - ) - (VolumeOsd) + :monitor 0 + :stacking "overlay" + :geometry (geometry + :anchor "bottom center" + :width "2px" + :height "2px" + ) + (VolumeOsd) ) \ No newline at end of file diff --git a/hypr-configs/hyprland/eww/src/-components/_sliders.yuck b/hypr-configs/hyprland/eww/src/-components/_sliders.yuck index b230c33..0f42831 100644 --- a/hypr-configs/hyprland/eww/src/-components/_sliders.yuck +++ b/hypr-configs/hyprland/eww/src/-components/_sliders.yuck @@ -1,11 +1,10 @@ (defwidget VerticalBarSlider [var ?onchange] - (box + (scale + :value var + :onchange onchange :class "vertical-bar-slider" - (scale - :value var - :onchange onchange - :orientation "v" - :tooltip "${var}%" - :max 101 - :min 0 - :flipped true))) + :orientation "v" + :tooltip "${var}%" + :max 101 + :min 0 + :flipped true)) diff --git a/hypr-configs/hyprland/eww/src/_definitions.yuck b/hypr-configs/hyprland/eww/src/_definitions.yuck index 7668bf2..fe4af36 100644 --- a/hypr-configs/hyprland/eww/src/_definitions.yuck +++ b/hypr-configs/hyprland/eww/src/_definitions.yuck @@ -51,7 +51,7 @@ (defvar caffeine false) ; Osd -(defvar revealOsd true) +(defvar revealOsd false) ; Sidebar (defvar revealVolume false) @@ -71,13 +71,13 @@ ; Notifications (deflisten notifications :initial '{ - "count": 0, - "dnd": false, - "notifications": [], - "popups": [] - }' + "count": 0, + "dnd": false, + "notifications": [], + "popups": [] + }' "./scripts/notif.py" - ) +) ; Playerctl (deflisten pstatus :initial "" "playerctl status -F") @@ -86,9 +86,9 @@ (deflisten pcover "./scripts/pollcover.sh") (deflisten ptime :initial '{ - "position": 0, - "duration": 0, - "readable": "0:00" + "position": 0, + "duration": 0, + "readable": "0:00" }' "playerctl -F metadata -f '{ \"position\": {{position/1000000}}, \"duration\": {{mpris:length/1000000}}, \"readable\": \"{{duration(position)}}/{{duration(mpris:length)}}\" }'") ;; (deflisten pside "playerctl -F metadata -f '{ \"volume\": {{volume*100}}, \"shuffle\": \"{{shuffle}}\", \"loop\": \"{{loop}}\" }'") @@ -101,34 +101,34 @@ (defpoll uptime :initial "idk" :interval "1m" "uptime -p") (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": [] -}' + "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": [] + }' :interval "1h" :run-while revealControlpanel - "./scripts/weather.py") +"./scripts/weather.py") (defpoll datehour :initial "12" :interval "30m" "date +'%H'") (defpoll notesc :interval "2s" :run-while reveal4 "cat -s ~/Documents/fuck.txt") (defpoll quotejson :interval "1h" `./scripts/quote.py`) diff --git a/hypr-configs/hyprland/eww/src/windows/_osd.yuck b/hypr-configs/hyprland/eww/src/windows/_osd.yuck index 096eb84..24266a2 100644 --- a/hypr-configs/hyprland/eww/src/windows/_osd.yuck +++ b/hypr-configs/hyprland/eww/src/windows/_osd.yuck @@ -1,15 +1,15 @@ (defwidget VolumeOsd [] - (revealer :transition "slideup" :reveal revealOsd :duration "500ms" - (box :orientation "h" :class "volume-osd" :space-evenly false - (VolumeScale)))) + (revealer :transition "slideup" :reveal revealOsd :duration "500ms" + (box :orientation "h" :class "volume-osd" :space-evenly false + (VolumeScale)))) (defwidget VolumeScale [] - (overlay :hexpand true - (scale :min 0 :max 100 :active {volume != "muted"} :value {volume == "muted" ? 0 : volume} :onchange "pamixer --set-volume {}" :class "volume-scale") - (label :class 'volume-icon ${volume == "muted" ? "less" : volume < 5 ? "less" : "more"}' :halign "start" :text {volume == "muted" ? "󰸈" : volume < 33 ? "" : volume < 67 ? "" : ""}))) + (overlay :hexpand true :class "volume-scale" + (scale :min 0 :max 100 :active {volume != "muted"} :value {volume == "muted" ? 0 : volume} :onchange "pamixer --set-volume {}") + (label :class 'volume-icon ${volume == "muted" ? "less" : volume < 5 ? "less" : "more"}' :halign "start" :text {volume == "muted" ? "󰸈" : volume < 33 ? "" : volume < 67 ? "" : ""}))) (defwidget VolumeControlCenter [] - (box :orientation "h" :class "volume-control-center" :space-evenly false - (volume_scale) - (button :class "volume-mute ${volume == 'muted' ? 'active' : ''}" :onclick "pamixer -t" "󰝟") - (button :class "volume-arrow" :onclick "scripts/toggle_control_center.sh close && pavucontrol &" "󰅂"))) \ No newline at end of file + (box :orientation "h" :class "volume-control-center" :space-evenly false + (volume_scale) + (button :class "volume-mute ${volume == 'muted' ? 'active' : ''}" :onclick "pamixer -t" "󰝟") + (button :class "volume-arrow" :onclick "scripts/toggle_control_center.sh close && pavucontrol &" "󰅂"))) \ No newline at end of file