(defvar toggle-state false) (defwidget tablet-toggle [] (eventbox :class {toggle-state ? "toggle-on" : "toggle-off"} :onclick {toggle-state ? "$HYPR_PATH/laptop-mode.sh &" : "$HYPR_PATH/tablet-mode.sh &"} (box :class "tablet-toggle" :space-evenly true :spacing 6 :orientation "h" (label :text " 󰦧 ") ) ) ) (defwindow tablet-toggle :monitor 0 :stacking "overlay" :exclusive "ignore" :geometry (geometry :x "66px" :y "9px" :width "0px" :height "0px" :anchor "top left" ) (tablet-toggle) ) (defvar notif-panel-state false) (defwidget notif-panel [] (button :class {notif-panel-state ? "toggle-on" : "toggle-off"} :onclick {notif-panel-state ? "swaync-client -cp; eww update notif-panel-state=false" : "swaync-client -op; eww update notif-panel-state=true"} (box :class "notif-panel" :space-evenly true :spacing 6 :orientation "h" (label :text " ${notif_icon} ") ) ) ) (defwindow notif-panel :monitor 0 :stacking "overlay" :exclusive "ignore" :geometry (geometry :x "50px" :y "10px" :width "0px" :height "0px" :anchor "top right" ) (notif-panel) )