config.jsonc 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. // -*- mode: jsonc -*-
  2. {
  3. // "layer": "top", // Waybar at top layer
  4. // "position": "bottom", // Waybar position (top|bottom|left|right)
  5. "height": 30, // Waybar height (to be removed for auto height)
  6. // "width": 1280, // Waybar width
  7. "spacing": 4, // Gaps between modules (4px)
  8. // Choose the order of the modules
  9. "modules-left": [
  10. "sway/workspaces",
  11. "sway/mode",
  12. "sway/scratchpad",
  13. "sway/window",
  14. "custom/media"
  15. ],
  16. "modules-center": [
  17. "custom/weather",
  18. "clock"
  19. ],
  20. "modules-right": [
  21. "pulseaudio",
  22. "network",
  23. "cpu",
  24. "memory",
  25. "temperature",
  26. "battery",
  27. "backlight",
  28. "keyboard-state",
  29. "sway/language",
  30. "battery#bat2",
  31. "tray",
  32. "custom/power"
  33. ],
  34. // Modules configuration
  35. // "sway/workspaces": {
  36. // "disable-scroll": true,
  37. // "all-outputs": true,
  38. // "warp-on-scroll": false,
  39. // "format": "{name}: {icon}",
  40. // "format-icons": {
  41. // "1": "",
  42. // "2": "",
  43. // "3": "",
  44. // "4": "",
  45. // "5": "",
  46. // "urgent": "",
  47. // "focused": "",
  48. // "default": ""
  49. // }
  50. // },
  51. "keyboard-state": {
  52. "numlock": true,
  53. "capslock": true,
  54. "format": "{name} {icon}",
  55. "format-icons": {
  56. "locked": "",
  57. "unlocked": ""
  58. }
  59. },
  60. "sway/mode": {
  61. "format": "<span style=\"italic\">{}</span>"
  62. },
  63. "sway/scratchpad": {
  64. "format": "{icon} {count}",
  65. "show-empty": false,
  66. "format-icons": ["", ""],
  67. "tooltip": true,
  68. "tooltip-format": "{app}: {title}"
  69. },
  70. "mpd": {
  71. "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
  72. "format-disconnected": "Disconnected ",
  73. "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
  74. "unknown-tag": "N/A",
  75. "interval": 5,
  76. "consume-icons": {
  77. "on": " "
  78. },
  79. "random-icons": {
  80. "off": "<span color=\"#f53c3c\"></span> ",
  81. "on": " "
  82. },
  83. "repeat-icons": {
  84. "on": " "
  85. },
  86. "single-icons": {
  87. "on": "1 "
  88. },
  89. "state-icons": {
  90. "paused": "",
  91. "playing": ""
  92. },
  93. "tooltip-format": "MPD (connected)",
  94. "tooltip-format-disconnected": "MPD (disconnected)"
  95. },
  96. "idle_inhibitor": {
  97. "format": "{icon}",
  98. "format-icons": {
  99. "activated": "",
  100. "deactivated": ""
  101. }
  102. },
  103. "tray": {
  104. "icon-size": 14,
  105. "spacing": 10
  106. },
  107. "clock": {
  108. "timezone": "Europe/Lisbon",
  109. "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
  110. "format": "{:%A, %d/%m/%Y  %H:%M }",
  111. },
  112. "cpu": {
  113. "format": "{usage}% ",
  114. "tooltip": false
  115. },
  116. "memory": {
  117. "format": "{}% "
  118. },
  119. "temperature": {
  120. // "thermal-zone": 2,
  121. // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
  122. "critical-threshold": 80,
  123. // "format-critical": "{temperatureC}°C {icon}",
  124. "format": "{temperatureC}°C {icon}",
  125. "format-icons": ["", "", ""]
  126. },
  127. "backlight": {
  128. // "device": "acpi_video1",
  129. "format": "{percent}% {icon}",
  130. "format-icons": ["", "", "", "", "", "", "", "", ""]
  131. },
  132. "battery": {
  133. "states": {
  134. // "good": 95,
  135. "warning": 30,
  136. "critical": 15
  137. },
  138. "format": "{capacity}% {icon}",
  139. "format-full": "{capacity}% {icon}",
  140. "format-charging": "{capacity}% ",
  141. "format-plugged": "{capacity}% ",
  142. "format-alt": "{time} {icon}",
  143. // "format-good": "", // An empty format will hide the module
  144. // "format-full": "",
  145. "format-icons": ["", "", "", "", ""]
  146. },
  147. "battery#bat2": {
  148. "bat": "BAT2"
  149. },
  150. "power-profiles-daemon": {
  151. "format": "{icon}",
  152. "tooltip-format": "Power profile: {profile}\nDriver: {driver}",
  153. "tooltip": true,
  154. "format-icons": {
  155. "default": "",
  156. "performance": "",
  157. "balanced": "",
  158. "power-saver": ""
  159. }
  160. },
  161. "network": {
  162. // "interface": "wlp2*", // (Optional) To force the use of this interface
  163. "format-wifi": "{essid} ({signalStrength}%) ",
  164. "format-ethernet": "{ipaddr}/{cidr} ",
  165. "tooltip-format": "{ifname} via {gwaddr} ",
  166. "format-linked": "{ifname} (No IP) ",
  167. "format-disconnected": "Disconnected ⚠",
  168. "format-alt": "{ifname}: {ipaddr}/{cidr}"
  169. },
  170. "pulseaudio": {
  171. // "scroll-step": 1, // %, can be a float
  172. "format": "{volume}% {icon} {format_source}",
  173. "format-bluetooth": "{volume}% {icon} {format_source}",
  174. "format-bluetooth-muted": " {icon} {format_source}",
  175. "format-muted": " {format_source}",
  176. "format-source": "{volume}% ",
  177. "format-source-muted": "",
  178. "format-icons": {
  179. "headphone": "",
  180. "hands-free": "",
  181. "headset": "",
  182. "phone": "",
  183. "portable": "",
  184. "car": "",
  185. "default": ["", "", ""]
  186. },
  187. "on-click": "pavucontrol"
  188. },
  189. "custom/media": {
  190. "format": "{icon} {}",
  191. "return-type": "json",
  192. "max-length": 40,
  193. "format-icons": {
  194. "spotify": "",
  195. "default": "🎜"
  196. },
  197. "escape": true,
  198. "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
  199. // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
  200. },
  201. "custom/power": {
  202. "format" : "⏻ ",
  203. "tooltip": false,
  204. "menu": "on-click",
  205. "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder
  206. "menu-actions": {
  207. "shutdown": "loginctl poweroff",
  208. "reboot": "loginctl reboot",
  209. "logout": "loginctl terminate-user $USER",
  210. "hibernate": "loginctl suspend"
  211. }
  212. },
  213. "sway/language": {
  214. "format-pl": "[pl]",
  215. "format-en": "[us]",
  216. "on-click": "hyprctl switchxkblayout at-translated-set-2-keyboard next"
  217. },
  218. "custom/weather": {
  219. "exec": "~/.config/waybar/wittr.sh",
  220. "return-type": "json",
  221. "format": "{}",
  222. "tooltip": true,
  223. "interval": 900
  224. },
  225. }