diff --git a/tree/.config/eww/eww.scss b/tree/.config/eww/eww.scss index 7790316..a02642b 100644 --- a/tree/.config/eww/eww.scss +++ b/tree/.config/eww/eww.scss @@ -126,6 +126,13 @@ scale trough { color: red; } +.bluetooth { +} + +.bluetooth.active { +} + + .battery-gauge { color: $highlight1; transition: all 0.5s; diff --git a/tree/.config/eww/eww.yuck b/tree/.config/eww/eww.yuck index f448ec6..c5ae107 100644 --- a/tree/.config/eww/eww.yuck +++ b/tree/.config/eww/eww.yuck @@ -36,6 +36,7 @@ :class "bottom" :space-evenly false (vpn) + (bluetooth) (speaker) (temperature) (battery) @@ -71,9 +72,37 @@ (label :text n)) ) +(defwidget vpn [] + (button :valign "end" + :class "vpn thingy ${vpn_status.class}" + :onclick "${vpn_status.on_click}" + :tooltip "${vpn_status.tooltip}" + (label :text "${vpn_status.icon}") +)) + +(defwidget bluetooth [] + (eventbox :onhover "${EWW_CMD} update show_bluetooth=true" + :onhoverlost "${EWW_CMD} update show_bluetooth=false" + (box :orientation "v" + :class "thingy bluetooth ${show_bluetooth ? "active" : ""}" + :space-evenly false + (revealer :transition "slidedown" + :reveal show_bluetooth + (box :orientation "v" + (button :class "clickable" :onclick "ba lurar" (label :text "LUR")) + (button :class "clickable" :onclick "ba högtalare" (label :text "HÖG")) + (button :class "clickable" :onclick "ba bluetoothctl disconnect" (label :text "---")) + ) + ) + (label :text "BLT") + (revealer :transition "slideup" + :reveal {!show_bluetooth} + (label :text "---") + ) +))) + (defwidget speaker [] - (eventbox - :onhover "${EWW_CMD} update show_volume=true" + (eventbox :onhover "${EWW_CMD} update show_volume=true" :onhoverlost "${EWW_CMD} update show_volume=false" (box :orientation "v" :class "thingy volbox ${show_volume ? "active" : ""}" @@ -95,14 +124,6 @@ ) ))) -(defwidget vpn [] - (button :valign "end" - :class "vpn thingy ${vpn_status.class}" - :onclick "${vpn_status.on_click}" - :tooltip "${vpn_status.tooltip}" - (label :text "${vpn_status.icon}") -)) - (defwidget temperature [] (box :orientation "v" :valign "end" @@ -174,6 +195,7 @@ )) (defvar show_volume false) +(defvar show_bluetooth false) (defpoll workspaces :interval "1s" "eww-workspaces") (defpoll volume_out :interval "1s" "pamixer --get-volume")