{ lib, pkgs, ... }: { programs.waybar = { enable = true; systemd.enable = true; style = ./waybar-style.css; settings.main = { layer = "top"; position = "bottom"; height = 28; modules-left = [ "hyprland/workspaces" "tray" "hyprland/submap" "privacy" #"custom/whisper_overlay" ]; modules-center = [ "hyprland/window" ]; modules-right = [ "custom/scan_qr" "custom/pick_color" "custom/cycle_wallpaper" #"custom/screencast" #"custom/gpuscreenrecorder" #SPACER #"brightness" "pulseaudio#source" "wireplumber" "network" "bluetooth" #"temperature" "cpu" "memory" "battery" "custom/notification" "clock" ]; "custom/scan_qr" = { tooltip = true; tooltip-format = "Scan QR Code"; format = "󰐲"; on-click = lib.getExe pkgs.scripts.screenshot-area-scan-qr; }; "custom/pick_color" = { tooltip = true; tooltip-format = "Pick color"; format = ""; on-click = "${lib.getExe pkgs.hyprpicker} --autocopy"; }; # # "custom/cycle_wallpaper" = { # format = " "; # tooltip = true; # tooltip-format = "Change wallpaper"; # on-click = "systemctl --user start swww-update-wallpaper"; # }; "custom/notification" = { tooltip = false; format = "{icon} {}"; format-icons = { notification = ""; none = ""; dnd-notification = ""; dnd-none = ""; inhibited-notification = ""; inhibited-none = ""; dnd-inhibited-notification = ""; dnd-inhibited-none = ""; }; return-type = "json"; exec = "${pkgs.swaynotificationcenter}/bin/swaync-client -swb"; on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"; on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw"; on-click-middle = "${pkgs.swaynotificationcenter}/bin/swaync-client --close-all"; escape = true; }; battery = { interval = 2; format = "{icon} {capacity}%"; format-icons = [ "" "" "" "" "" "" "" "" "" ]; states = { warning = 25; critical = 15; }; }; privacy = { icon-spacing = 4; icon-size = 18; 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; } ]; }; wireplumber = { format = "{icon} {volume}%"; format-muted = " {volume}%"; format-icons = [ "" "" ]; on-click = "${pkgs.hyprland}/bin/hyprctl dispatch exec \"[float;pin;move 80% 50%;size 20% 50%;noborder]\" ${lib.getExe pkgs.pwvucontrol}"; on-click-middle = "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 100%"; on-click-right = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }; "pulseaudio#source" = { format = "{format_source}"; format-source = " {volume}%"; format-source-muted = " {volume}%"; on-click = "${pkgs.hyprland}/bin/hyprctl dispatch exec \"[float]\" ${lib.getExe pkgs.helvum}"; on-click-middle = "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 100%"; on-click-right = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; on-scroll-up = "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 1%+"; on-scroll-down = "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 1%-"; }; "hyprland/workspaces" = { format = "{icon}"; format-icons.urgent = ""; all-outputs = false; sort-by = "id"; }; clock = { interval = 10; format = "{:%H:%M:%S}"; format-alt = "{:%A, %B %d, %Y (%R)}"; tooltip-format = "{calendar}"; calendar = { mode = "year"; mode-mon-col = 4; weeks-pos = "right"; on-scroll = 1; on-click-right = "mode"; format = { months = "{}"; days = "{}"; weeks = "W{}"; weekdays = "{}"; today = "{}"; }; actions = { on-click-right = "mode"; on-click-forward = "tz_up"; on-click-backward = "tz_down"; on-scroll-up = "shift_up"; on-scroll-down = "shift_down"; }; }; }; network = { interval = 5; format-ethernet = "󰈀 {ipaddr}/{cidr} ↓ {bandwidthDownBytes} ↑ {bandwidthUpBytes}"; format-wifi = " {signalStrength}% {essid} {ipaddr}/{cidr} ↓ {bandwidthDownBytes} ↑ {bandwidthUpBytes}"; format-disconnected = "⚠ Disconnected"; tooltip-format = "↑ {bandwidthUpBytes}\n↓ {bandwidthDownBytes}"; }; bluetooth = { format = "  {status} "; format-connected = " {device_alias}"; format-connected-battery = " {device_alias} {device_battery_percentage}%"; tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected"; tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}"; tooltip-format-enumerate-connected = "{device_alias}\t{device_address}"; tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%"; }; memory = { interval = 5; format = " {percentage}%"; states = { warning = 70; critical = 90; }; }; cpu = { interval = 5; format = " {usage}%"; tooltip-format = "{usage}"; }; tray = { icon-size = 21; spacing = 10; }; }; }; systemd.user.services.waybar = { Unit.After = [ "graphical-session.target" ]; Service.Slice = [ "app-graphical.slice" ]; }; }