default.nix 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. "sway/mode"
  17. "mpris"
  18. ];
  19. modules-center = [
  20. "custom/clock"
  21. ];
  22. modules-right = [
  23. "tray"
  24. "custom/cap-left"
  25. "pulseaudio"
  26. "bluetooth"
  27. "network"
  28. "battery"
  29. "custom/cap-right"
  30. ];
  31. "sway/mode" = {
  32. format = "transform";
  33. };
  34. "custom/clock" = {
  35. format = "{}";
  36. exec = "~/.config/waybar/clock.sh";
  37. return-type = "json";
  38. restart-interval = 1;
  39. };
  40. tray = {
  41. spacing = 8;
  42. };
  43. battery = {
  44. format = "{icon}";
  45. tooltip-format = "{capacity}%";
  46. format-icons = {
  47. default = [
  48. "battery_android_0"
  49. "battery_android_1"
  50. "battery_android_2"
  51. "battery_android_3"
  52. "battery_android_4"
  53. "battery_android_5"
  54. "battery_android_6"
  55. "battery_android_full"
  56. ];
  57. charging = [
  58. "battery_charging_full_2"
  59. "battery_charging_20_2"
  60. "battery_charging_30_2"
  61. "battery_charging_50_2"
  62. "battery_charging_60_2"
  63. "battery_charging_80_2"
  64. ];
  65. };
  66. };
  67. network = {
  68. format-wifi = "{icon}";
  69. format-icons = [
  70. "network_wifi_0_bar"
  71. "network_wifi_1_bar"
  72. "network_wifi_2_bar"
  73. "network_wifi_3_bar"
  74. "network_wifi"
  75. "network_wifi_4_bar"
  76. ];
  77. format-ethernet = "lan";
  78. format-disconnected = "signal_wifi_off";
  79. format-disabled = "signal_wifi_off";
  80. tooltip-format = "{essid}\n{ipaddr}";
  81. };
  82. pulseaudio = {
  83. format = "{icon}";
  84. tooltip-format = "{volume}%";
  85. format-icons = {
  86. default = [
  87. "󰕿"
  88. "󰖀"
  89. "󰕾"
  90. ];
  91. };
  92. };
  93. mpris = {
  94. format = "{artist} - {title}";
  95. format-paused = "{artist} - {title}";
  96. max-length = 25;
  97. };
  98. bluetooth = {
  99. format = "{icon}";
  100. format-on = "bluetooth";
  101. format-off = "bluetooth_disabled";
  102. format-disabled = "bluetooth_disabled";
  103. format-connected = "bluetooth_connected";
  104. tooltip-format-connected = "{device_enumerate}";
  105. tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
  106. };
  107. "custom/cap-left" = {
  108. format = " ";
  109. tooltip = false;
  110. };
  111. "custom/cap-right" = {
  112. format = " ";
  113. tooltip = false;
  114. };
  115. };
  116. };
  117. };
  118. }