summaryrefslogtreecommitdiff
path: root/modules/home-manager/waybar.nix
blob: d6619cb4e2a85fcf52c683aaa0482e3cb5982a29 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{ config, ... }: {
  programs.waybar = {
    enable = true;
    systemd.enable = true;
    systemd.target = "hyprland-session.target";
    settings = {
      mainBar = {
        layer = "top";
        position = "top";
        height = 40;
        modules-left = [ "tray" "hyprland/workspaces" ];
        modules-center = [ "clock" ];
        modules-right = [ "wireplumber" "bluetooth" "network" "backlight/slider" "battery" "temperature" "memory" "keyboard_state" ];

        "tray" = {
          icon-size = 21;
          spacing = 10;
        };
        "wireplumber" = {
          format = "{volume}% {icon}";
          format-muted = "";
          on-click = "helvum";
          format-icons = [ "" "" "" ];
          max-volume = 150;
          scroll-step = 0.2;
        };
        "backlight/slider" =  {
          min = 1;
          max = 100;
          orientation = "horizontal";
          # device = "intel_backlight";
        };
        "clock" = {
          format = "{:%H:%M}  ";
          format-alt = "{:%A, %B %d, %Y (%R)}  ";
          # timezone = config.time.timeZone;
          timezone = "US/Mountain";
          tooltip-format = "<tt><small>{calendar}</small></tt>";
        "calendar" = {
          mode = "year";
          mode-mon-col = 3;
          weeks-pos = "right";
          on-scroll = 1;
          on-right-click = "mode";
          "format" = {
            months =     "<span color='#ffead3'><b>{}</b></span>";
            days =       "<span color='#ecc6d9'><b>{}</b></span>";
            weeks =      "<span color='#99ffdd'><b>W{}</b></span>";
            weekdays =   "<span color='#ffcc66'><b>{}</b></span>";
            today =      "<span color='#ff6699'><b><u>{}</u></b></span>";
          };
        };
        };
        "battery" = {
          interval = 60;
          states = {
              "warning" = 30;
              "critical" = 15;
          };
          format = "{capacity}% {icon}";
          format-icons = [ "" "" "" "" "" ];
          max-length = 25;
        };
        "memory" = {
          format = "{used:0.1f}G/{total:0.1f}G ";
        };
        "temperature" = {
          format = "{temperatureC}°C ";
        };
        "keyboard-state" = {
          numlock = true;
          capslock = true;
          "format" = {
              numlock = "N {icon}";
              # capslock =  "C {icon}";                                                                                                                                                       
          };
          "format-icons" = {
              locked =  "";
              unlocked =  "";
          };
        };
      };
    };
  };
  
}