nixos-configs/config/eww/quick-settings/quick-settings.yuck

341 lines
9.2 KiB
Text

(defvar showqs false)
(defwidget quick-settings-smol []
(box :class "quick-settings-smol"
:orientation "h"
(label :text "  ")
)
)
(defwindow quick-settings-smol-reveal
:monitor 0
:stacking "overlay"
:exclusive "ignore"
:geometry (geometry :x "5px"
:y "10px"
:width "0px"
:height "0px"
:anchor "top right"
)
(revealer
:transition "crossfade"
:reveal showqs
:duration anim_duration
(quick-settings-smol)
)
)
(defvar qs-run-off "false")
(defwidget quick-settings-logo []
(eventbox :class "quick-settings-logo"
:onclick "$EWW_PATH/run.sh '$EWW_PATH/qs-toggle.sh off' qs-run-off &"
:cursor "pointer"
:onhover "eww update qs-run-off=true"
:onhoverlost "eww update qs-run-off=false"
(box :class "quick-settings-logo"
:orientation "h"
(label :text "  ")
)
)
)
(defwindow quick-settings-logo-reveal
:monitor 0
:stacking "overlay"
:exclusive "ignore"
:geometry (geometry :x "5px"
:y "10px"
:width "0px"
:height "0px"
:anchor "top right"
)
(revealer
:transition "crossfade"
:reveal showqs
:duration anim_duration
(quick-settings-logo)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defwidget quick-settings []
(box :orientation "v"
:space-evenly false
(box :class "quick-settings"
:orientation "v"
:space-evenly false
(label :text "Control Center"
:class "title"
:xalign 0.04
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Button Grid
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "button-grid"
:orientation "v"
:valign "start"
:width 0
:height 0
:halign "center"
:space-evenly false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Row ONE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "button-row"
:orientation "h"
:space-evenly true
:width 0
:height 0
:halign "center"
:style "margin-top: 15px;
margin-bottom: 7px"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "grid-button"
:orientation "h"
:space-evenly false
:width 0
:height 0
(eventbox :class "left-part"
:cursor "pointer"
:onclick "$EWW_PATH/network.sh toggle"
(label :text " ${network_icon} "
:class "grid-label"
)
)
(eventbox :class "right-part"
:cursor "pointer"
:onclick "nm-connection-editor &"
(label :text " " :class "grid-chev")
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "grid-button"
:orientation "h"
:space-evenly false
:width 0
:height 0
(eventbox :class "left-part"
:cursor "pointer"
:onclick "$EWW_PATH/bluetooth.sh toggle"
(label :text " ${bluetooth_icon} "
:class "grid-label"
)
)
(eventbox :class "right-part"
:cursor "pointer"
:onclick "blueberry &"
(label :text " " :class "grid-chev")
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "grid-button"
:orientation "h"
:space-evenly false
:width 0
:height 0
(eventbox :class "left-part"
:cursor "pointer"
:onclick "$EWW_PATH/network.sh toggle-radio"
(label :text "${network_radio == 'on' ? '󰀝 ' : '󱡻 '}"
:class "grid-label"
)
)
(eventbox :class "right-part"
:cursor "pointer"
:onclick "notify-send 'set this up moron'"
(label :text " "
:class "grid-chev"
)
)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SUB ROW
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :orientation "h"
:space-evenly true
:spacing 34
:width 0
:height 0
:halign "center"
(label :text "${network_ssid}"
:class "sub-label"
:width 0
:height 0
:xalign 0.4
:limit-width 12
)
(label :text "${bluetooth_dev}"
:class "sub-label"
:width 0
:height 0
:xalign 0.4
:limit-width 12
)
(label :text ""
:class ""
:width 0
:height 0
:xalign 0.4
:limit-width 12
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Row TWO
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "button-row"
:orientation "h"
:space-evenly true
:width 0
:height 0
:halign "center"
:style "margin-top: 7px;
margin-bottom: 15px;"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "grid-button"
:orientation "h"
:space-evenly false
:width 0
:height 0
(eventbox :class "left-part"
:cursor "pointer"
:onclick "swayosd --output-volume mute-toggle"
(label :text " ${volume_icon} "
:class "grid-label"
)
)
(eventbox :class "right-part"
:cursor "pointer"
:onclick "pavucontrol &"
(label :text " " :class "grid-chev")
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "grid-button"
:orientation "h"
:space-evenly false
:width 0
:height 0
(eventbox :class "left-part"
:cursor "pointer"
:onclick "$EWW_PATH/mic.sh toggle-muted"
(label :text " ${mic_icon} "
:class "grid-label"
)
)
(eventbox :class "right-part"
:cursor "pointer"
:onclick "pavucontrol &"
(label :text " " :class "grid-chev")
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "grid-button"
:orientation "h"
:space-evenly false
:width 0
:height 0
(eventbox :class "left-part"
:cursor "pointer"
:onclick "$LOCK_PATH/lock.sh &"
(label :text " 󰌾 "
:class "grid-label"
)
)
(eventbox :class "right-part"
:cursor "pointer"
:onclick "$EWW_PATH/open.sh powermenu"
(label :text " " :class "grid-chev")
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)
)
(box :class "slider-box"
:orientation "v"
:space-evenly true
:spacing 0
:width 0
:height 0
:halign "center"
(box :class "slider"
:orientation "h"
:valign "start"
:halign "center"
:width 0
:height 0
:space-evenly false
(label :text "${volume_icon}" :class "slider-label")
(scale :value volume_value
:onchange "$EWW_PATH/volume.sh set {}"
:min 0
:max 101
:height 0
:width 0
)
)
(box :class "slider"
:orientation "h"
:valign "start"
:halign "center"
:width 0
:height 0
:space-evenly false
(label :text " ${br_icon} " :class "slider-label" :style "margin-left: 6px;
margin-right: -6px")
(scale :value br
:onchange "$EWW_PATH/brightness.sh set {}"
:min 0
:max 101
:height 0
:width 0
)
)
)
)
(box :class "player"
(playerinfo)
)
)
)
(defwindow quick-settings-reveal
:monitor 0
:stacking "overlay"
:geometry (geometry :x "5px"
:y "7px"
:width "0px"
:height "0px"
:anchor "top right"
)
(revealer
:transition "crossfade"
:reveal showqs
:duration anim_duration
(quick-settings)
)
)