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 {
font-size: 30px;
min-height: 38px;
font-size: 28px;
min-height: 34px;
min-width: 50px;
padding: 0px 0px 0px 5px;
}
.tablet-toggle {
font-size: 26px;
min-height: 38px;
font-size: 28px;
min-height: 34px;
min-width: 50px;
padding: 0px 0px 0px 5px;
}
.heart-toggle {
font-size: 24px;
min-height: 38px;
font-size: 28px;
min-height: 34px;
min-width: 50px;
padding: 0px 0px 0px 4px;
}
@ -23,7 +23,14 @@
font-size: 20px;
min-height: 34px;
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 {

View file

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