~kris/dots

srice

ref: e5cf200ba29f0a659b2e92172f2fc940dc8d2017 srice/.config/eww/widgets/brightness_popup.yuck -rw-r--r-- 1.1 KiB
e5cf200b — Kris Yotam conky: Plan 9 modern theme with cyan border 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(deflisten brightness :initial "50"
  "~/.config/eww/scripts/get_brightness_listen.sh")

(defwidget brightness-popup []
  (box :class "brightness-popup" 
       :orientation "v"          
       :space-evenly false
    (box :class "brightness-header-popup"
      (label :class "icon-brightness-popup" :text "☀"))         
    (box :class "brightness-slider-box-popup"
         :orientation "v"        
         :vexpand true           
         :space-evenly false
      (scale :class "brightness-slider-popup"
             :orientation "v"    
             :flipped true       
             :value brightness
             :min 0
             :max 100
             :onchange "brightnessctl set {}% && ~/.config/eww/scripts/brightness-popup.sh")
      (label :class "brightness-percent-popup" 
             :text "${brightness}%"))))

(defwindow brightness-popup
  :monitor 0
  :geometry (geometry :x "-16px"
                      :y "52px"
                      :width "60px"    
                      :height "200px"  
                      :anchor "top right")
  :stacking "overlay"
  :windowtype "normal"
  :wm-ignore true
  (brightness-popup))