config 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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. "custom/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. // Custom battery module: shows time remaining AND performance settings
  57. // (power profile, CPU governor, EPP, TLP mode) in the hover tooltip.
  58. "custom/battery": {
  59. "exec": "~/.config/waybar/scripts/battery-status.sh",
  60. "return-type": "json",
  61. "interval": 10,
  62. "tooltip": true
  63. },
  64. "clock#time": {
  65. "interval": 1,
  66. "format": "{:%H:%M:%S}",
  67. "tooltip": false
  68. },
  69. "clock#date": {
  70. "interval": 10,
  71. "format": " {:%e %b}", // Icon: calendar-alt
  72. "tooltip-format": "{:%e %B %Y}"
  73. },
  74. "cpu": {
  75. "interval": 5,
  76. "format": " {usage}% ({load})", // Icon: microchip
  77. "states": {
  78. "warning": 70,
  79. "critical": 90
  80. }
  81. },
  82. "memory": {
  83. "interval": 5,
  84. "format": " {}%", // Icon: database (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. // @host tompot
  97. "on-click": "~/.config/waybar/scripts/iwd-connect.sh"
  98. // @end
  99. },
  100. "sway/mode": {
  101. "format": "<span style=\"italic\"> {}</span>", // Icon: expand-arrows-alt
  102. "tooltip": false
  103. },
  104. "sway/window": {
  105. "format": "{}",
  106. "max-length": 120
  107. },
  108. "sway/workspaces": {
  109. "all-outputs": false,
  110. "disable-scroll": true,
  111. "format": "{icon} {name}",
  112. "format-icons": {
  113. "1:www": "龜", // Icon: firefox-browser
  114. "2:mail": "", // Icon: mail
  115. "3:editor": "", // Icon: code
  116. "4:terminals": "", // Icon: terminal
  117. "5:portal": "", // Icon: terminal
  118. "urgent": "",
  119. "focused": "",
  120. "default": ""
  121. }
  122. },
  123. "pulseaudio": {
  124. //"scroll-step": 1,
  125. "format": "{icon} {volume}%",
  126. "format-bluetooth": "{icon} {volume}%",
  127. "format-muted": "",
  128. "format-icons": {
  129. "headphones": "",
  130. "handsfree": "",
  131. "headset": "",
  132. "phone": "",
  133. "portable": "",
  134. "car": "",
  135. "default": ["", ""]
  136. },
  137. "on-click": "pavucontrol"
  138. },
  139. "temperature": {
  140. "critical-threshold": 80,
  141. "interval": 5,
  142. "format": "{icon} {temperatureC}°C",
  143. "format-icons": [
  144. "", // Icon: temperature-empty
  145. "", // Icon: temperature-quarter
  146. "", // Icon: temperature-half
  147. "", // Icon: temperature-three-quarters
  148. "" // Icon: temperature-full
  149. ],
  150. "tooltip": true
  151. },
  152. "idle_inhibitor": {
  153. "format": "{icon}",
  154. "format-icons": {
  155. "activated": "",
  156. "deactivated": ""
  157. },
  158. "tooltip-format-activated": "Idle inhibitor: ON",
  159. "tooltip-format-deactivated": "Idle inhibitor: OFF"
  160. },
  161. "tray": {
  162. "icon-size": 21,
  163. "spacing": 10
  164. }
  165. }