{ lib, ... }: { programs.waybar = { systemd = { enable = true; target = "hyprland-session.target"; }; settings.mainBar = { layer = "top"; position = "right"; # width = 40; reload_style_on_change = true; modules-left = [ "hyprland/workspaces" ]; modules-right = [ "battery#capacity" "battery#power" "network" "cpu" "memory" "temperature" "backlight" "clock" "tray" ]; # TODO: fix clock format clock = { format = "{:%H:%M}"; }; "battery#capacity" = { format = lib.concatStringsSep "\n" [ "{icon}" "{capacity}%" ]; format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; }; "battery#power" = { format = lib.concatStringsSep "\n" [ "󱐋" "{power:4.1f}W" ]; interval = 1; }; # TODO: human readable bandwidth formatting # See: https://github.com/Alexays/Waybar/issues/2162 # network = { # format-ethernet = lib.concatStringsSep "\n" ["Eth" ""]; # }; keyboard-state = { numlock = true; capslock = true; format = "{name} {icon}"; format-icons = { locked = ""; unlocked = ""; }; }; }; # end of settings.mainBar style = builtins.readFile ./waybar.css; }; }