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-23 17:12:32 -04:00
|
|
|
(eventbox :class {osk-ts ? "toggle-on" : "toggle-off"}
|
2023-07-23 13:40:45 -04:00
|
|
|
:onclick "$HYPR_PATH/osk-toggle.sh toggle &"
|
2023-07-23 17:12:32 -04:00
|
|
|
:cursor "pointer"
|
2023-07-23 13:40:45 -04:00
|
|
|
|
2023-07-15 00:46:04 -04:00
|
|
|
(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-23 17:12:32 -04:00
|
|
|
(eventbox :class {tablet-ts ? "toggle-on" : "toggle-off"}
|
2023-07-23 22:28:26 -04:00
|
|
|
:onclick {tablet-ts ? "$HYPR_PATH/laptop-mode.sh &" :
|
|
|
|
"$HYPR_PATH/tablet-mode.sh &"}
|
|
|
|
:cursor "pointer"
|
2023-07-23 17:12:32 -04:00
|
|
|
|
2023-07-23 13:40:45 -04:00
|
|
|
(box :class "tablet-toggle"
|
|
|
|
:orientation "h"
|
2023-06-27 10:13:14 -04:00
|
|
|
(label :text " ")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2023-07-22 00:19:46 -04:00
|
|
|
(defwidget heart-toggle []
|
2023-07-23 17:12:32 -04:00
|
|
|
(eventbox :class {heart_icon == "" ? "toggle-on" : "toggle-off"}
|
2023-07-23 22:28:26 -04:00
|
|
|
:onclick "$EWW_PATH/heart.sh"
|
|
|
|
:cursor "pointer"
|
2023-07-23 13:40:45 -04:00
|
|
|
|
|
|
|
(box :class "heart-toggle"
|
|
|
|
:orientation "h"
|
2023-07-22 14:22:33 -04:00
|
|
|
(label :text " ${heart_icon} ")
|
2023-07-22 00:19:46 -04:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defwidget left-bar []
|
|
|
|
(box :class "transparent"
|
|
|
|
:space-evenly true
|
2023-07-23 13:40:45 -04:00
|
|
|
:spacing 12
|
2023-07-22 00:19:46 -04:00
|
|
|
: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-23 13:40:45 -04:00
|
|
|
:geometry (geometry :x "5px"
|
|
|
|
:y "10px"
|
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-22 14:22:33 -04:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2023-07-23 13:40:45 -04:00
|
|
|
(defwidget quick-settings-toggle []
|
2023-07-23 22:28:26 -04:00
|
|
|
(eventbox :class "toggle-off"
|
2023-07-23 22:58:28 -04:00
|
|
|
:onclick "eww open quick-settings; eww open quick-settings-smol; eww open quick-settings-logo; eww update showqs=true"
|
2023-07-23 22:28:26 -04:00
|
|
|
:cursor "pointer"
|
2023-07-23 17:12:32 -04:00
|
|
|
|
2023-07-23 13:40:45 -04:00
|
|
|
(box :class "quick-settings-toggle"
|
|
|
|
:orientation "h"
|
|
|
|
(label :text " ")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(defwindow quick-settings-toggle
|
|
|
|
:monitor 0
|
|
|
|
:stacking "overlay"
|
|
|
|
:exclusive "ignore"
|
|
|
|
:geometry (geometry :x "5px"
|
|
|
|
:y "10px"
|
|
|
|
:width "0px"
|
|
|
|
:height "0px"
|
|
|
|
:anchor "top right"
|
|
|
|
)
|
|
|
|
(quick-settings-toggle)
|
|
|
|
)
|
2023-07-15 00:46:04 -04:00
|
|
|
|
2023-06-27 10:13:14 -04:00
|
|
|
(defvar notif-panel-state false)
|
|
|
|
(defwidget notif-panel []
|
2023-07-23 17:12:32 -04:00
|
|
|
(eventbox :class {notif-panel-state ? "toggle-on" : "toggle-off"}
|
2023-07-23 22:28:26 -04:00
|
|
|
:onclick {notif-panel-state ? "swaync-client -cp; eww update notif-panel-state=false" :
|
|
|
|
"swaync-client -op; eww update notif-panel-state=true"}
|
|
|
|
:cursor "pointer"
|
|
|
|
|
2023-07-23 13:40:45 -04:00
|
|
|
(box :class "notif-panel"
|
|
|
|
:orientation "h"
|
2023-06-27 10:13:14 -04:00
|
|
|
(label :text " ${notif_icon} ")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2023-07-23 13:40:45 -04:00
|
|
|
(defwindow notif-panel
|
2023-06-27 10:13:14 -04:00
|
|
|
:monitor 0
|
|
|
|
:stacking "overlay"
|
|
|
|
:exclusive "ignore"
|
2023-07-23 13:40:45 -04:00
|
|
|
:geometry (geometry :x "60px"
|
|
|
|
:y "10px"
|
2023-06-27 10:13:14 -04:00
|
|
|
:width "0px"
|
|
|
|
:height "0px"
|
|
|
|
:anchor "top right"
|
|
|
|
)
|
2023-07-23 13:40:45 -04:00
|
|
|
(notif-panel)
|
2023-06-27 10:13:14 -04:00
|
|
|
)
|