eww
This commit is contained in:
@@ -5,6 +5,6 @@
|
||||
|
||||
xdg.configFile."eww" = {
|
||||
recursive = true;
|
||||
source = ./eww;
|
||||
source = ./src;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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")))
|
||||
44
home/programs/eww/src/eww.yuck
Normal file
44
home/programs/eww/src/eww.yuck
Normal 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`)
|
||||
|
Before Width: | Height: | Size: 6.0 MiB After Width: | Height: | Size: 6.0 MiB |
Reference in New Issue
Block a user