eww: add new features and fix issues

This commit is contained in:
retrozinndev
2024-12-07 16:43:37 -03:00
parent adf8b7d9ba
commit e9258d04e4
26 changed files with 882 additions and 207 deletions
+33
View File
@@ -0,0 +1,33 @@
(include "./widgets/audio-popup/output-slider.yuck")
(include "./widgets/audio-popup/source-slider.yuck")
(deflisten volume_json :initial `{ "output": 60, "source": 80 }`
`sh ./scripts/get-volume-watch.sh`)
(defwindow audio-popup []
:monitor 0
:namespace "eww-audio"
:geometry (geometry :anchor "top right"
:width "300px"
:height "120px")
:exclusive false
:stacking "fg"
:focusable false
(box :class "audio-popup"
:space-evenly false
:orientation "vertical"
(output-slider)
(source-slider)
(box :class "separator")
(box :class "vertical-button-row"
(button :class "more-settings"
:onclick "eww close audio-popup; hyprctl dispatch exec pavucontrol"
(label :text "Show on Volume Control"
:xalign 0))
)
)
)
+39
View File
@@ -0,0 +1,39 @@
(defwindow bar
:monitor 0
:geometry (geometry :width "100%"
:height "44px"
:anchor "top center")
:stacking "fg"
:exclusive true
:namespace "eww-bar"
(centerbox :orientation "horizontal"
(box :class "widgets-left"
:halign "start"
:space-evenly false
(logo)
(workspaces)
)
(box :class "widgets-center"
:halign "center"
:space-evenly false
(clock)
(window)
(media)
)
(box :class "widgets-right"
:halign "end"
:space-evenly false
(systray :spacing 5
:orientation "horizontal"
:space-evenly false
:icon-size 14
:prepend-new true
:class "systray"
)
(audio)
(battery)
(network)
(control-center-toggle)
)
)
)
+7 -14
View File
@@ -1,4 +1,7 @@
(include "./widgets/control-center/quickactions.yuck")
(include "./widgets/control-center/notifications.yuck")
(include "./widgets/control-center/toggle-grid.yuck")
(include "./widgets/control-center/mediaplayer.yuck")
(defwindow control-center []
:monitor 0
@@ -11,20 +14,10 @@
(box :class "cc"
:orientation "vertical"
(quickactions)
(toggle-row)
)
)
(defwidget toggle-row []
(box :class "row"
:space-evenly false
(button :class "network"
"󰤨 ")
(button :class "bluetooth"
"󰂯 ")
(button :class "dnd"
"󰒲 ")
(quickactions)
(toggle-grid)
(mediaplayer :album_background true)
(notifications)
)
)
+30
View File
@@ -0,0 +1,30 @@
(defwindow powermenu []
:monitor 0
:geometry (geometry :width "100%"
:height "100%")
:stacking "overlay"
:namespace "eww-powermenu"
:focusable true
:exclusive true
(eventbox :class "outside"
:onclick "eww open bar; eww close powermenu"
(box :space-evenly true
:halign "center"
:class "powermenu-container"
(button :class "poweroff"
:onclick "systemctl poweroff"
"󰐥")
(button :class "reboot"
:onclick "systemctl reboot"
"󰜉")
(button :class "logout"
:onclick "loginctl kill-user $(sh -c 'echo $USER')"
"󰗽")
(button :class "close"
:onclick "eww open bar; eww close powermenu"
"󰅖")
)
)
)