(defpoll workspace_1 :interval "0.1s" "bash scripts/workspace_class.sh 1")
(defpoll workspace_2 :interval "0.1s" "bash scripts/workspace_class.sh 2")
(defpoll workspace_3 :interval "0.1s" "bash scripts/workspace_class.sh 3")
(defpoll workspace_4 :interval "0.1s" "bash scripts/workspace_class.sh 4")
(defpoll workspace_5 :interval "0.1s" "bash scripts/workspace_class.sh 5")
(defpoll workspace_6 :interval "0.1s" "bash scripts/workspace_class.sh 6")
(defpoll workspace_7 :interval "0.1s" "bash scripts/workspace_class.sh 7")
(defpoll workspace_8 :interval "0.1s" "bash scripts/workspace_class.sh 8")
(defpoll workspace_9 :interval "0.1s" "bash scripts/workspace_class.sh 9")


( defwidget workspaces []
    (eventbox
        (box :space-evenly "false" :orientation "h" :spacing "0"
            (button :class workspace_1 :onclick "hyprctl dispatch workspace 1" "₁")
            (button :class workspace_2 :onclick "hyprctl dispatch workspace 2" "󰖟₂")
            (button :class workspace_3 :onclick "hyprctl dispatch workspace 3" "󰭹₃")
            (button :class workspace_4 :onclick "hyprctl dispatch workspace 4" "₄")
            (button :class workspace_5 :onclick "hyprctl dispatch workspace 5" "󰊴₅")
            (button :class workspace_6 :onclick "hyprctl dispatch workspace 6" "₆")
            (button :class workspace_7 :onclick "hyprctl dispatch workspace 7" "₇")
            (button :class workspace_8 :onclick "hyprctl dispatch workspace 8" "₈")
            (button :class workspace_9 :onclick "hyprctl dispatch workspace 9" "₉")
        )
    )
)
