config 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. {
  2. "layer": "top", // Waybar at top layer
  3. "position": "top", // Waybar position (top|bottom|left|right)
  4. "height": 15, // Waybar height (to be removed for auto height)
  5. // Archived modules
  6. // "bluetooth", "custom/weather", "temperature", "sway/window"
  7. // Choose the order of the modules
  8. "modules-left": [ "sway/workspaces", "sway/language", "sway/mode", "idle_inhibitor", "custom/media"],
  9. "modules-center": ["clock"],
  10. "modules-right": [ "custom/cpugovernor", "cpu", "temperature", "custom/gpu", "pulseaudio", "bluetooth", "network", "tray"],
  11. // Modules configuration
  12. "sway/workspaces": {
  13. "disable-scroll": true,
  14. "all-outputs": true,
  15. "format": "{icon}",
  16. "format-icons": {
  17. "1": "<span color=\"#D8DEE9\"></span>",
  18. "2": "<span color=\"#88C0D0\"></span>",
  19. "3": "<span color=\"#A3BE8C\"></span>",
  20. "4": "<span color=\"#D8DEE9\"></span>",
  21. "urgent": "",
  22. "focused": "",
  23. "default": ""
  24. }
  25. },
  26. "sway/mode": {
  27. "format": "<span style=\"italic\">{}</span>"
  28. },
  29. "sway/window": {
  30. "format": "{}",
  31. "max-length": 50,
  32. "tooltip": false
  33. },
  34. "bluetooth": {
  35. "interval": 30,
  36. "format": "{icon}",
  37. // "format-alt": "{status}",
  38. "format-icons": {
  39. "enabled": "",
  40. "disabled": ""
  41. },
  42. "on-click": "blueberry"
  43. },
  44. "sway/language": {
  45. "format": "<big></big> {}",
  46. "max-length": 5,
  47. "min-length": 5,
  48. },
  49. "idle_inhibitor": {
  50. "format": "{icon}",
  51. "format-icons": {
  52. "activated": "",
  53. "deactivated": ""
  54. },
  55. "tooltip": "true"
  56. },
  57. "tray": {
  58. //"icon-size": 11,
  59. "spacing": 5
  60. },
  61. "clock": {
  62. "interval": 1,
  63. "format": " {:%H:%M:%S  %e %b}",
  64. "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
  65. "today-format": "<b>{}</b>",
  66. },
  67. "cpu": {
  68. "interval": "1",
  69. "format": " {max_frequency}GHz <span color=\"darkgray\">| {usage}%</span>",
  70. "max-length": 13,
  71. "min-length": 13,
  72. "on-click": "kitty -e htop --sort-key PERCENT_CPU",
  73. "tooltip": false
  74. },
  75. "temperature": {
  76. //"thermal-zone": 1,
  77. "interval": "4",
  78. "hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input",
  79. "critical-threshold": 74,
  80. "format-critical": " {temperatureC}°C",
  81. "format": "{icon} {temperatureC}°C",
  82. "format-icons": ["", "", ""],
  83. "max-length": 7,
  84. "min-length": 7
  85. },
  86. "network": {
  87. // "interface": "wlan0", // (Optional) To force the use of this interface,
  88. "format-wifi": " {essid}",
  89. "format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
  90. "format-linked": "{ifname} (No IP) ",
  91. "format-disconnected": "",
  92. "format-alt": "{ifname}: {ipaddr}/{cidr}",
  93. "family": "ipv4",
  94. "tooltip-format-wifi": " {ifname} @ {essid}\nIP: {ipaddr}\nStrength: {signalStrength}%\nFreq: {frequency}MHz\n {bandwidthUpBits}  {bandwidthDownBits}",
  95. "tooltip-format-ethernet": " {ifname}\nIP: {ipaddr}\n {bandwidthUpBits}  {bandwidthDownBits}"
  96. },
  97. "pulseaudio": {
  98. "scroll-step": 3, // %, can be a float
  99. "format": "{icon} {volume}% {format_source}",
  100. "format-bluetooth": "{volume}% {icon} {format_source}",
  101. "format-bluetooth-muted": " {icon} {format_source}",
  102. "format-muted": " {format_source}",
  103. //"format-source": "{volume}% ",
  104. //"format-source-muted": "",
  105. "format-source": "",
  106. "format-source-muted": "",
  107. "format-icons": {
  108. "headphone": "",
  109. "hands-free": "",
  110. "headset": "",
  111. "phone": "",
  112. "portable": "",
  113. "car": "",
  114. "default": ["", "", ""]
  115. },
  116. "on-click": "pavucontrol",
  117. "on-click-right": "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
  118. },
  119. "custom/pacman": {
  120. "format": "<big>􏆲</big> {}",
  121. "interval": 3600, // every hour
  122. "exec": "checkupdates | wc -l", // # of updates
  123. "exec-if": "exit 0", // always run; consider advanced run conditions
  124. "on-click": "kitty -e 'yay'; pkill -SIGRTMIN+8 waybar", // update system
  125. "signal": 8,
  126. "max-length": 5,
  127. "min-length": 3
  128. },
  129. "custom/weather": {
  130. "exec": "curl 'https://wttr.in/?format=1'",
  131. "interval": 3600
  132. },
  133. "custom/gpu": {
  134. "exec": "$HOME/.config/waybar/custom_modules/custom-gpu.sh",
  135. "return-type": "json",
  136. "format": "  {}",
  137. "interval": 2,
  138. "tooltip": "{tooltip}",
  139. "max-length": 19,
  140. "min-length": 19,
  141. "on-click": "powerupp"
  142. },
  143. "custom/cpugovernor": {
  144. "format": "{icon}",
  145. "interval": "30",
  146. "return-type": "json",
  147. "exec": "$HOME/.config/waybar/custom_modules/cpugovernor.sh",
  148. "min-length": 2,
  149. "max-length": 2,
  150. "format-icons": {
  151. "perf": "",
  152. "sched": ""
  153. },
  154. },
  155. "custom/media": {
  156. "format": "{icon} {}",
  157. "return-type": "json",
  158. "max-length": 40,
  159. "format-icons": {
  160. "spotify": "",
  161. "default": "🎜"
  162. },
  163. "escape": true,
  164. "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
  165. // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
  166. },
  167. "custom/scratchpad-indicator": {
  168. "interval": 3,
  169. "return-type": "json",
  170. "exec": "swaymsg -t get_tree | jq --unbuffered --compact-output '( select(.name == \"root\") | .nodes[] | select(.name == \"__i3\") | .nodes[] | select(.name == \"__i3_scratch\") | .focus) as $scratch_ids | [.. | (.nodes? + .floating_nodes?) // empty | .[] | select(.id |IN($scratch_ids[]))] as $scratch_nodes | { text: \"\\($scratch_nodes | length)\", tooltip: $scratch_nodes | map(\"\\(.app_id // .window_properties.class) (\\(.id)): \\(.name)\") | join(\"\\n\") }'",
  171. "format": "{} 􏠜",
  172. "on-click": "exec swaymsg 'scratchpad show'",
  173. "on-click-right": "exec swaymsg 'move scratchpad'"
  174. }
  175. }