config 4.6 KB

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