nixos-config/modules/programs/waybar/default.nix

53 lines
1.5 KiB
Nix

{ config, pkgs, ... }:
{
home-manager.users."${config.system.singleUser}" = {
xdg.configFile."waybar/style.css".source = ./style.css;
programs.waybar = {
enable = true;
style = builtins.readFile ./style.css;
settings = [
{
output = [ "DP-2" ];
layer = "bottom";
position = "left";
gtk-layer-shell = true;
modules-left = [ "custom/applauncher" "sway/workspaces" "sway/mode" ];
modules-center = [ "clock" ];
modules-right = [ "tray" "idle_inhibitor" "pulseaudio" "custom/notifications" "custom/menu" ];
modules = {
"idle_inhibitor" = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
"sway/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
"custom/applauncher" = {
format = " ";
on-click = "${pkgs.nwg-launchers}/bin/nwggrid -client";
tooltip = "false";
};
"custom/notifications" = {
format = " ";
on-click = "${pkgs.swaync}/bin/swaync-client --toggle-panel";
tooltip = "false";
};
"custom/menu" = {
format = " ";
on-click = "${pkgs.wlogout}/bin/wlogout";
tooltip = "false";
};
};
}
];
};
};
}