eww: add new tiles to control-center, new notification popup, new styles for a lot of widgets

This commit is contained in:
retrozinndev
2025-01-07 16:26:20 -03:00
parent 435b222e03
commit c505ecf4cf
43 changed files with 802 additions and 319 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
(defwidget audio []
(eventbox :onclick "sh scripts/eww-window.sh toggle volume-control"
(eventbox :onclick "sh ${EWW_CONFIG_DIR}/scripts/eww-window.sh toggle volume-control"
:class "audio-eventbox"
:cursor "pointer"
(box :class "audio ${window_state_volume-control}"
(eventbox :onscroll `[ {} == "up" ] && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ || wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-`
(label :text "${ json_volume.output != 0 ? '󰕾' : '󰝟' } ${json_volume.output}%"))
+1 -1
View File
@@ -1,6 +1,6 @@
(defwidget battery [ ?device ]
(box :class "battery"
:visible { EWW_BATTERY != "" ? true : false }
(label :text "󰁹 ${EWW_BATTERY}%")
(label :text "󰁹 ${ EWW_BATTERY != '' ? EWW_BATTERY?.status : '' }%")
)
)
+23 -5
View File
@@ -1,8 +1,26 @@
(defwidget clock []
(box :class "clock"
:tooltip "${day-name}, ${month-name} ${day}"
(button :onclick "sh scripts/eww-window.sh toggle calendar-window"
:class "${window_state_calendar-window == 'open' ? 'cal-open' : ''}"
"${day-name} ${day}, ${time}")
(box :class "clock"
:tooltip { formattime(EWW_TIME, "%A, %B %d") }
(eventbox :onclick "sh scripts/eww-window.sh toggle calendar-window"
:class '${ window_state_calendar-window == "open" ? "cal-open" : "" } button'
(box :space-evenly false
(box :space-evenly false
:class "time"
(label :text "󰸗"
:class "icon")
(label :text "${ formattime(EWW_TIME, "%A") }")
(revealer :reveal { window_state_calendar-window == "closed" }
:transition "slideright"
:duration "240ms"
:class "unrevealer"
(label :text { formattime(EWW_TIME, "%d, %H:%M") } )
)
)
)
)
)
)
+17
View File
@@ -0,0 +1,17 @@
(defwidget hardware [ ?cpu ?memory ?visible ]
(eventbox :class "hardware-eventbox button"
:onclick "sh ${EWW_CONFIG_DIR}/scripts/eww-window.sh toggle hardware-monitor"
:visible { visible == "" || visible ? true : false }
(box :class "hardware"
:space-evenly false
(box :class "cpu"
:visible { cpu == "" || cpu ? true : false }
(label :text " ${ round(EWW_CPU?.avg, 0) }%")
)
(box :class "memory"
:visible { memory == "" || memory ? true : false }
(label :text " ${ round(EWW_RAM?.used_mem_perc, 0) }%")
)
)
)
)
+10 -4
View File
@@ -6,8 +6,8 @@
:onhoverlost "${EWW_CMD} update media_reveal_controls=false"
:visible { json_media == "" || (json_media.title == "null" &&
json_media.artist == "null") ||
(active_window.class =~ json_media.player ||
active_window.title =~ json_media.title) ?
(json_active_window.class =~ json_media.player ||
json_active_window.title =~ json_media.title) ?
false : true
}
:onclick "sh scripts/eww-window.sh toggle floating-media"
@@ -27,7 +27,9 @@
:text "${json_media.title}"
:limit-width 40)
(box :class "separator")
(separator :orientation "horizontal"
:alpha 0.8
:style "border-radius: 2x;")
(label :class "media-artist"
:text "${json_media.artist}"
@@ -37,9 +39,13 @@
(revealer :class "media-controls-revealer"
:reveal { media_reveal_controls ? "${ window_state_floating-media == 'closed' ? true : false }" : false }
:transition "slideright"
:duration "180ms"
:duration "220ms"
(box :class "media-controls"
(button :class "url"
:onclick "wl-copy '${json_media.url}'"
:tooltip "Copy link to Clipboard"
"󰌷")
(button :class "previous"
:onclick "playerctl previous --player=${json_media.player}"
"󰒮")
+5 -2
View File
@@ -1,5 +1,8 @@
(defwidget network []
(box :class "network"
(button "${ network_status == 'full' ? ' ' : '󰤭 ' }")
(eventbox :class "button network-eventbox"
:onclick "hyprctl dispatch exec 'nm-connection-editor'"
(box :class "network"
(label :text "${ network_status == 'full' ? ' ' : '󰤭 ' }")
)
)
)
+8 -7
View File
@@ -1,26 +1,27 @@
(defwidget window []
(box :class "window"
:visible { active_window.class == "" || active_window.class == "null" ? false : true }
:visible { json_active_window.class == "" || json_active_window.class == "null" ? false : true }
:space-evenly false
:valign "center"
:orientation "horizontal"
(image :class "icon"
:icon "${ active_window.initialClass =~ 'zen-(.*)$' ? 'zen-browser' : active_window.initialClass }"
:icon "${ json_active_window.initialClass =~ 'zen-(.*)$' ? 'zen-browser' : json_active_window.initialClass }"
:icon-size "toolbar")
(box :class "info"
:orientation { active_window.title == "" ? "horizontal" : "vertical" }
:orientation { json_active_window.title == "" ? "horizontal" : "vertical" }
:space-evenly false
(label :class "window-class"
:text "${active_window.class}"
:text "${json_active_window.class}"
:xalign 0
:yalign 0)
(label :class "window-title"
:text "${active_window.title}"
:visible { active_window.title != "" ? true : false }
:text "${json_active_window.title}"
:visible { json_active_window.title != "" ? true : false }
:limit-width 45
:tooltip "${active_window.title}"
:tooltip "${json_active_window.title}"
:xalign 0
:yalign 0)
)
+1
View File
@@ -6,6 +6,7 @@
:onhover "${EWW_CMD} update hover_workspaces=true"
:onhoverlost "${EWW_CMD} update hover_workspaces=false"
(box :class "workspaces"
:valign "center"
(literal :content literal_workspaces)
)
)