aboutsummaryrefslogtreecommitdiff
path: root/share/home/waybar.nix
blob: 6f85d963d2b6e153ea44096e0ffbc0f8256a7de0 (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
{ lib, ... }: {
  programs.waybar = {
    enable = true;
    systemd = {
      enable = true;
      target = "hyprland-session.target";
    };
    settings.mainBar = {
      layer = "top";
      position = "right";
      width = 15;
      reload_style_on_change = true;

      modules-left = [ "hyprland/workspaces" ];
      modules-right = [
        "battery"
        "network"
        "cpu"
        "memory"
        "temperature"
        "backlight"
        "keyboard-state"
        "clock"
        "tray"
      ];

      battery = {
        format = lib.concatStringsSep "\n" [
          "{icon} {capacity}%"
          "󱐋 {power:4.1f} W"
        ];
        interval = 2;
        format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
      };

      keyboard-state = {
        numlock = true;
        capslock = true;
        format = "{name} {icon}";
        format-icons = {
          locked = "";
          unlocked = "";
        };
      };
    }; # end of settings.mainBar
    style = builtins.readFile ./waybar.css;
  };
}