feat(waybar): add pulseaudio module

This commit is contained in:
Mohammad Rafiq 2025-06-02 21:58:15 +08:00
parent 7e751fa190
commit cd426df883
No known key found for this signature in database

View file

@ -1,4 +1,5 @@
{ {
pkgs,
config, config,
lib, lib,
osConfig, osConfig,
@ -13,10 +14,22 @@
settings = [ settings = [
{ {
layer = "top"; layer = "top";
modules-left = [
"pulseaudio"
];
modules-right = [ modules-right = [
"battery" "battery"
"clock" "clock"
]; ];
"pulseaudio" = {
format = "{icon} {volume}%";
format-muted = "";
format-icons.default = [
""
""
];
on-click = "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
};
"clock" = { "clock" = {
interval = 1; interval = 1;
format = "{:%F %T}"; format = "{:%F %T}";
@ -33,6 +46,7 @@
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
#pulseaudio,
#battery, #battery,
#clock { #clock {
padding-top: 5px; padding-top: 5px;