48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
(defwidget workspace [description]
|
|
(revealer :transition "slideright"
|
|
:reveal {description["active"]}
|
|
:duration "500ms"
|
|
(button :onclick "i3-msg workspace ${description['i3_index']}"
|
|
(box :orientation "h"
|
|
:halign "start"
|
|
:class '${description["state"]} workspace'
|
|
:space-evenly false
|
|
:spacing 1
|
|
(revealer :transition "slideleft" :reveal {description["state"] == "urgent"} :duration "500ms"
|
|
" ")
|
|
{description["name"]}
|
|
(revealer :transition "slideright" :reveal {description["expand"]} :duration "500ms"
|
|
': ${description["purpose"]}')))))
|
|
|
|
(deflisten i3-data :initial "[]"
|
|
`~/.config/eww/modules/i3.py`)
|
|
|
|
(defwidget i3-mode [align]
|
|
(box :orientation "h"
|
|
:halign align
|
|
:space-evenly false
|
|
:spacing 0
|
|
:class "module i3-mode"
|
|
:visible {i3-data["mode"] != "default"}
|
|
"mode: ${i3-data['mode']}"))
|
|
|
|
|
|
(defwidget i3 [align group]
|
|
(box :orientation "h"
|
|
:halign align
|
|
:space-evenly false
|
|
:spacing 0
|
|
:class "module i3"
|
|
(workspace :description {i3-data["ws"][group][0]})
|
|
(workspace :description {i3-data["ws"][group][1]})
|
|
(workspace :description {i3-data["ws"][group][2]})
|
|
(workspace :description {i3-data["ws"][group][3]})
|
|
(workspace :description {i3-data["ws"][group][4]})
|
|
(workspace :description {i3-data["ws"][group][5]})
|
|
(workspace :description {i3-data["ws"][group][6]})
|
|
(workspace :description {i3-data["ws"][group][7]})
|
|
(workspace :description {i3-data["ws"][group][8]})
|
|
(workspace :description {i3-data["ws"][group][9]})
|
|
))
|
|
|