;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; On-Screen Keyboard Toggle ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar osk-ts false) (defvar osk-run-off "false") (defwidget osk-toggle-on [] (eventbox :class "toggle-on" :onclick "$EWW_PATH/run.sh '$HYPR_PATH/osk-toggle.sh toggle' osk-run-off &" :cursor "pointer" :onhover "eww update osk-run-off=true" :onhoverlost "eww update osk-run-off=false" (box :class "osk-toggle" :orientation "h" (label :text " 󰌌 ") ) ) ) (defvar osk-run-on "false") (defwidget osk-toggle-off [] (eventbox :class "toggle-off" :onclick "$EWW_PATH/run.sh '$HYPR_PATH/osk-toggle.sh toggle' osk-run-on &" :cursor "pointer" :onhover "eww update osk-run-on=true" :onhoverlost "eww update osk-run-on=false" (box :class "osk-toggle" :orientation "h" (label :text " 󰌌 ") ) ) ) (defwindow osk :monitor 0 :stacking "overlay" :exclusive "ignore" :geometry (geometry :x "5px" :y "10px" :width "0px" :height "0px" :anchor "top left" ) (revealer :transition "crossfade" :reveal osk-ts :duration "550ms" (osk-toggle-on) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Tablet Mode Toggle ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar tablet-ts false) (defvar tablet-run-off "false") (defwidget tablet-toggle-on [] (eventbox :class "toggle-on" :onclick "$EWW_PATH/run.sh '$HYPR_PATH/laptop-mode.sh' tablet-run-off &" :cursor "pointer" :onhover "eww update tablet-run-off=true" :onhoverlost "eww update tablet-run-off=false" (box :class "tablet-toggle" :orientation "h" (label :text " 󰦧 ") ) ) ) (defvar tablet-run-on "false") (defwidget tablet-toggle-off [] (eventbox :class "toggle-off" :onclick "$EWW_PATH/run.sh '$HYPR_PATH/tablet-mode.sh' tablet-run-on &" :cursor "pointer" :onhover "eww update tablet-run-on=true" :onhoverlost "eww update tablet-run-on=false" (box :class "tablet-toggle" :orientation "h" (label :text " 󰦧 ") ) ) ) (defwindow tablet :monitor 0 :stacking "overlay" :exclusive "ignore" :geometry (geometry :x "72px" :y "10px" :width "0px" :height "0px" :anchor "top left" ) (revealer :transition "crossfade" :reveal tablet-ts :duration "550ms" (tablet-toggle-on) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Heart Toggle ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar heart-ts "default") (defvar heart-run-off "false") (defwidget heart-toggle-on [] (eventbox :class "toggle-on" :onclick "$EWW_PATH/run.sh '$EWW_PATH/heart.sh toggle' heart-run-off &" :cursor "pointer" :onhover "eww update heart-run-off=true" :onhoverlost "eww update heart-run-off=false" (box :class "heart-toggle" :orientation "h" (label :text " ${heart_icon} ") ) ) ) (defvar heart-run-on "false") (defwidget heart-toggle-off [] (eventbox :class "toggle-off" :onclick "$EWW_PATH/run.sh '$EWW_PATH/heart.sh toggle' heart-run-on &" :cursor "pointer" :onhover "eww update heart-run-on=true" :onhoverlost "eww update heart-run-on=false" (box :class "heart-toggle" :orientation "h" (label :text " ${heart_icon} ") ) ) ) (defwindow heart :monitor 0 :stacking "overlay" :exclusive "ignore" :geometry (geometry :x "140px" :y "10px" :width "0px" :height "0px" :anchor "top left" ) (revealer :transition "crossfade" :reveal heart-ts :duration "550ms" (heart-toggle-on) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Left Bar ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defwidget left-bar [] (box :class "transparent" :space-evenly true :spacing 12 :orientation "h" (osk-toggle-off) (tablet-toggle-off) (heart-toggle-off) ) ) (defwindow left-bar :monitor 0 :stacking "overlay" :exclusive "ignore" :geometry (geometry :x "5px" :y "10px" :width "0px" :height "0px" :anchor "top left" ) (left-bar) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Quick Settings Toggle ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar qs-run-on "false") (defwidget quick-settings-toggle [] (eventbox :class "toggle-off" :onclick "$EWW_PATH/run.sh '$EWW_PATH/qs-toggle.sh on' qs-run-on &" :cursor "pointer" :onhover "eww update qs-run-on=true" :onhoverlost "eww update qs-run-on=false" (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) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Notification Panel Toggle ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar notif-panel-state false) (defvar notif-run-off "false") (defwidget notif-panel-on [] (eventbox :class "toggle-on" :onclick "$EWW_PATH/run.sh '$EWW_PATH/notif-toggle.sh off' notif-run-off &" :cursor "pointer" :onhover "eww update notif-run-off=true" :onhoverlost "eww update notif-run-off=false" (box :class "notif-panel" :orientation "h" (label :text " ${notif_icon} ") ) ) ) (defvar notif-run-on "false") (defwidget notif-panel-off [] (eventbox :class "toggle-off" :onclick "$EWW_PATH/run.sh '$EWW_PATH/notif-toggle.sh on' notif-run-on &" :cursor "pointer" :onhover "eww update notif-run-on=true" :onhoverlost "eww update notif-run-on=false" (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-off) ) (defwindow notif-panel-on :monitor 0 :stacking "overlay" :exclusive "ignore" :geometry (geometry :x "60px" :y "10px" :width "0px" :height "0px" :anchor "top right" ) (revealer :transition "crossfade" :reveal notif-panel-state :duration "550ms" (notif-panel-on) ) )