{ config, lib, pkgs, ... }: { programs.waybar.settings.main = { layer = "top"; position = "top"; spacing = "4"; # List of modules modules-left = [ "custom/nixicon" "hyprland/workspaces" "hyprland/window" ]; modules-center = [ "clock" "privacy" ]; modules-right = [ "network" "wireplumber" "cpu" "memory" "disk" "temperature" "backlight" "battery" "custom/dunst" "tray" "custom/power" ]; # Modules configuration # Modules left: "custom/nixicon" = { format = ""; tooltip = false; }; "hyprland/workspaces" = { active-only = false; hide-active = false; sort-by = "number"; disable-scroll = true; all-outputs = true; warp-on-scroll = false; format = "{id}"; }; "hyprland/window" = { format = "{title}"; max-length = 70; # Increase if you got a bigger display icon = true; icon-size = 20; }; # Modules center: clock = { interval = "1"; format = "  {:%H:%M:%S %d %b} "; format-alt = "  {:%A, %B %d, %Y %R} "; timezone = "Europe/Warsaw"; tooltip-format = "{calendar}"; calendar = { mode = "month"; mode-mon-col = 3; weeks-pos = "right"; on-scroll = 1; format = { months = "{}"; days = "{}"; weeks = "W{}"; weekdays = "{}"; today = "{}"; }; }; actions = { on-click-right = "mode"; on-scroll-up = "shift_up"; on-scroll-down = "shift_down"; }; }; privacy = { icon-spacing = 4; icon-size = 18; expand = true; transition-duration = 250; modules = [ { type = "screenshare"; tooltip = true; tooltip-icon-size = 24; } { type = "audio-out"; tooltip = true; tooltip-icon-size = 24; } { type = "audio-in"; tooltip = true; tooltip-icon-size = 24; } ]; }; # Modules right: network = { interval = 10; format-wifi = " "; format-ethernet = ""; tooltip = true; tooltip-format = "{essid}"; format-linked = "(No IP) "; format-disconnected = "Disconnected ⚠"; on-click = "nm-connection-editor"; }; wireplumber = { format = "{volume}% {icon}"; format-muted = ""; on-click = "pwvucontrol"; format-icons = ["" "" ""]; }; "wireplumber#source" = { node-type = "Audio/Source"; format = "{volume}% 󰍬"; format-muted = "󰍭"; on-click = "pwvucontrol"; scroll-step = 5; }; cpu = { interval = 5; format = "{usage}% "; tooltip = true; on-click = "kitty btop"; }; memory = { interval = 5; format = "{used}GB/{avail}GB "; on-click = "kitty btop"; }; disk = { interval = 10; format = "󱛟 {percentage_used}%"; path = "/"; }; temperature = { interval = 5; thermal-zone = 2; hwon-path = "/sys/class/hwmon2/temp1_input"; critical-threshold = 80; format = "{temperatureC}°C {icon}"; format-critical = "{temperatureC}°C {icon}"; format-icons = ["" "" ""]; }; backlight = { interval = 5; device = "acpi_video1"; format = "{percent}% {icon}"; format-icons = ["" "" "" "" "" "" "" "" ""]; }; battery = { interval = 1; format = "{capacity}% {icon}"; format-full = "{capacity}% {icon}"; format-charging = "{capacity}% "; format-plugged = "{capacity}% "; format-alt = "{time} {icon}"; format-icons = ["" "" "" "" ""]; }; # Credits to GGORG0 on Github for the dunst module "custom/dunst" = { exec = lib.getExe' (pkgs.writeShellScriptBin "dunst" '' set -euo pipefail ENABLED="" DISABLED="" DISABLED_UNREAD="" ${lib.getExe' pkgs.dbus "dbus-monitor"} path='/org/freedesktop/Notifications',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged' --profile | while read -r _; do PAUSED="$(${lib.getExe' pkgs.dunst "dunstctl"} is-paused)" if [ "$PAUSED" == 'false' ]; then TEXT="$ENABLED" else TEXT="$DISABLED" COUNT="$(${lib.getExe' pkgs.dunst "dunstctl"} count waiting)" if [ "$COUNT" != '0' ]; then TEXT="$COUNT $DISABLED_UNREAD" fi fi printf '{"text": "%s"}\n' "$TEXT" done '') "dunst"; return-type = "json"; on-click = "${lib.getExe' pkgs.dunst "dunstctl"} set-paused toggle"; }; tray = { icon-size = 15; spacing = 10; show-passive-items = true; }; "custom/power" = { format = "⏻"; tooltip = false; on-click = "sh $HOME/.config/hypr/power.sh"; }; }; }