This commit is contained in:
mjallen18
2025-09-26 20:37:09 -05:00
parent 117912045c
commit ec23a7fe14
7 changed files with 66 additions and 34 deletions

View File

@@ -0,0 +1,33 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
cfg = config.mjallen.programs.waybar;
pythonEnv = pkgs.python3.withPackages (_ps: [
pkgs.${namespace}.pipewire-python
]);
waybar-audio = pkgs.writeScriptBin "waybar-audio" ''
#!${pythonEnv}/bin/python
"""run with the special python"""
from pipewire_python.controller import Controller
audio_controller = Controller()
print(audio_controller.get_config())
print(audio_controller.get_list_targets())
'';
in
{
imports = [ ../options.nix ];
config = lib.mkIf cfg.enable {
home.packages = [ waybar-audio ];
};
}