1
0

default.nix 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. { pkgs, lib, ... }:
  2. {
  3. imports = [
  4. ./style.nix
  5. ];
  6. programs.waybar = {
  7. enable = true;
  8. settings = {
  9. main = {
  10. layer = "top";
  11. position = "bottom";
  12. height = 16;
  13. spacing = 0;
  14. modules-left = [
  15. "sway/workspaces"
  16. "mpris"
  17. ];
  18. modules-center = [
  19. "custom/clock"
  20. ];
  21. modules-right = [
  22. "tray"
  23. "custom/cap-left"
  24. "pulseaudio"
  25. "bluetooth"
  26. "network"
  27. "battery"
  28. "custom/cap-right"
  29. ];
  30. "custom/clock" = {
  31. format = "{}";
  32. exec = "~/.config/waybar/clock.sh";
  33. return-type = "json";
  34. restart-interval = 1;
  35. };
  36. tray = {
  37. spacing = 8;
  38. };
  39. battery = {
  40. format = "{icon}";
  41. tooltip-format = "{capacity}%";
  42. format-icons = [
  43. "󰁺"
  44. "󰁻"
  45. "󰁼"
  46. "󰁽"
  47. "󰁾"
  48. "󰁿"
  49. "󰂀"
  50. "󰂁"
  51. "󰂂"
  52. "󰁹"
  53. ];
  54. };
  55. network = {
  56. format-wifi = "{icon}";
  57. format-icons = [
  58. "󰤯"
  59. "󰤟"
  60. "󰤢"
  61. "󰤥"
  62. "󰤨"
  63. ];
  64. format-ethernet = "󰈀";
  65. format-disconnected = "󰖪";
  66. tooltip-format = "{essid}\n{ipaddr}";
  67. };
  68. pulseaudio = {
  69. format = "{icon}";
  70. tooltip-format = "{volume}%";
  71. format-icons = {
  72. default = [
  73. "󰕿"
  74. "󰖀"
  75. "󰕾"
  76. ];
  77. };
  78. };
  79. mpris = {
  80. format = "{artist} - {title}";
  81. format-paused = "{artist} - {title}";
  82. max-length = 25;
  83. };
  84. bluetooth = {
  85. format-on = "󰂯";
  86. format-off = "󰂲";
  87. format-disabled = "";
  88. format-connected = "󰂱 {num_connections}";
  89. tooltip-format-connected = "{device_enumerate}";
  90. tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
  91. };
  92. "custom/cap-left" = {
  93. format = " ";
  94. tooltip = false;
  95. };
  96. "custom/cap-right" = {
  97. format = " ";
  98. tooltip = false;
  99. };
  100. };
  101. };
  102. };
  103. }