{ config, pkgs, lib, inputs, ... }:
{  
  programs.waybar = {
    enable = true;
    systemd.enable = false;
    settings = {
      mainBar = {
        layer = "top";
        position = "top";
        height = 30;
        output = [
          "eDP-2"
          "DP-2"
          "DP-3"
        ];
        modules-left = [ "wlr/taskbar" ];
        modules-center = [ "clock" "custom/swaync" ];
        modules-right = [ "pulseaudio/slider" "backlight" "battery" "tray" ];
        "clock" = {
          "format" = "{:%A %d %b %T}";
#          "tooltip" = true;
#          "tooltip-format" = "{=%A; %d %B %Y}\n<tt>{calendar}</tt>";
          "interval" = 1;
        };
        "custom/swaync" = {
          "tooltip" = false;
          "format"= "{icon} {}";
          "format-icons" = {
            "notification" = "🔔<span foreground='red'><sup>🔔</sup></span>";
            "none" = "🔔";
            "dnd-notification" = "🔔<span foreground='red'><sup>🔔</sup></span>";
            "dnd-none" = "🔔";
            "inhibited-notification" = "🔔<span foreground='red'><sup>🔔</sup></span>";
            "inhibited-none" = "🔔";
            "dnd-inhibited-notification" = "🔔<span foreground='red'><sup>🔔</sup></span>";
            "dnd-inhibited-none" = "🔔";
          };
          "return-type" = "json";
          "exec-if" = "which swaync-client";
          "exec" = "swaync-client -swb";
          "on-click" = "swaync-client -t -sw";
          "on-click-right" = "swaync-client -d -sw";
          "escape" = true;
        };
      };
    };
    style = ''
      .module {
        margin: 0px 10px 0px 10px;
      }
      #pulseaudio-slider trough {
        min-height: 10px;
        min-width: 80px;
        border-radius: 5px;
        background-color: transparent;
      }
      #pulseaudio-slider highlight {
        min-width: 80px;
        border-radius: 5px;
      }
    '';
  };
}