From 974a066374027441e237607ab73d6fc14cc510cd Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 9 Apr 2024 20:30:09 -0400 Subject: [PATCH] waybar: added suspend inhibitor and logout button --- homeManagerModules/guiApps/waybar/default.nix | 35 +++++++++++++++++-- homeManagerModules/guiApps/waybar/waybar.css | 5 ++- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/homeManagerModules/guiApps/waybar/default.nix b/homeManagerModules/guiApps/waybar/default.nix index 7ab72577..489fb18b 100644 --- a/homeManagerModules/guiApps/waybar/default.nix +++ b/homeManagerModules/guiApps/waybar/default.nix @@ -31,8 +31,11 @@ "bluetooth" "network" "pulseaudio" + # "wireplumber" "battery" + "inhibitor" "power-profiles-daemon" + "custom/logout" "clock" ]; @@ -45,9 +48,12 @@ }; "persistent-workspaces" = {"*" = 4;}; }; - "hyprland/window" = {"max-length" = 100;}; + "hyprland/window" = { + "max-length" = 100; + "separate-outputs" = true; + }; "clock" = { - "tooltip-format" = "{:%Y-%m-%d | %H:%M}"; + # "tooltip-format" = "{:%Y-%m-%d | %H:%M}"; "interval" = 60; "format" = "{:%I:%M%p}"; }; @@ -59,6 +65,14 @@ {capacity}%: {timeTo}. Using {power} watts.''; }; + "inhibitor" = { + "what" = "sleep"; + "format" = "{icon}"; + "format-icons" = { + "activated" = ""; + "deactivated" = ""; + }; + }; "bluetooth" = { "format" = "󰂯 {status}"; "format-disabled" = ""; # an empty format will hide the module @@ -74,7 +88,7 @@ "pulseaudio" = { "format" = " {volume}%"; "format-bluetooth" = "{volume}% {icon}󰂯"; - "format-muted" = ""; + "format-muted" = ""; "format-icons" = { "headphones" = "󰋋"; "handsfree" = "󰋎"; @@ -83,6 +97,17 @@ "ignored-sinks" = ["Easy Effects Sink"]; "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol -t 3"; }; + "wireplumber" = { + "format" = " {volume}%"; + "format-bluetooth" = "{volume}% {icon}󰂯"; + "format-muted" = ""; + "format-icons" = { + "headphones" = "󰋋"; + "handsfree" = "󰋎"; + "headset" = "󰋎"; + }; + "on-click" = "helvum"; + }; "network" = { "format-wifi" = "󰣾 {signalStrength}%"; "format-ethernet" = "󰈀"; @@ -94,6 +119,10 @@ "on-click" = "${pkgs.alacritty}/bin/alacritty --class nmtui -e ${pkgs.networkmanager}/bin/nmtui"; }; "tray" = {"spacing" = 10;}; + "custom/logout" = { + "on-click" = "${pkgs.wlogout}/bin/wlogout"; + "format" = "󰗽"; + }; "power-profiles-daemon" = { "format" = "{icon}"; "tooltip-format" = '' diff --git a/homeManagerModules/guiApps/waybar/waybar.css b/homeManagerModules/guiApps/waybar/waybar.css index 509985b9..2326e21f 100644 --- a/homeManagerModules/guiApps/waybar/waybar.css +++ b/homeManagerModules/guiApps/waybar/waybar.css @@ -27,8 +27,11 @@ window#waybar { #network, #power-profiles-daemon, #pulseaudio, +#wireplumber, +#inhibitor, +#custom-logout, #tray { - padding: 0 10px; + padding: 0 7.5px; margin: 0 5px; }