modularize waybar config, TODO: styles

This commit is contained in:
Noa Aarts 2024-04-04 00:04:41 +02:00
parent 5f5dadd292
commit 9b7b35a686
11 changed files with 170 additions and 75 deletions

21
modules/waybar/power.nix Normal file
View file

@ -0,0 +1,21 @@
{ 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
};
};
}