nixconf/modules/waybar/power.nix
2024-04-04 00:04:41 +02:00

21 lines
559 B
Nix

{ lib, config, ... }:
let
name = "custom/poweroff";
in
{
options.modules.waybar.modules = import ./addname.nix lib name;
options.modules.waybar.${name} = {
enable = lib.mkEnableOption "enable ${name} waybar module";
};
imports = [
../wofi.nix
];
config = lib.mkIf config.modules.waybar.${name}.enable {
modules.wofi.enable = true;
programs.waybar.settings.mainbar."${name}" = {
format = "";
on-click = "wofi-power";
# on-click-right = "swaylock"; # TODO: change to whatever lock screen i want
};
};
}