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

64 lines
1.9 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2021-10-22 19:45:17 +00:00
let
cfg = config.ptw.programs.waybar;
in {
options.ptw.programs.waybar = {
enable = lib.mkEnableOption "Enable and configure waybar using HomeManager";
};
2021-10-22 19:45:17 +00:00
config = lib.mkIf cfg.enable {
home-manager.users."${config.ptw.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;
2021-10-22 19:45:17 +00:00
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";
};
"pulseaudio" = {
#on-click = "${pkgs.stable.myxer}/bin/myxer";
};
};
}
];
};
2021-10-26 15:30:05 +00:00
};
2021-10-22 19:45:17 +00:00
};
}