diff --git a/hypr-configs/hyprland/eww/_definitions.yuck b/hypr-configs/hyprland/eww/_definitions.yuck index 8388b09..eb92416 100644 --- a/hypr-configs/hyprland/eww/_definitions.yuck +++ b/hypr-configs/hyprland/eww/_definitions.yuck @@ -56,6 +56,7 @@ (defvar revealOsd false) ; Sidebar +(defvar revealWifiEssid false) (defvar revealVolume false) (defvar revealMicrophone false) (defvar revealBrightness false) diff --git a/hypr-configs/hyprland/eww/_setups.yuck b/hypr-configs/hyprland/eww/_setups.yuck index 3071f2e..2606e1d 100644 --- a/hypr-configs/hyprland/eww/_setups.yuck +++ b/hypr-configs/hyprland/eww/_setups.yuck @@ -34,6 +34,18 @@ :monitor 0 (Dashboard)) +(defwindow notifications + :geometry (geometry + :x 0 + :y 0 + :width 480 + :height 0 + :anchor "top center") + :stacking "overlay" + :monitor 0 + (NotficationsCenter) +) + (defwindow osd :monitor 0 :stacking "overlay" diff --git a/hypr-configs/hyprland/eww/assets/scss/_components.scss b/hypr-configs/hyprland/eww/assets/scss/_components.scss index 2b38c0a..3d888b1 100644 --- a/hypr-configs/hyprland/eww/assets/scss/_components.scss +++ b/hypr-configs/hyprland/eww/assets/scss/_components.scss @@ -8,7 +8,7 @@ } .separator { - padding: 4px 6px; + padding: get-token(padding, small); .dot { padding: 3px; diff --git a/hypr-configs/hyprland/eww/assets/scss/_modules.scss b/hypr-configs/hyprland/eww/assets/scss/_modules.scss index 324e82f..1e125d1 100644 --- a/hypr-configs/hyprland/eww/assets/scss/_modules.scss +++ b/hypr-configs/hyprland/eww/assets/scss/_modules.scss @@ -8,7 +8,7 @@ .language { @extend .widget; - font-size: get-token(font-sizes); + font-size: get-token(font-sizes, small); font-weight: bolder; } diff --git a/hypr-configs/hyprland/eww/assets/scss/windows/_notifications.scss b/hypr-configs/hyprland/eww/assets/scss/windows/_notifications.scss new file mode 100644 index 0000000..ae757dc --- /dev/null +++ b/hypr-configs/hyprland/eww/assets/scss/windows/_notifications.scss @@ -0,0 +1,35 @@ +.notifbox { + background-color: $surface1; + border-radius: 5px; + padding: 5px; + margin: 5px; +} + +.notiftitle { + font-size: 18px; + color: $white0; +} + +.notifbody { + font-size: 15px; + color: $white0; +} + +.notifclose { + font-family: "Symbols Nerd Font"; + font-size: 25px; + min-width: 1em; + min-height: 1em; + color: $red; +} + +.notiflabel { + font-size: 18px; + margin-bottom: 5px; +} + +.notifactions { + font-size: 15px; + margin: 5px; + color: $white0; +} diff --git a/hypr-configs/hyprland/eww/eww.scss b/hypr-configs/hyprland/eww/eww.scss index 425b5ff..6022df5 100644 --- a/hypr-configs/hyprland/eww/eww.scss +++ b/hypr-configs/hyprland/eww/eww.scss @@ -9,10 +9,9 @@ @import "./assets/scss/windows/vertical-bar"; @import "./assets/scss/windows/dashboard"; @import "./assets/scss/windows/osd"; +@import "./assets/scss/windows/notifications"; @import "./src/dock/styles.scss"; -@import "./src/desktop/styles.scss"; -@import "./src/notification/styles.scss"; * { all: unset; diff --git a/hypr-configs/hyprland/eww/eww.yuck b/hypr-configs/hyprland/eww/eww.yuck index 4160dab..ff36e18 100644 --- a/hypr-configs/hyprland/eww/eww.yuck +++ b/hypr-configs/hyprland/eww/eww.yuck @@ -11,6 +11,7 @@ (include "./src/-modules/_logo.yuck") (include "./src/-modules/_media.yuck") +(include "./src/windows/_notifications.yuck") (include "./src/windows/_vertical-bar.yuck") (include "./src/windows/_control-panel.yuck") (include "./src/windows/_dashboard.yuck") @@ -20,5 +21,3 @@ (include "./src/wallpapers/main.yuck") (include "./src/dock/main.yuck") -(include "./src/desktop/main.yuck") -(include "./src/notification/main.yuck") diff --git a/hypr-configs/hyprland/eww/scripts/.local/share/atuin/history.db b/hypr-configs/hyprland/eww/scripts/.local/share/atuin/history.db index d177751..e4d2d39 100644 Binary files a/hypr-configs/hyprland/eww/scripts/.local/share/atuin/history.db and b/hypr-configs/hyprland/eww/scripts/.local/share/atuin/history.db differ diff --git a/hypr-configs/hyprland/eww/scripts/.local/share/atuin/history.db-wal b/hypr-configs/hyprland/eww/scripts/.local/share/atuin/history.db-wal index 2e041b7..a69bee4 100644 Binary files a/hypr-configs/hyprland/eww/scripts/.local/share/atuin/history.db-wal and b/hypr-configs/hyprland/eww/scripts/.local/share/atuin/history.db-wal differ diff --git a/hypr-configs/hyprland/eww/scripts/.local/share/atuin/records.db-shm b/hypr-configs/hyprland/eww/scripts/.local/share/atuin/records.db-shm index 7c7eddb..582c90f 100644 Binary files a/hypr-configs/hyprland/eww/scripts/.local/share/atuin/records.db-shm and b/hypr-configs/hyprland/eww/scripts/.local/share/atuin/records.db-shm differ diff --git a/hypr-configs/hyprland/eww/scripts/.local/share/atuin/records.db-wal b/hypr-configs/hyprland/eww/scripts/.local/share/atuin/records.db-wal index 932616c..4e0de02 100644 Binary files a/hypr-configs/hyprland/eww/scripts/.local/share/atuin/records.db-wal and b/hypr-configs/hyprland/eww/scripts/.local/share/atuin/records.db-wal differ diff --git a/hypr-configs/hyprland/eww/src/-components/_helpers.yuck b/hypr-configs/hyprland/eww/src/-components/_helpers.yuck index 33a9960..ffdbfc1 100644 --- a/hypr-configs/hyprland/eww/src/-components/_helpers.yuck +++ b/hypr-configs/hyprland/eww/src/-components/_helpers.yuck @@ -9,10 +9,11 @@ :transition "slideleft" (children :nth 1)))) -(defwidget RevealOnHover [var varname ?icon ?class ?duration ?transition] +(defwidget RevealOnHover [var varname ?icon ?class ?duration ?transition ?visible] (eventbox :onhover `${EWW_CMD} update ${varname}=true` :onhoverlost `${EWW_CMD} update ${varname}=false` + :visible {visible} (box :space-evenly false diff --git a/hypr-configs/hyprland/eww/src/-modules/_system-tray.yuck b/hypr-configs/hyprland/eww/src/-modules/_system-tray.yuck index 1d4294c..3640f40 100644 --- a/hypr-configs/hyprland/eww/src/-modules/_system-tray.yuck +++ b/hypr-configs/hyprland/eww/src/-modules/_system-tray.yuck @@ -4,16 +4,16 @@ :valign "center" :halign "center" :class "${class}" - + (revealer :reveal revealSystray :transition "slideup" - -(systray + + (systray :orientation orientation - :icon-size 20 + :icon-size 18 :spacing spacing-default - ) - ) - )) \ No newline at end of file + + ) + )) \ No newline at end of file diff --git a/hypr-configs/hyprland/eww/src/desktop/main.yuck b/hypr-configs/hyprland/eww/src/desktop/main.yuck deleted file mode 100644 index 18a9ad6..0000000 --- a/hypr-configs/hyprland/eww/src/desktop/main.yuck +++ /dev/null @@ -1,43 +0,0 @@ -(defwindow desktopicons - :geometry (geometry - :x 20 - :y 20 - :width 100 - :height 600 - :anchor "top right") - :stacking "bottom" - :monitor 0 - - (box - :orientation "v" - :space-evenly "false" - :spacing 10 - - (eventbox - :dragtype "file" - :class "desktopbox" - :onclick "thunar ${homedir}/.local/share/Trash/files" - :ondropped "notify-send {}" - - (box - :orientation "v" - :space-evenly false - :height 100 - :valign "end" - (image :width 100 :height 100 :image-width 80 :image-height 80 :path trashcanPath) - (label :class "desktoptext" :text "Trash"))) - - (for i in '["amogus"]' - (imagesicon :name i)))) - - (defwidget imagesicon [name] - (eventbox - :onclick "feh ./assets/image/desktop/${name}.png" - :class "desktopbox" - (box - :orientation "v" - :space-evenly false - :height 100 - :valign "end" - (image :width 100 :height 100 :image-width 80 :image-height 80 :path "./assets/image/desktop/${name}.png") - (label :class "desktoptext" :text "${name}.png")))) diff --git a/hypr-configs/hyprland/eww/src/desktop/styles.scss b/hypr-configs/hyprland/eww/src/desktop/styles.scss deleted file mode 100644 index 453f1fd..0000000 --- a/hypr-configs/hyprland/eww/src/desktop/styles.scss +++ /dev/null @@ -1,11 +0,0 @@ - -.desktoptext { - font-size: 18px; - color: $white0; - text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; -} - -.desktopbox:hover { - border: solid 2px; - border-color: $surface2; -} diff --git a/hypr-configs/hyprland/eww/src/notification/styles.scss b/hypr-configs/hyprland/eww/src/notification/styles.scss deleted file mode 100644 index b7e78fc..0000000 --- a/hypr-configs/hyprland/eww/src/notification/styles.scss +++ /dev/null @@ -1,36 +0,0 @@ - -.notifbox { - background-color: $surface1; - border-radius: 5px; - padding: 5px; - margin: 5px; -} - -.notiftitle { - font-size: 18px; - color: $white0; -} - -.notifbody { - font-size: 15px; - color: $white0; -} - -.notifclose { - font-family: "Symbols Nerd Font"; - font-size: 25px; - min-width: 1em; - min-height: 1em; - color: $red; -} - -.notiflabel { - font-size: 18px; - margin-bottom: 5px; -} - -.notifactions { - font-size: 15px; - margin: 5px; - color: $white0; -} diff --git a/hypr-configs/hyprland/eww/src/notification/main.yuck b/hypr-configs/hyprland/eww/src/windows/_notifications.yuck similarity index 89% rename from hypr-configs/hyprland/eww/src/notification/main.yuck rename to hypr-configs/hyprland/eww/src/windows/_notifications.yuck index e9d5336..c3abf93 100644 --- a/hypr-configs/hyprland/eww/src/notification/main.yuck +++ b/hypr-configs/hyprland/eww/src/windows/_notifications.yuck @@ -1,24 +1,16 @@ -(defwindow notifypopup - :geometry (geometry - :x 0 - :y 0 - :width 480 - :height 0 - :anchor "top right") - :stacking "overlay" - :monitor 0 - +(defwidget NotficationsCenter [] (revealer :reveal { arraylength(notifications.popups) > 0 } :transition "slidedown" (box :orientation "v" :space-evenly false - :spacing 5 + :spacing spacing-default + (for noti in {notifications.popups} - (singlenotif :noti noti :initial true))))) + (SingleNotification :noti noti :initial true))))) -(defwidget singlenotif [noti initial] +(defwidget SingleNotification [noti initial] (box :orientation "v" :class "${initial ? 'popup' : 'notifbox'}" diff --git a/hypr-configs/hyprland/eww/src/windows/_vertical-bar.yuck b/hypr-configs/hyprland/eww/src/windows/_vertical-bar.yuck index 14fbc6c..14e7e17 100644 --- a/hypr-configs/hyprland/eww/src/windows/_vertical-bar.yuck +++ b/hypr-configs/hyprland/eww/src/windows/_vertical-bar.yuck @@ -29,7 +29,13 @@ (Logo) (Workspaces) - (Shortcuts) + ; (Shortcuts) + (RevealOnClick + :var revealSystray + :varname "revealSystray" + :direction "down" + (Systemtray :orientation "v") + ) )) (defwidget BarMiddle [] @@ -51,15 +57,9 @@ :space-evenly false :valign "end" - (RevealOnClick - :var revealSystray - :varname "revealSystray" - :direction "up" - (Systemtray :orientation "v") - ) - ;; (Language) + (Sliders) - ;; (Clock) + (Language) )) (defwidget Shortcuts [] @@ -88,29 +88,36 @@ :spacing spacing-default :valign "end" - (button :onclick "alacritty -e nmtui" :tooltip wifi_essid - (label :class "icon" :text wifi_icon)) + (RevealOnHover + :var {revealWifiEssid} + :varname "revealWifiEssid" + :icon {wifi_icon} + + (label + :angle 90 + :text wifi_essid) + ) (RevealOnHover - :var revealVolume + :var {revealVolume} :varname "revealVolume" :icon {volumemute == 'false' ? "󰕾" : "󰖁"} - (VerticalBarSlider :var volume :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%") + (VerticalBarSlider :var {volume} :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%") ) (RevealOnHover - :var revealMicrophone + :var {revealMicrophone} :varname "revealMicrophone" :icon {volumemute == 'false' ? "" : "󰖁"} - (VerticalBarSlider :var mic_volume :onchange "pactl set-source-volume @DEFAULT_SOURCE@ {}%") + (VerticalBarSlider :var {mic_volume} :onchange "pactl set-source-volume @DEFAULT_SOURCE@ {}%") ) (RevealOnHover - :var revealBrightness + :var {revealBrightness} :varname "revealBrightness" :icon "󰃞" - (VerticalBarSlider :var brightness :onchange "brightnessctl set {}%")) + (VerticalBarSlider :var {brightness} :onchange "brightnessctl set {}%")) ))