adding better workspaces to eww

This commit is contained in:
Chris Cochrun 2023-08-30 15:28:21 -05:00
parent f7394076c1
commit d34f4ab2b4
9 changed files with 55 additions and 33 deletions

View file

@ -21,6 +21,9 @@
(deflisten workspace "scripts/workspace")
(deflisten appname "scripts/appname")
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces")
(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace")
(defvar vol_reveal false)
(defvar br_reveal false)
(defvar music_reveal false)
@ -39,12 +42,10 @@
:class "works"
:orientation "h"
:spacing 5
:space-evenly "false"
:space-evenly "true"
:valign "center"
(button :onclick "hyprctl dispatch workspace 1" :class "0$o1$f1" "")
(button :onclick "hyprctl dispatch workspace 2" :class "0$o2$f2" "")
(button :onclick "hyprctl dispatch workspace 3" :class "0$o3$f3" "󰍨")
(button :onclick "hyprctl dispatch workspace 4" :class "0$o4$f4" "󰈙"))))
(for workspace in workspaces
(button :onclick "hyprctl dispatch workspace ${workspace.id}" :class "works ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}" "${workspace.name}")))))
@ -256,7 +257,7 @@
:valign "center"
:class "left_modules"
:spacing 8
;; (workspaces)
(workspaces)
(appnames)))
(defwidget center []
(box