commit 78496e15f4b797e6b494b26be32a3d551051e392
parent ff95394825526d243875e6dd7078fc09d428a679
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Tue, 1 Jul 2025 19:45:07 +0200
parent ff95394825526d243875e6dd7078fc09d428a679
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Tue, 1 Jul 2025 19:45:07 +0200
config/home/zaphyra/services/waybar: update config
1 file changed, 136 insertions(+), 93 deletions(-)
M
|
229
+++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
diff --git a/config/home/zaphyra/services/waybar.nix b/config/home/zaphyra/services/waybar.nix @@ -1,4 +1,10 @@ -{ pkgs, ... }: +{ + config, + homeManagerModules, + pkgs, + lib, + ... +}: { @@ -9,81 +15,136 @@ } ]; - systemd.user.services.waybar.Service.Environment = "PATH=$PATH:${pkgs.iwd}/bin"; + imports = with homeManagerModules.zaphyra; [ + programs.networkManagerDmenu + ]; programs.waybar = { enable = true; systemd.enable = true; - package = pkgs.waybar.override { - hyprlandSupport = false; - }; - settings = [ { layer = "top"; position = "top"; - height = 40; + height = 32; modules-left = [ - "sway/workspaces" - "sway/mode" + "niri/workspaces" + "custom/arrow1" + ]; + modules-center = [ + "clock" + "custom/notification" ]; - modules-center = [ "clock" ]; modules-right = [ "tray" - "disk" - "memory" - "cpu" - "idle_inhibitor" - "network#wifi" + "custom/arrow2" + "network" + "wireplumber" "battery" - "pulseaudio" + "niri/language" ]; - "sway/workspaces" = { - disable-scroll = true; + "niri/workspaces" = { + format = "{index}: {value}"; }; - "sway/mode" = { - tooltip = false; - format = "<span style=\"italic\">{}</span>"; + "niri/language" = { + format = "{}"; + format-en = "US"; + format-de = "DE"; + format-ru = "RU"; }; clock = { - interval = 1; - format = "{:%H:%M:%S}"; - format-alt = "{:%Y-%m-%d}"; - tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; + on-click = "swaync-client -t -sw"; + on-click-right = lib.getExe pkgs.gnome-calendar; + format = "{:%d. %b %H:%M}"; + tooltip-format = "{:%x %T}"; + }; + + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = " "; + dnd-notification = " <span foreground='red'><sup></sup></span>"; + dnd-none = " "; + inhibited-notification = " "; + dnd-inhibited-notification = " <span foreground='red'><sup></sup></span>"; + dnd-inhibited-none = " "; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; }; tray = { tooltip = false; - # icon-size = 21; spacing = 10; }; - disk = { - format = " {}%"; - tooltip-format = "SSD: {used} / {total} used"; - }; + "network" = + let + format = [ + "<b>Interface:</b> {ifname}" + "<b>IP-Address:</b> {ipaddr}/{cidr}" + "<b>Gateway:</b> {gwaddr}" + ]; - memory = { - format = " {}%"; - tooltip-format = "RAM: {used:0.1f}G / {total:0.1f}G used"; - }; + in + { + interval = 5; + # family = "ipv4_6"; + + on-click = lib.getExe pkgs.networkmanager_dmenu; + + tooltip-format = lib.concatStringsSep "\n" format; + tooltip-format-wifi = lib.concatStringsSep "\n" ( + format + ++ [ + "" + "<b>Signal strength:</b> {signalStrength}% {signaldBm}dBm" + "<b>Frequency:</b> {frequency}Ghz" + ] + ); + + format-ethernet = " "; + format-wifi = " {essid} ({signalStrength}%)"; + format-linked = " "; + format-disconnected = " "; + }; - cpu = { - format = " {usage}%"; - tooltip = false; + wireplumber = { + max-volume = 150; + scroll-step = 1; + + on-click = lib.concatStringsSep " " [ + config.home.sessionVariables.TERMINAL + "-e" + (lib.getExe pkgs.ncpamixer) + ]; + + format = "{icon} {volume}%"; + format-muted = ""; + format-icons = [ + "" + " " + " " + ]; }; battery = { - bat = "BAT0"; - adapter = "AC"; + on-click = lib.getExe pkgs.gnome-power-manager; + interval = 10; full-at = 99; + states = { full = 100; good = 99; @@ -91,61 +152,28 @@ critical = 15; }; - format = "{icon} <span color='white'>{capacity}%</span>"; - format-charging = " <span color='white'>{capacity}%</span>"; - format-plugged = " <span color='white'>{capacity}%</span>"; - format-empty = ""; - format-full = ""; + # Connected to AC + format = " <span color='white'>{capacity}%</span>"; + # Not connected to AC + format-discharging = "{icon} <span color='white'>{capacity}%</span>"; format-icons = [ - "" - "" - "" - "" - "" + " " + " " + " " + " " + " " ]; + tooltip-format = "{power} W, {timeTo}"; }; - "network#wifi" = { - interface = "wlan0*"; - tooltip-format = "{ifname}: {ipaddr}/{cidr}"; - - on-click = "${pkgs.rofi-wayland}/bin/rofi -show wifi -modi 'wifi:${pkgs.rofi-iwd-wifi-menu}/bin/iwdrofimenu'"; - - format-ethernet = ""; - format-wifi = " {essid} ({signalStrength}%)"; - format-linked = ""; - format-disconnected = ""; - }; - - pulseaudio = { - scroll-step = 1; - on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; - - format = "{format_source} {icon} {volume}%"; - format-bluetooth = "{format_source} {icon} {volume}%"; - format-bluetooth-muted = "{format_source} "; - format-muted = "{format_source} "; - format-source = ""; - format-source-muted = ""; - format-icons = { - headphone = ""; - phone = ""; - portable = ""; - car = ""; - default = [ - "" - "" - "" - ]; - }; + "custom/arrow1" = { + format = ""; + tooltip = false; }; - idle_inhibitor = { - format = "{icon}"; - format-icons = { - activated = ""; - deactivated = ""; - }; + "custom/arrow2" = { + format = ""; + tooltip = false; }; } ]; @@ -159,8 +187,8 @@ } * { - font-family: 'Noto Sans'; - font-size: 15px; + font-family: "Adwaita Sans", "Symbols Nerd Font"; + font-size: 14px; border: none; border-radius: 0; min-height: 0; @@ -175,11 +203,13 @@ border-bottom: 2px solid rgba(59, 135, 86, 0.5); } + #workspaces { + background: rgba(255, 255, 255, 0.06); + } #workspaces button.focused { background: rgba(255, 255, 255, 0.1); - border-bottom: 3px solid rgb(74, 169, 108); + border-bottom: 2px solid rgb(74, 169, 108); } - #workspaces button:hover { background: rgba(255, 255, 255, 0.06); } @@ -187,9 +217,15 @@ #clock { font-size: 16px; font-family: 'Noto Mono', monospace; + padding: 0px 5px; + } + + #tray { + padding: 0px 15px; } - #disk, #memory, #cpu, #idle_inhibitor, #battery, #pulseaudio, #network { + #network, #wireplumber, #battery, #language { + background: rgba(255, 255, 255, 0.06); padding: 0px 15px; } @@ -214,6 +250,13 @@ animation-iteration-count: infinite; animation-direction: alternate; } + + + #custom-arrow1, #custom-arrow2 { + font-size: 20pt; + color: rgba(255, 255, 255, 0.06); + } + ''; };