configuration.nix/home/gui/waybar-settings.nix

125 lines
2.8 KiB
Nix
Raw Normal View History

{ config, lib }:
let
2024-05-04 20:57:33 +02:00
cfg = config.jhome.gui;
in
{
2024-05-17 18:50:01 +02:00
mainBar = {
layer = "top";
position = "top";
margin = "2 2 2 2";
# Choose the order of the modules
modules-left = [ "sway/workspaces" ];
modules-center = [ "clock" ];
modules-right = [
"pulseaudio"
"backlight"
"battery"
"sway/language"
"memory"
] ++ lib.optional (cfg.tempInfo != null) "temperature" ++ [ "tray" ];
2024-05-17 18:50:01 +02:00
"sway/workspaces" = {
disable-scroll = true;
persistent-workspaces = {
"1" = [ ];
"2" = [ ];
"3" = [ ];
"4" = [ ];
"5" = [ ];
"6" = [ ];
"7" = [ ];
"8" = [ ];
"9" = [ ];
2024-05-17 18:50:01 +02:00
};
};
"sway/language" = {
format = "{} ";
min-length = 5;
tooltip = false;
};
memory = {
format = "{used:0.1f}/{total:0.1f}GiB ";
interval = 3;
};
clock = {
timezone = "Europe/Berlin";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format = "{:%a, %d %b, %H:%M}";
};
pulseaudio = {
reverse-scrolling = 1;
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = "{volume}% 󰖁 {icon} {format_source}";
format-muted = "{volume}% 󰖁 {format_source}";
format-source = "{volume}% ";
format-source-muted = "{volume}% 󰍭";
format-icons = {
headphone = "󰋋";
hands-free = "";
headset = "󰋎";
phone = "󰘂";
portable = "";
car = "";
default = [
"󰕿"
"󰖀"
"󰕾"
];
2024-05-17 18:50:01 +02:00
};
on-click = "pavucontrol";
min-length = 13;
};
temperature = lib.optionalAttrs (cfg.tempInfo != null) {
inherit (cfg.tempInfo) hwmon-path;
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = [
""
""
""
""
""
];
2024-05-17 18:50:01 +02:00
tooltip = false;
};
backlight = {
device = "intel_backlight";
format = "{percent}% {icon}";
format-icons = [
"󰃚"
"󰃛"
"󰃜"
"󰃝"
"󰃞"
"󰃟"
"󰃠"
];
2024-05-17 18:50:01 +02:00
min-length = 7;
};
battery = {
states.warning = 30;
states.critical = 15;
format = "{capacity}% {icon}";
format-charging = "{capacity}% 󰂄";
format-plugged = "{capacity}% 󰚥";
format-alt = "{time} {icon}";
format-icons = [
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
2024-05-17 18:50:01 +02:00
};
tray = {
icon-size = 16;
spacing = 0;
};
};
}