113 lines
2.8 KiB
Text
113 lines
2.8 KiB
Text
(defvar osk-ts false)
|
|
(defwidget osk-toggle []
|
|
(eventbox :class {osk-ts ? "toggle-on" : "toggle-off"}
|
|
:onclick "$HYPR_PATH/osk-toggle.sh toggle &"
|
|
:cursor "pointer"
|
|
|
|
(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 &"}
|
|
:cursor "pointer"
|
|
|
|
(box :class "tablet-toggle"
|
|
:orientation "h"
|
|
(label :text " ")
|
|
)
|
|
)
|
|
)
|
|
|
|
(defwidget heart-toggle []
|
|
(eventbox :class {heart_icon == "" ? "toggle-on" : "toggle-off"}
|
|
:onclick "$EWW_PATH/heart.sh"
|
|
:cursor "pointer"
|
|
|
|
(box :class "heart-toggle"
|
|
:orientation "h"
|
|
(label :text " ${heart_icon} ")
|
|
)
|
|
)
|
|
)
|
|
|
|
(defwidget left-bar []
|
|
(box :class "transparent"
|
|
:space-evenly true
|
|
:spacing 12
|
|
:orientation "h"
|
|
(osk-toggle)
|
|
(tablet-toggle)
|
|
(heart-toggle)
|
|
)
|
|
)
|
|
(defwindow left-bar
|
|
:monitor 0
|
|
:stacking "overlay"
|
|
:exclusive "ignore"
|
|
:geometry (geometry :x "5px"
|
|
:y "10px"
|
|
:width "0px"
|
|
:height "0px"
|
|
:anchor "top left"
|
|
)
|
|
(left-bar)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
(defwidget quick-settings-toggle []
|
|
(eventbox :class "toggle-off"
|
|
:onclick "eww open quick-settings-smol; eww open quick-settings-logo"
|
|
:cursor "pointer"
|
|
|
|
(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)
|
|
)
|
|
|
|
(defvar notif-panel-state false)
|
|
(defwidget notif-panel []
|
|
(eventbox :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"}
|
|
:cursor "pointer"
|
|
|
|
(box :class "notif-panel"
|
|
:orientation "h"
|
|
(label :text " ${notif_icon} ")
|
|
)
|
|
)
|
|
)
|
|
(defwindow notif-panel
|
|
:monitor 0
|
|
:stacking "overlay"
|
|
:exclusive "ignore"
|
|
:geometry (geometry :x "60px"
|
|
:y "10px"
|
|
:width "0px"
|
|
:height "0px"
|
|
:anchor "top right"
|
|
)
|
|
(notif-panel)
|
|
)
|