2021-11-01 20:33:21 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2021-10-22 19:45:17 +00:00
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
let
|
|
|
|
cfg = config.ptw.programs.waybar;
|
|
|
|
in {
|
|
|
|
options.ptw.programs.waybar = {
|
|
|
|
enable = lib.mkEnableOption "Enable and configure waybar using HomeManager";
|
2021-11-05 22:41:19 +00:00
|
|
|
output = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
example = "DP-2";
|
|
|
|
description = "The output waybar should appear on";
|
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
};
|
2021-10-22 19:45:17 +00:00
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
home-manager.users."${config.ptw.system.singleUser}" = {
|
2021-12-06 12:39:37 +00:00
|
|
|
xdg.configFile."waybar/style.css".source = lib.mkForce ./style.css;
|
2021-11-01 20:33:21 +00:00
|
|
|
programs.waybar = {
|
|
|
|
enable = true;
|
|
|
|
style = builtins.readFile ./style.css;
|
2022-07-09 16:18:15 +00:00
|
|
|
/*
|
2021-11-01 20:33:21 +00:00
|
|
|
settings = [
|
|
|
|
{
|
2021-11-05 22:41:19 +00:00
|
|
|
output = [ "${cfg.output}" ];
|
2021-11-01 20:33:21 +00:00
|
|
|
layer = "bottom";
|
2021-12-12 14:33:12 +00:00
|
|
|
position = "top";
|
2021-11-01 20:33:21 +00:00
|
|
|
gtk-layer-shell = true;
|
2021-10-22 19:45:17 +00:00
|
|
|
|
2021-11-01 20:33:21 +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" = {
|
2021-11-06 20:15:36 +00:00
|
|
|
#on-click = "${pkgs.myxer}/bin/myxer";
|
2021-11-01 20:33:21 +00:00
|
|
|
};
|
2021-10-27 17:18:11 +00:00
|
|
|
};
|
2021-11-01 20:33:21 +00:00
|
|
|
}
|
|
|
|
];
|
2022-07-09 16:18:15 +00:00
|
|
|
*/
|
2021-11-01 20:33:21 +00:00
|
|
|
};
|
2021-10-26 15:30:05 +00:00
|
|
|
};
|
2021-10-22 19:45:17 +00:00
|
|
|
};
|
|
|
|
}
|