(defvar osk-ts false) (defwidget osk-toggle [] (eventbox :class {osk-ts ? "toggle-on" : "toggle-off"} :onclick "$HYPR_PATH/osk-toggle.sh toggle &" (box :class "osk-toggle" :orientation "h" (label :text " 󰌌 ") ) ) ) (defvar tablet-ts false) (defwidget tablet-toggle [] (eventbox :class {tablet-ts ? "toggle-on" : "toggle-off"} :onclick {tablet-ts ? "$HYPR_PATH/laptop-mode.sh &" : "$HYPR_PATH/tablet-mode.sh &"} (box :class "tablet-toggle" :orientation "h" (label :text " 󰦧 ") ) ) ) (defwidget heart-toggle [] (eventbox :class {heart_icon == "󰣐" ? "toggle-on" : "toggle-off"} :onclick "$EWW_PATH/heart.sh toggle" (box :class "heart-toggle" :orientation "h" (label :text " ${heart_icon} ") ) ) ) (defwidget left-bar [] (box :class "transparent" :space-evenly true :spacing 14 :orientation "h" (osk-toggle) (tablet-toggle) (heart-toggle) ) ) (defwindow left-bar :monitor 0 :stacking "overlay" :exclusive "ignore" :geometry (geometry :x "10px" :y "11px" :width "0px" :height "0px" :anchor "top left" ) (left-bar) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;  (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" :orientation "h" (label :text " ${notif_icon} ") ) ) ) (defwidget right-bar [] (box :class "transparent" :space-evenly true :spacing 14 :orientation "h" (notif-panel) ) ) (defwindow right-bar :monitor 0 :stacking "overlay" :exclusive "ignore" :geometry (geometry :x "50px" :y "11px" :width "0px" :height "0px" :anchor "top right" ) (right-bar) )