waybar.nix 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. { pkgs, lib, ... }:
  2. {
  3. programs.waybar = {
  4. enable = true;
  5. settings = {
  6. main = {
  7. layer = "top";
  8. position = "bottom";
  9. height = 32;
  10. spacing = 2;
  11. modules-left = [
  12. "sway/workspaces"
  13. "mpris"
  14. ];
  15. modules-center = [
  16. "clock"
  17. ];
  18. modules-right = [
  19. "pulseaudio"
  20. "network"
  21. "battery"
  22. "tray"
  23. ];
  24. clock = {
  25. format = "󰥔 {:%H:%M}";
  26. tooltip = false;
  27. };
  28. battery = {
  29. format = "{icon} {capacity}%";
  30. format-icons = [
  31. "󰁺"
  32. "󰁻"
  33. "󰁼"
  34. "󰁽"
  35. "󰁾"
  36. "󰁿"
  37. "󰂀"
  38. "󰂁"
  39. "󰂂"
  40. "󰁹"
  41. ];
  42. };
  43. network = {
  44. format-wifi = "";
  45. format-ethernet = "";
  46. tooltip-format = "{essid}";
  47. };
  48. pulseaudio = {
  49. format = "{icon} {volume}%";
  50. format-icons = {
  51. default = [
  52. "󰕿"
  53. "󰖀"
  54. "󰕾"
  55. ];
  56. };
  57. };
  58. mpris = {
  59. format = "{artist} - {title}";
  60. format-paused = "{artist} - {title}";
  61. max-length = 25;
  62. };
  63. };
  64. };
  65. style = ''
  66. * {
  67. border: none;
  68. font-family: "Roboto", "Material Symbols Rounded";
  69. font-size: 14px;
  70. min-height: 0;
  71. }
  72. window#waybar {
  73. background: rgb(26,28,23);
  74. margin-top: 8px;
  75. border-radius: 0px;
  76. }
  77. /* Shared module styling */
  78. #clock,
  79. #battery,
  80. #network,
  81. #pulseaudio,
  82. #tray,
  83. #mpris,
  84. #workspaces {
  85. background: rgb(35,39,29);
  86. color: #e6e1e5;
  87. font-weight: 600;
  88. min-width: 12px;
  89. min-height: 12px;
  90. padding: 0 6px;
  91. margin: 2px 2px;
  92. border-radius: 10px;
  93. border: 1px solid rgba(255,255,255,0.08);
  94. }
  95. #workspaces {
  96. padding: 0;
  97. }
  98. #workspaces button label {
  99. padding: 0;
  100. margin: 0;
  101. }
  102. #workspaces button {
  103. color: #c4c7c5;
  104. padding: 0 10px;
  105. border-radius: 10px;
  106. transition: all 0.2s ease;
  107. }
  108. #workspaces button.active,
  109. #workspaces button.focused {
  110. background: rgba(103, 80, 164, 0.4);
  111. color: white;
  112. }
  113. #workspaces button:hover {
  114. background: rgba(255,255,255,0.08);
  115. }
  116. #mpris.playing {
  117. background: rgba(139, 188, 255, 0.2);
  118. }
  119. #mpris.spotify.playing {
  120. background: rgba(29,185,84,0.2);
  121. }
  122. #mpris.firefox.playing {
  123. background: rgba(255,102,42,0.2);
  124. }
  125. #battery {
  126. }
  127. #network {
  128. }
  129. #pulseaudio {
  130. }
  131. #clock {
  132. }
  133. '';
  134. };
  135. }