configuration.nix/home/wm/addon/waybar/default.nix

97 lines
3.1 KiB
Nix
Raw Normal View History

2023-04-07 21:01:48 +05:30
{ config, pkgs, ... }: {
2023-03-15 22:11:59 +05:30
xdg.configFile."waybar/colors.css".source = ./colors.css;
2023-04-07 21:01:48 +05:30
programs.waybar = {
enable = true;
2023-04-08 01:25:56 +05:30
package = pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
2023-04-07 21:01:48 +05:30
systemd.enable = true;
style = ./style.css;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 28;
modules-left = [ "sway/workspaces" "wlr/workspaces" "sway/window" "hyprland/window" "sway/mode" "hyprland/submap" ];
modules-center = [ ];
modules-right = [ "tray" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock" ];
"sway/mode" = {
"format" = "{}";
2023-03-15 22:11:59 +05:30
};
2023-04-07 21:01:48 +05:30
"sway/window" = {
"tooltip" = false;
2023-03-15 22:11:59 +05:30
};
2023-04-07 21:01:48 +05:30
"idle_inhibitor" = {
"format" = "{icon}";
"format-icons" = {
"activated" = "";
"deactivated" = "";
};
"tooltip" = false;
};
"clock" = {
"tooltip" = false;
"interval" = 1;
"format" = "{:%I:%M}";
"format-alt" = "{:%d %B %Y, %A}";
};
"backlight" = {
"format" = "{icon}";
"format-icons" = [ "" "" "" "" ];
};
"battery" = {
"states" = {
"good" = 90;
"warning" = 20;
"critical" = 10;
};
"format" = "{icon}";
"format-alt" = "{icon} {capacity}% ({time})";
"format-charging" = " {capacity}%";
"format-plugged" = " {capacity}%";
"format-icons" = [ "" "" "" "" "" "" "" "" "" "" "" ];
"tooltip" = false;
};
"network" = {
"format-wifi" = "";
"format-ethernet" = "";
"format-linked" = "";
"format-disconnected" = "";
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
"tooltip" = false;
};
"pulseaudio" = {
"tooltip" = false;
"format" = "{icon} {format_source}";
"format-muted" = " {format_source}";
"format-bluetooth" = " {icon} {format_source}";
"format-bluetooth-muted" = " {format_source}";
"format-source" = "";
"format-source-muted" = "";
"format-icons" = {
"headphones" = "";
"handsfree" = "";
"headset" = "";
"phone" = "";
"portable" = "";
"car" = "";
"default" = [ "" "奔" "" ];
};
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
};
"bluetooth" = {
"format" = "";
"format-connected" = "";
"format-disabled" = "";
"format-off" = "";
"format-connected-battery" = " {device_battery_percentage}%";
"on-click" = "${pkgs.blueman}/bin/blueman-manager";
};
"tray" = {
"spacing" = 4;
2023-03-15 22:11:59 +05:30
};
};
};
};
}