1
0

waybar.nix 3.7 KB

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