config 4.9 KB

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