Files
dotfiles/home/natto/eww/bar/hyprworkspaces.yuck
2023-04-27 14:58:59 +05:30

14 lines
568 B
Common Lisp
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(deflisten workspace :initial "{}" "bar/hyprworkspaces")
(defvar numerals "[\"१\", \"२\", \"३\", \"४\", \"५\", \"६\", \"७\", \"८\", \"९\", \"\"]")
(defwidget workspaces []
(eventbox
:cursor "pointer"
(box
:class "workspaces"
(for ws in {workspace.list}
(button
:class "${ws == workspace.current ? 'workspace-active' : 'workspace-inactive'}"
:onclick "hyprctl dispatch workspace ${ws}"
{ws <= 10 ? numerals[ws - 1] : ws })))))