services.polybar.enable
Whether to enable Polybar status bar.
Type: boolean
Default:
false
Example:
true
Declared by:
services.polybar.package
The polybar package to use.
Type: package
Default:
pkgs.polybar
Example:
pkgs.polybar.override {
i3GapsSupport = true;
alsaSupport = true;
iwSupport = true;
githubSupport = true;
}
Declared by:
services.polybar.config
Polybar configuration. Can be either path to a file, or set of attributes
that will be used to create the final configuration.
See also services.polybar.settings for a more nix-friendly format.
Type: (attribute set of attribute set of (string or boolean or signed integer or list of string)) or absolute path convertible to it
Default:
{ }
Example:
{
"bar/top" = {
monitor = "\${env:MONITOR:eDP1}";
width = "100%";
height = "3%";
radius = 0;
modules-center = "date";
};
"module/date" = {
type = "internal/date";
internal = 5;
date = "%d.%m.%y";
time = "%H:%M";
label = "%time% %date%";
};
}
Declared by:
services.polybar.extraConfig
Additional configuration to add.
Type: strings concatenated with “\n”
Default:
""
Example:
''
[module/date]
type = internal/date
interval = 5
date = "%d.%m.%y"
time = %H:%M
format-prefix-foreground = \''${colors.foreground-alt}
label = %time% %date%
''
Declared by:
services.polybar.script
This script will be used to start the polybars.
Set all necessary environment variables here and start all bars.
It can be assumed that polybar executable is in the PATH.
Note, this script must start all bars in the background and then terminate.
Type: strings concatenated with “\n”
Example:
"polybar bar &"
Declared by:
services.polybar.settings
Polybar configuration. This takes a nix attrset and converts it to the
strange data format that polybar uses.
Each entry will be converted to a section in the output file.
Several things are treated specially: nested keys are converted
to dash-separated keys; the special text key is ignored as a nested key,
to allow mixing different levels of nesting; and lists are converted to
polybar’s foo-0, foo-1, ... format.
For example:
"module/volume" = {
type = "internal/pulseaudio";
format.volume = "<ramp-volume> <label-volume>";
label.muted.text = "🔇";
label.muted.foreground = "#666";
ramp.volume = ["🔈" "🔉" "🔊"];
click.right = "pavucontrol &";
}
becomes:
[module/volume]
type=internal/pulseaudio
format-volume=<ramp-volume> <label-volume>
label-muted=🔇
label-muted-foreground=#666
ramp-volume-0=🔈
ramp-volume-1=🔉
ramp-volume-2=🔊
click-right=pavucontrol &
Type: attribute set of attribute sets
Default:
{ }
Example:
{
"module/volume" = {
type = "internal/pulseaudio";
format.volume = "<ramp-volume> <label-volume>";
label.muted.text = "🔇";
label.muted.foreground = "#666";
ramp.volume = ["🔈" "🔉" "🔊"];
click.right = "pavucontrol &";
};
}
Declared by: