config 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. // =============================================================================
  2. //
  3. // Waybar configuration
  4. //
  5. // Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
  6. //
  7. // =============================================================================
  8. {
  9. // -------------------------------------------------------------------------
  10. // Global configuration
  11. // -------------------------------------------------------------------------
  12. "layer": "top",
  13. "position": "top",
  14. // If height property would be not present, it'd be calculated dynamically
  15. "height": 30,
  16. "modules-left": [
  17. "sway/workspaces",
  18. "sway/mode"
  19. ],
  20. "modules-center": [
  21. "sway/window"
  22. ],
  23. "modules-right": [
  24. // @host tompot
  25. "custom/brightness",
  26. // @end
  27. "pulseaudio",
  28. "network",
  29. "memory",
  30. "cpu",
  31. "custom/keyboard-layout",
  32. "idle_inhibitor",
  33. "tray",
  34. // @host jellyfish
  35. "battery",
  36. // @end
  37. "clock#date",
  38. "clock#time"
  39. ],
  40. // -------------------------------------------------------------------------
  41. // Modules
  42. // -------------------------------------------------------------------------
  43. // @host tompot
  44. "custom/brightness": {
  45. "exec": "~/.config/sway/scripts/get-monitor-brightness.sh",
  46. "return-type": "json",
  47. "interval": 2,
  48. "on-click": "~/.config/sway/scripts/brightness-slider.sh",
  49. "on-scroll-up": "ddcutil setvcp --sn 6L1M413 10 + 5 && pkill -RTMIN+8 waybar",
  50. "on-scroll-down": "ddcutil setvcp --sn 6L1M413 10 - 5 && pkill -RTMIN+8 waybar",
  51. // "signal": 8,
  52. "format": "🖵 {}",
  53. "smooth-scrolling-threshold": 1
  54. },
  55. // @end
  56. "battery": {
  57. "interval": 10,
  58. "states": {
  59. "warning": 30,
  60. "critical": 15
  61. },
  62. // Connected to AC
  63. "format": " {icon} {capacity}%", // Icon: bolt
  64. // Not connected to AC
  65. "format-discharging": "{icon} {capacity}%",
  66. "format-icons": [
  67. "", // Icon: battery-full
  68. "", // Icon: battery-three-quarters
  69. "", // Icon: battery-half
  70. "", // Icon: battery-quarter
  71. "" // Icon: battery-empty
  72. ],
  73. "tooltip": true
  74. },
  75. "clock#time": {
  76. "interval": 1,
  77. "format": "{:%H:%M:%S}",
  78. "tooltip": false
  79. },
  80. "clock#date": {
  81. "interval": 10,
  82. "format": " {:%e %b}", // Icon: calendar-alt
  83. "tooltip-format": "{:%e %B %Y}"
  84. },
  85. "cpu": {
  86. "interval": 5,
  87. "format": " {usage}% ({load})", // Icon: microchip
  88. "states": {
  89. "warning": 70,
  90. "critical": 90
  91. }
  92. },
  93. "memory": {
  94. "interval": 5,
  95. "format": " {}%", // Icon: database (memory)
  96. "states": {
  97. "warning": 70,
  98. "critical": 90
  99. }
  100. },
  101. "network": {
  102. "interval": 5,
  103. "format-wifi": " {essid} ({signalStrength}%)", // Icon: wifi
  104. "format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
  105. "format-disconnected": "⚠ Disconnected",
  106. "tooltip-format": "{ifname}: {ipaddr}",
  107. // @host tompot
  108. "on-click": "~/.config/waybar/scripts/iwd-connect.sh"
  109. // @end
  110. },
  111. "sway/mode": {
  112. "format": "<span style=\"italic\"> {}</span>", // Icon: expand-arrows-alt
  113. "tooltip": false
  114. },
  115. "sway/window": {
  116. "format": "{}",
  117. "max-length": 120
  118. },
  119. "sway/workspaces": {
  120. "all-outputs": false,
  121. "disable-scroll": true,
  122. "format": "{icon} {name}",
  123. "format-icons": {
  124. "1:www": "龜", // Icon: firefox-browser
  125. "2:mail": "", // Icon: mail
  126. "3:editor": "", // Icon: code
  127. "4:terminals": "", // Icon: terminal
  128. "5:portal": "", // Icon: terminal
  129. "urgent": "",
  130. "focused": "",
  131. "default": ""
  132. }
  133. },
  134. "pulseaudio": {
  135. //"scroll-step": 1,
  136. "format": "{icon} {volume}%",
  137. "format-bluetooth": "{icon} {volume}%",
  138. "format-muted": "",
  139. "format-icons": {
  140. "headphones": "",
  141. "handsfree": "",
  142. "headset": "",
  143. "phone": "",
  144. "portable": "",
  145. "car": "",
  146. "default": ["", ""]
  147. },
  148. "on-click": "pavucontrol"
  149. },
  150. "temperature": {
  151. "critical-threshold": 80,
  152. "interval": 5,
  153. "format": "{icon} {temperatureC}°C",
  154. "format-icons": [
  155. "", // Icon: temperature-empty
  156. "", // Icon: temperature-quarter
  157. "", // Icon: temperature-half
  158. "", // Icon: temperature-three-quarters
  159. "" // Icon: temperature-full
  160. ],
  161. "tooltip": true
  162. },
  163. "idle_inhibitor": {
  164. "format": "{icon}",
  165. "format-icons": {
  166. "activated": "",
  167. "deactivated": ""
  168. },
  169. "tooltip-format-activated": "Idle inhibitor: ON",
  170. "tooltip-format-deactivated": "Idle inhibitor: OFF"
  171. },
  172. "tray": {
  173. "icon-size": 21,
  174. "spacing": 10
  175. }
  176. }