config 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. "pulseaudio",
  25. "network",
  26. "memory",
  27. "cpu",
  28. "custom/keyboard-layout",
  29. "tray",
  30. "clock#date",
  31. "clock#time"
  32. ],
  33. // -------------------------------------------------------------------------
  34. // Modules
  35. // -------------------------------------------------------------------------
  36. "battery": {
  37. "interval": 10,
  38. "states": {
  39. "warning": 30,
  40. "critical": 15
  41. },
  42. // Connected to AC
  43. "format": " {icon} {capacity}%", // Icon: bolt
  44. // Not connected to AC
  45. "format-discharging": "{icon} {capacity}%",
  46. "format-icons": [
  47. "", // Icon: battery-full
  48. "", // Icon: battery-three-quarters
  49. "", // Icon: battery-half
  50. "", // Icon: battery-quarter
  51. "" // Icon: battery-empty
  52. ],
  53. "tooltip": true
  54. },
  55. "clock#time": {
  56. "interval": 1,
  57. "format": "{:%H:%M:%S}",
  58. "tooltip": false
  59. },
  60. "clock#date": {
  61. "interval": 10,
  62. "format": " {:%e %b %Y}", // Icon: calendar-alt
  63. "tooltip-format": "{:%e %B %Y}"
  64. },
  65. "cpu": {
  66. "interval": 5,
  67. "format": " {usage}% ({load})", // Icon: microchip
  68. "states": {
  69. "warning": 70,
  70. "critical": 90
  71. }
  72. },
  73. "custom/keyboard-layout": {
  74. "exec": "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4",
  75. // Interval set only as a fallback, as the value is updated by signal
  76. "interval": 30,
  77. "format": " {}", // Icon: keyboard
  78. // Signal sent by Sway key binding (~/.config/sway/key-bindings)
  79. "signal": 1, // SIGHUP
  80. "tooltip": false
  81. },
  82. "memory": {
  83. "interval": 5,
  84. "format": " {}%", // Icon: memory
  85. "states": {
  86. "warning": 70,
  87. "critical": 90
  88. }
  89. },
  90. "network": {
  91. "interval": 5,
  92. "format-wifi": " {essid} ({signalStrength}%)", // Icon: wifi
  93. "format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
  94. "format-disconnected": "⚠ Disconnected",
  95. "tooltip-format": "{ifname}: {ipaddr}"
  96. },
  97. "sway/mode": {
  98. "format": "<span style=\"italic\"> {}</span>", // Icon: expand-arrows-alt
  99. "tooltip": false
  100. },
  101. "sway/window": {
  102. "format": "{}",
  103. "max-length": 120
  104. },
  105. "sway/workspaces": {
  106. "all-outputs": false,
  107. "disable-scroll": true,
  108. "format": "{icon} {name}",
  109. "format-icons": {
  110. "1:www": "龜", // Icon: firefox-browser
  111. "2:mail": "", // Icon: mail
  112. "3:editor": "", // Icon: code
  113. "4:terminals": "", // Icon: terminal
  114. "5:portal": "", // Icon: terminal
  115. "urgent": "",
  116. "focused": "",
  117. "default": ""
  118. }
  119. },
  120. "pulseaudio": {
  121. //"scroll-step": 1,
  122. "format": "{icon} {volume}%",
  123. "format-bluetooth": "{icon} {volume}%",
  124. "format-muted": "",
  125. "format-icons": {
  126. "headphones": "",
  127. "handsfree": "",
  128. "headset": "",
  129. "phone": "",
  130. "portable": "",
  131. "car": "",
  132. "default": ["", ""]
  133. },
  134. "on-click": "pavucontrol"
  135. },
  136. "temperature": {
  137. "critical-threshold": 80,
  138. "interval": 5,
  139. "format": "{icon} {temperatureC}°C",
  140. "format-icons": [
  141. "", // Icon: temperature-empty
  142. "", // Icon: temperature-quarter
  143. "", // Icon: temperature-half
  144. "", // Icon: temperature-three-quarters
  145. "" // Icon: temperature-full
  146. ],
  147. "tooltip": true
  148. },
  149. "tray": {
  150. "icon-size": 21,
  151. "spacing": 10
  152. }
  153. }