Eww reformatting and fixes

This commit is contained in:
marc
2024-03-02 18:06:17 +01:00
parent 466ddf2cd9
commit d1b63fe326
8 changed files with 23 additions and 47 deletions

View File

@@ -4,23 +4,18 @@
(defvar date-reveal false)
(defwidget clock-module []
(eventbox
:onhover "${EWW_CMD} update date-reveal=true"
:onhoverlost "${EWW_CMD} update date-reveal=false"
(box
:class "module clock"
:orientation "h"
:space-evenly "false"
(label
:text clock-time
:class "clock-time")
(revealer
:transition "slideleft"
:duration "750ms"
:reveal {date-reveal}
(box
:orientation "h"
(label :text clock-date
:class "clock-date")
(label :text clock-year
:class "clock-year"))))))
(eventbox :onhover "${EWW_CMD} update date-reveal=true"
:onhoverlost "${EWW_CMD} update date-reveal=false"
(box :class "module clock"
:orientation "h"
:space-evenly "false"
(label :text clock-time
:class "clock-time")
(revealer :transition "slideleft"
:duration "750ms"
:reveal {date-reveal}
(box :orientation "h"
(label :text clock-date
:class "clock-date")
(label :text clock-year
:class "clock-year"))))))

View File

@@ -2,9 +2,9 @@
(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace.sh")
(defwidget workspaces-module []
(box :space-evenly true
(label :text "${workspaces}${current_workspace}"
:visible false)
(label :text "${workspaces}${current_workspace}"
:visible false)
(for workspace in workspaces
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
(box :class "workspace-entry ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}"
(label :text "${workspace.id == current_workspace ? "" : ""}"))))))
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
(label :text "${workspace.id == current_workspace ? "" : ""}"
:class "workspace-entry ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}")))))