Lemur Pro nixos dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

165 lines
4.1 KiB

2 years ago
  1. (defwindow right
  2. :monitor 0
  3. :geometry (geometry :x "-5%"
  4. :y "0%"
  5. :width "30%"
  6. :height "70%"
  7. :anchor "right center")
  8. :stacking 'bg'
  9. :windowtype "dock"
  10. :wm-ignore true
  11. (root)
  12. )
  13. (defwidget root[]
  14. (box
  15. :class "background"
  16. :orientation "v"
  17. :space-evenly false
  18. :spacing 0
  19. (musicwidget)
  20. (box
  21. :class "background"
  22. :orientation "h"
  23. :space-evenly true
  24. :spacing 10
  25. (sys) (cal))
  26. (box
  27. :class "background"
  28. :orientation "h"
  29. :space-evenly true
  30. :spacing 10
  31. (bar))
  32. ))
  33. (defwidget musicwidget[]
  34. (box
  35. :class "container musiccontainer"
  36. :spacing 10
  37. :orientation "v"
  38. (label :text music :wrap true :show-truncated true :limit-width 80)
  39. (box
  40. :class "musicprogress box purplescale"
  41. :orientation "h"
  42. :space-evenly false
  43. :halign "center"
  44. (scale
  45. :min 0
  46. :max 101
  47. :active false
  48. :value "${songperc}"
  49. :valign "center"
  50. ))
  51. (box
  52. :class "musicsel"
  53. :spacing 90
  54. :space-evenly true
  55. :orientation "h"
  56. (button :onclick "mpc prev" :class "musicbutton" "玲")
  57. (button :onclick "mpc toggle" :class "musicbutton" paused)
  58. (button :onclick "mpc next" :class "musicbutton" "怜"))))
  59. (defwidget sys []
  60. (box
  61. :class "container header"
  62. :orientation "v"
  63. :space-evenly true
  64. :valign "center"
  65. (box
  66. :class "progress box bluescale"
  67. :orientation "h"
  68. :space-evenly false
  69. (label :text " /")
  70. (scale
  71. :min 0
  72. :max 101
  73. :active false
  74. :value {EWW_DISK["/"]["used_perc"]}
  75. :valign "center"
  76. ))
  77. (box
  78. :class "progress box bluescale"
  79. :orientation "h"
  80. :space-evenly false
  81. (label :text " ")
  82. (scale
  83. :min 0
  84. :max 101
  85. :active false
  86. :value {EWW_DISK["/home"]["used_perc"]}
  87. :valign "center"
  88. ))
  89. (box
  90. :class "progress box greenscale"
  91. :orientation "h"
  92. :space-evenly false
  93. (label :text "  ")
  94. (scale
  95. :min 0
  96. :max 101
  97. :active false
  98. :value {EWW_BATTERY["BAT0"]["capacity"]}
  99. :valign "center"
  100. ))
  101. (box
  102. :class "progress box yellowscale"
  103. :orientation "h"
  104. :space-evenly false
  105. (label :text "CPU")
  106. (scale
  107. :min 0
  108. :max 101
  109. :active false
  110. :value "${cpu}"
  111. :valign "center"
  112. ))
  113. ))
  114. (defwidget bar[]
  115. (box
  116. :class "background header mt-20"
  117. :orientation "h"
  118. :space-evenly true
  119. :spacing 20
  120. :halign "center"
  121. :hexpand true
  122. (eventbox :class "launch"
  123. (button :class "launchbutton" :onclick "rofi -show drun&" ""))
  124. (eventbox :class "launch"
  125. (button :class "launchbutton" :onclick "alacritty -e \"nvim\"&" ""))
  126. (eventbox :class "launch"
  127. (button :class "launchbutton" :onclick "code&" ""))
  128. (eventbox :class "launch"
  129. (button :class "launchbutton" :onclick "brave&" "爵"))
  130. ))
  131. ;(defwidget bat []
  132. ; (box :class "container header" :orientation "v"
  133. ; :space-evenly true
  134. ; (circular-progress
  135. ; :value {EWW_BATTERY["BAT0"]["capacity"]}
  136. ; :class "progress" :thickness 10)
  137. ; (label :text battery)
  138. ; ))
  139. (defwidget cal []
  140. (box :class "container beige" :orientation "v" :space-evenly true
  141. (calendar :valign "center")
  142. ;(label :text rems :valign "center")
  143. ))
  144. (deflisten battery :initial "UNK" `loop battery.sh`)
  145. (deflisten brightness :initial "UNK" `loop brightness.py`)
  146. (deflisten time :initial "No Time" `~/.config/eww/scripts/date.sh`)
  147. (deflisten music :initial "-" `loop ~/.config/eww/scripts/music.sh status`)
  148. (deflisten paused :initial "-" `loop ~/.config/eww/scripts/music.sh paused`)
  149. (defpoll cpu :interval "1s" "echo `top -b -n1 | grep \"Cpu(s)\" | awk '{print $2 + $4}'`")
  150. (defpoll songperc :interval "1s" "~/.config/eww/scripts/songperc.sh")
  151. (defpoll rems :interval "1m" "rems l")