{ config, pkgs, ... }: { imports = [ ./avizo.nix ]; stylix.targets.waybar.enable = false; systemd.user.targets.tray.Unit = { Description = "Home Manager System Tray"; Requires = [ "graphical-session.target" ]; }; home.packages = [ pkgs.playerctl ]; # For MPRIS to work programs.waybar = { enable = true; systemd.enable = true; settings.main = { name = "main"; layer = "top"; position = "left"; # Layout "modules-left" = [ "hyprland/workspaces" "mpris" ]; "modules-center" = [ ]; "modules-right" = [ "custom/notification" "pulseaudio#source" "pulseaudio#sink" "network" "bluetooth" "custom/calendar-icon" "clock#calendar" "custom/clock-icon" "clock" "backlight" "battery" "custom/weather" "systemd-failed-units" "tray" ]; # Module config "hyprland/workspaces" = { format = "{icon}"; format-icons = { "1" = "󰆍"; "2" = "󰖟"; "3" = "󱧶"; "4" = "󰢹"; "5" = "󰐫"; "6" = "󰊴"; "7" = "󰫃"; "8" = "󰫄"; "9" = "󰫅"; "10" = "󰫆"; "11" = "󰫇"; "12" = "󰫈"; default = "󰋙"; }; all-outputs = false; persistent-workspaces = { "1" = [ ]; "2" = [ ]; "3" = [ ]; "4" = [ ]; "5" = [ ]; "6" = [ ]; }; }; mpris = { "format" = "{player_icon}\n{status_icon}"; "tooltip-format" = "{player_icon} ({player}) {status_icon}\n{title}\n{album}\n{artist}"; "interval" = 1; "dynamic-order" = [ "album" "artist" "title" "position" "length" ]; "player-icons" = { "default" = "󰲸"; }; "status-icons" = { "playing" = "󰐊"; "paused" = "󰏤"; "stopped" = "󰓛"; }; "ignored-players" = [ "com" "firefox" ]; }; "pulseaudio#source" = { scroll-step = 5; format = "{format_source}"; format-source = "󰍬"; format-source-muted = "󰍭"; tooltip = true; tooltip-format = "{desc} ({volume}%)"; on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; on-click-right = "${config.services.avizo.package}/bin/volumectl %"; on-scroll-up = "${config.services.avizo.package}/bin/volumectl -u + 5"; on-scroll-down = "${config.services.avizo.package}/bin/volumectl -u - 5"; }; "pulseaudio#sink" = { scroll-step = 5; format = "{icon}"; format-icons = { car = "󰄍"; default = [ "󰕿" "󰖀" "󰕾" ]; default-muted = "󰝟"; hands-free = "󰥰"; headset = "󰋎"; phone = "󰏲"; portable = "󰏳"; headphone = "󰋋"; }; tooltip = true; tooltip-format = "{desc} ({volume}%)"; on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; on-click-right = "${config.services.avizo.package}/bin/volumectl %"; on-scroll-up = "${config.services.avizo.package}/bin/volumectl -u + 5"; on-scroll-down = "${config.services.avizo.package}/bin/volumectl -u - 5"; }; network = { format-icons = [ "󰤟" "󰤢" "󰤥" "󰤨" ]; format-wifi = "{icon}"; format-ethernet = "󰈁"; format-linked = "󰈂"; format-disconnected = "󰈂"; tooltip-format = "{essid} ({signalStrength}%)"; on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; }; bluetooth = { format = "󰂯"; format-disabled = "󰂲"; format-off = "󰂲"; format-on = "󰂯"; format-connected = "󰂱"; tooltip-format = "{status} | {device_alias}"; on-click = "${pkgs.blueman}/bin/blueman-manager"; }; "custom/calendar-icon" = { format = "󰃭"; tooltip = false; }; "clock#calendar" = let size = "${toString config.stylix.fonts.sizes.popups}pt"; in { format = "{:%d\n%m}"; tooltip-format = "{calendar}"; calendar = { mode = "month"; weeks-pos = "left"; on-scroll = 1; format = let inherit (config.lib.stylix) colors; in { months = "{}"; weeks = "W{}"; weekdays = "{}"; days = "{}"; today = "{}"; }; }; actions = { on-scroll-up = "shift_up"; on-scroll-down = "shift_down"; }; }; "custom/clock-icon" = { format = "󰅐"; tooltip = false; }; clock = { format = "{:%H\n%M}"; tooltip = false; }; backlight = { format = "{icon}"; tooltip-format = "{percent}%"; format-icons = [ "" "" "" "" "" "" "" "" "" ]; }; battery = { states = { warning = 20; critical = 10; }; format = "{icon}"; format-time = "{H}:{m}"; format-charging = "󰂄"; format-plugged = "󰚥"; tooltip-format = "{capacity}% | {power}W | {time}"; format-icons = [ "󱃍" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; }; "systemd-failed-units" = { hide-on-ok = true; format = "󰀦"; system = true; user = false; }; "custom/notification" = let makoctl = "${config.services.mako.package}/bin/makoctl"; jq = "${pkgs.jq}/bin/jq"; in { exec = "( ${makoctl} list | ${jq} -e '.data[] | length > 0' >/dev/null && echo '󱅫' ) || echo '󰂚' "; format = "{}"; tooltip = false; on-click = "${makoctl} dismiss -a"; interval = 3; }; "custom/weather" = let date-format = "%Y-%m-%d"; custom-indicator = "{ICON}"; # "{temp_C}°C({FeelsLikeC}°C)"; in { format = "{}"; tooltip = true; interval = 900; # Every 15 minutes exec = ''${pkgs.wttrbar}/bin/wttrbar --location Didcot --date-format "${date-format}" --custom-indicator "${custom-indicator}"''; return-type = "json"; }; tray = { icon-size = 20; show-passive-items = true; spacing = 5; }; }; style = let inherit (config.lib.stylix) colors; inherit (config.stylix) fonts opacity; in '' * { all: unset; font-family: ${fonts.monospace.name}; font-size: ${toString fonts.sizes.desktop}pt; } window { background: transparent; box-shadow: none; border: none; } window > box { color: ${colors.withHashtag.base05}; background: alpha(${colors.withHashtag.base00}, ${toString opacity.desktop}); margin: 5px 0px 5px 6px; padding: 2px; border: 1px solid ${colors.withHashtag.base04}; border-radius: 10px; } tooltip { background: ${colors.withHashtag.base00}; border: 2px solid ${colors.withHashtag.base0E}; border-radius: 10px; box-shadow: none; padding: 10px; } tooltip label { color: ${colors.withHashtag.base05}; border: none; padding: 5px; margin: 0px; } #workspaces { background: ${colors.withHashtag.base00}; border-radius: 5px; margin: 3px 2px; padding: 2px 3px; } #workspaces button.empty { color: ${colors.withHashtag.base03}; } #workspaces button.active { color: ${colors.withHashtag.base0E}; } #workspaces button.urgent { color: ${colors.withHashtag.base09}; } #mpris.paused { color: ${colors.withHashtag.base03}; } #custom-notification { color: ${colors.withHashtag.base08}; } #pulseaudio.source { color: ${colors.withHashtag.base09}; } #pulseaudio.sink { color: ${colors.withHashtag.base0A}; } #network { color: ${colors.withHashtag.base0B}; } #bluetooth { color: ${colors.withHashtag.base0C}; } #custom-calendar-icon, #clock.calendar { color: ${colors.withHashtag.base0D}; } #custom-clock-icon, #clock { color: ${colors.withHashtag.base0E}; } #backlight { color: ${colors.withHashtag.base0F}; } #battery.warning { color: ${colors.withHashtag.base09}; } #battery.critical { color: ${colors.withHashtag.base08}; } #battery.charging, #battery.plugged { color: ${colors.withHashtag.base0B}; } #systemd-failed-units.ok { color: ${colors.withHashtag.base0B} } #systemd-failed-units.degraded { color: ${colors.withHashtag.base08} } #custom-weather, #tray { padding: 2px 2px 2px 3px; } ''; }; }