feat(desktop): move status-bar config to homes and use home-manager modules

This commit is contained in:
Mohammad Rafiq 2025-06-14 15:30:42 +08:00
parent d09d6d37d7
commit 2369c0d37e
No known key found for this signature in database
7 changed files with 75 additions and 64 deletions

View file

@ -0,0 +1,50 @@
{ pkgs, ... }:
{
home.sessionVariables.STATUS_BAR = "waybar";
programs.waybar = {
settings = [
{
layer = "top";
modules-left = [
"pulseaudio"
];
modules-right = [
"battery"
"clock"
];
"pulseaudio" = {
format = "{icon} {volume}%";
format-muted = "";
format-icons.default = [
""
""
];
on-click = "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
};
"clock" = {
interval = 1;
format = "{:%F %T}";
};
"battery" = {
interval = 1;
bat-compatibility = true;
};
}
];
style = # css
''
window#waybar {
background-color: rgba(0, 0, 0, 0);
}
#pulseaudio,
#battery,
#clock {
padding-top: 5px;
padding-bottom: 5px;
padding-right: 5px;
color: #ffffff;
}
'';
};
}