This commit is contained in:
2024-05-12 21:44:36 +02:00
parent 95e7012e14
commit bdd07011f6
12 changed files with 114 additions and 26 deletions

View File

@@ -5,6 +5,6 @@
xdg.configFile."eww" = {
recursive = true;
source = ./eww;
source = ./src;
};
}

View File

@@ -1,20 +0,0 @@
(defwindow example
:monitor 0
:geometry (geometry :x "0%"
:y "0px"
:width "100%"
:height "25px"
:anchor "top center")
:stacking "fg"
:reserve (struts :distance "20px" :side "top")
:windowtype "dock"
:wm-ignore false
(greeter :text "Say hello!"
:name "Tim"))
(defwidget greeter [?text name]
(box :orientation "horizontal"
:halign "center"
text
(button :onclick "notify-send 'Hello' 'Hello, ${name}'"
"Greet")))

View File

@@ -0,0 +1,44 @@
(defwindow bar-primary
:monitor 0
:geometry (geometry :x "0px"
:y "0px"
:width "100%"
:height "25px"
:anchor "top center")
:stacking "fg"
:reserve (struts :distance "25px" :side "top")
:windowtype "dock"
:wm-ignore false
(box
(button
:width "60px"
:onclick "notify-send 'Wow' 'That's a clock, idiot!'"
"${time}")))
; List of all workspaces
(defvar workspacesList "[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]")
(defwidget workspaces
(box
(for entry in workspacesList
(button :onclick "notify-send 'click' 'button ${entry}'"
entry))))
(defwidget labeled-container [name]
(box :class "container"
name
(children)))
(deflisten brightness :initial "0"
`tail -F /tmp/brightness`)
(deflisten volume :initial "0"
`tail -F /tmp/volume`)
(defvar variable_containing_yuck
"(box (button 'foo') (button 'bar'))")
(defpoll time :interval "1s"
:initial "00:00:00" ; optional, defaults to poll at startup
`date +%H:%M:%S`)

View File

Before

Width:  |  Height:  |  Size: 6.0 MiB

After

Width:  |  Height:  |  Size: 6.0 MiB