2023-07-22 00:19:46 -04:00
|
|
|
(defvar osk-ts false)
|
2023-07-15 00:46:04 -04:00
|
|
|
(defwidget osk-toggle []
|
2023-07-22 00:19:46 -04:00
|
|
|
(eventbox :class {osk-ts ? "toggle-on" : "toggle-off"}
|
2023-07-15 00:46:04 -04:00
|
|
|
:onclick "$HYPR_PATH/osk-toggle.sh toggle &"
|
|
|
|
(box :class "osk-toggle"
|
|
|
|
:orientation "h"
|
|
|
|
(label :text " ")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2023-07-22 00:19:46 -04:00
|
|
|
(defvar tablet-ts false)
|
2023-06-27 10:13:14 -04:00
|
|
|
(defwidget tablet-toggle []
|
2023-07-22 00:19:46 -04:00
|
|
|
(eventbox :class {tablet-ts ? "toggle-on" : "toggle-off"}
|
|
|
|
:onclick {tablet-ts ? "$HYPR_PATH/laptop-mode.sh &" :
|
|
|
|
"$HYPR_PATH/tablet-mode.sh &"}
|
2023-06-27 10:13:14 -04:00
|
|
|
(box :class "tablet-toggle"
|
|
|
|
:orientation "h"
|
|
|
|
(label :text " ")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2023-07-22 00:19:46 -04:00
|
|
|
(defvar heart-ts true)
|
|
|
|
(defvar heart-icon "")
|
|
|
|
(defwidget heart-toggle []
|
|
|
|
(eventbox :class {heart-ts ? "toggle-on" : "toggle-off"}
|
|
|
|
:onclick {heart-ts ? "eww update heart-icon= ; eww update heart-ts=false" :
|
|
|
|
"eww update heart-icon= ; eww update heart-ts=true"}
|
|
|
|
(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
|
2023-06-27 10:13:14 -04:00
|
|
|
:monitor 0
|
|
|
|
:stacking "overlay"
|
|
|
|
:exclusive "ignore"
|
2023-07-22 00:19:46 -04:00
|
|
|
:geometry (geometry :x "10px"
|
|
|
|
:y "11px"
|
2023-06-27 10:13:14 -04:00
|
|
|
:width "0px"
|
|
|
|
:height "0px"
|
|
|
|
:anchor "top left"
|
|
|
|
)
|
2023-07-22 00:19:46 -04:00
|
|
|
(left-bar)
|
2023-06-27 10:13:14 -04:00
|
|
|
)
|
|
|
|
|
2023-07-15 00:46:04 -04:00
|
|
|
|
|
|
|
|
2023-06-27 10:13:14 -04:00
|
|
|
(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} ")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2023-07-22 00:19:46 -04:00
|
|
|
(defwidget right-bar []
|
|
|
|
(box :class "transparent"
|
|
|
|
:space-evenly true
|
|
|
|
:spacing 14
|
|
|
|
:orientation "h"
|
|
|
|
(notif-panel)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(defwindow right-bar
|
2023-06-27 10:13:14 -04:00
|
|
|
:monitor 0
|
|
|
|
:stacking "overlay"
|
|
|
|
:exclusive "ignore"
|
|
|
|
:geometry (geometry :x "50px"
|
2023-07-15 00:46:04 -04:00
|
|
|
:y "11px"
|
2023-06-27 10:13:14 -04:00
|
|
|
:width "0px"
|
|
|
|
:height "0px"
|
|
|
|
:anchor "top right"
|
|
|
|
)
|
2023-07-22 00:19:46 -04:00
|
|
|
(right-bar)
|
2023-06-27 10:13:14 -04:00
|
|
|
)
|