summaryrefslogtreecommitdiff
path: root/modules/home-manager/hypr/waybar-hyprland.nix
blob: 3969f7d57196cf551bfab565c02398e252ae0248 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{ config, lib, ... }:

{
  programs.waybar = {
    enable = true;

    settings = {
      mainBar = {
        layer = "top";
        position = "top";
        height = 15;
        
        modules-left = [ "hyprland/workspaces" ];
        modules-center = [ "hyprland/window" ];
        modules-right = [ "pulseaudio" "battery" "clock" ];

        "battery" =  {
          "bat" = "BAT2";
          "interval" = 60;
          "states" = {
            "warning" = 30;
            "critical" = 15;
          };
          "format" = "{capacity}% {icon}";
          "format-icons" = ["" "" "" "" ""];
          "max-length" = 25;
        };

        "hyprland/window" = {
          on-click = "rofi -show window";
        };

        "pulseaudio" = {
          format = "{volume}% {icon}";
          format-bluetooth = "{volume}% {icon}";
          format-muted = "";
          format-icons = {
            default = ["" ""];
          };
        };
      };
    };

    style = ''
      *{
        border: none;
        border-radius: 0;
        font-family: "JetBrains Mono"
      }

      window#waybar {
        background: #141617;
        color: #D4BE98;
      }

      label.module { 
        padding: 0 10px;
      }

      #workspaces button {
        color: #D4BE98;
      }
    '';
  };
}