feat: separate button from notif pane

This commit is contained in:
matt1432 2023-07-23 13:40:45 -04:00
parent 74abba7cac
commit e672401907
2 changed files with 58 additions and 38 deletions

View file

@ -1,20 +1,20 @@
.osk-toggle { .osk-toggle {
font-size: 30px; font-size: 28px;
min-height: 38px; min-height: 34px;
min-width: 50px; min-width: 50px;
padding: 0px 0px 0px 5px; padding: 0px 0px 0px 5px;
} }
.tablet-toggle { .tablet-toggle {
font-size: 26px; font-size: 28px;
min-height: 38px; min-height: 34px;
min-width: 50px; min-width: 50px;
padding: 0px 0px 0px 5px; padding: 0px 0px 0px 5px;
} }
.heart-toggle { .heart-toggle {
font-size: 24px; font-size: 28px;
min-height: 38px; min-height: 34px;
min-width: 50px; min-width: 50px;
padding: 0px 0px 0px 4px; padding: 0px 0px 0px 4px;
} }
@ -23,7 +23,14 @@
font-size: 20px; font-size: 20px;
min-height: 34px; min-height: 34px;
min-width: 105px; min-width: 105px;
padding: 0px 0px 0px 5px; padding: 1px 0px 1px 5px;
}
.quick-settings-toggle {
font-size: 24px;
min-height: 37px;
min-width: 40px;
padding: 0px 0px 0px 0px;
} }
.toggle-off { .toggle-off {

View file

@ -1,7 +1,8 @@
(defvar osk-ts false) (defvar osk-ts false)
(defwidget osk-toggle [] (defwidget osk-toggle []
(eventbox :class {osk-ts ? "toggle-on" : "toggle-off"} (button :class {osk-ts ? "toggle-on" : "toggle-off"}
:onclick "$HYPR_PATH/osk-toggle.sh toggle &" :onclick "$HYPR_PATH/osk-toggle.sh toggle &"
(box :class "osk-toggle" (box :class "osk-toggle"
:orientation "h" :orientation "h"
(label :text " 󰌌 ") (label :text " 󰌌 ")
@ -11,7 +12,7 @@
(defvar tablet-ts false) (defvar tablet-ts false)
(defwidget tablet-toggle [] (defwidget tablet-toggle []
(eventbox :class {tablet-ts ? "toggle-on" : "toggle-off"} (button :class {tablet-ts ? "toggle-on" : "toggle-off"}
:onclick {tablet-ts ? "$HYPR_PATH/laptop-mode.sh &" : :onclick {tablet-ts ? "$HYPR_PATH/laptop-mode.sh &" :
"$HYPR_PATH/tablet-mode.sh &"} "$HYPR_PATH/tablet-mode.sh &"}
(box :class "tablet-toggle" (box :class "tablet-toggle"
@ -22,8 +23,9 @@
) )
(defwidget heart-toggle [] (defwidget heart-toggle []
(eventbox :class {heart_icon == "󰣐" ? "toggle-on" : "toggle-off"} (button :class {heart_icon == "󰣐" ? "toggle-on" : "toggle-off"}
:onclick "$EWW_PATH/heart.sh" :onclick "$EWW_PATH/heart.sh"
(box :class "heart-toggle" (box :class "heart-toggle"
:orientation "h" :orientation "h"
(label :text " ${heart_icon} ") (label :text " ${heart_icon} ")
@ -34,7 +36,7 @@
(defwidget left-bar [] (defwidget left-bar []
(box :class "transparent" (box :class "transparent"
:space-evenly true :space-evenly true
:spacing 14 :spacing 12
:orientation "h" :orientation "h"
(osk-toggle) (osk-toggle)
(tablet-toggle) (tablet-toggle)
@ -45,8 +47,8 @@
:monitor 0 :monitor 0
:stacking "overlay" :stacking "overlay"
:exclusive "ignore" :exclusive "ignore"
:geometry (geometry :x "10px" :geometry (geometry :x "5px"
:y "11px" :y "10px"
:width "0px" :width "0px"
:height "0px" :height "0px"
:anchor "top left" :anchor "top left"
@ -56,8 +58,28 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;  (defvar quick-settings-ts false)
(defwidget quick-settings-toggle []
(button :class {quick-settings-ts ? "toggle-on" : "toggle-off"}
:onclick ""
(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) (defvar notif-panel-state false)
(defwidget notif-panel [] (defwidget notif-panel []
@ -70,24 +92,15 @@
) )
) )
) )
(defwindow notif-panel
(defwidget right-bar []
(box :class "transparent"
:space-evenly true
:spacing 14
:orientation "h"
(notif-panel)
)
)
(defwindow right-bar
:monitor 0 :monitor 0
:stacking "overlay" :stacking "overlay"
:exclusive "ignore" :exclusive "ignore"
:geometry (geometry :x "50px" :geometry (geometry :x "60px"
:y "11px" :y "10px"
:width "0px" :width "0px"
:height "0px" :height "0px"
:anchor "top right" :anchor "top right"
) )
(right-bar) (notif-panel)
) )