From 269bda650d21c26a7ceda3a451d218a8be56647d Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 27 Sep 2024 22:28:02 -0700 Subject: [PATCH] pipewire-controller: module init --- .gitignore | 1 + home/audio/discord-mute.mp3 | Bin 0 -> 7358 bytes home/audio/discord-unmute.mp3 | Bin 0 -> 10284 bytes home/modules/pipewire-controller.nix | 58 +++++++++++++++++++++++++++ hosts/snowhawk/home.nix | 1 + 5 files changed, 60 insertions(+) create mode 100644 home/audio/discord-mute.mp3 create mode 100644 home/audio/discord-unmute.mp3 create mode 100644 home/modules/pipewire-controller.nix diff --git a/.gitignore b/.gitignore index 1cd791b..2e1a5c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ result/ +target/ diff --git a/home/audio/discord-mute.mp3 b/home/audio/discord-mute.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..986d99955a6028c7de0010a7058ee40bac82f19a GIT binary patch literal 7358 zcmeI0c{r4BzrdeaOqRi5Fvd34kTk|FG#L9}kTo&3v6L;Pv>8T1ldLroWl6SBB2w8W z%P0{Q$}TFuC`t=+@YcEB>-wE@UFW>-`SX1KnCE_$>v`_EKhO7jf1lfmpaBK8klXL% zWVX5G2LK4sCz_(Ar>22bQ^%@rpZ&)V`zPt2_WtXpRTw3F^UUUL0097yNC$+skl#jQ z8{=(A+jwsiy3OfrQntw1rgWS7Z92DkvCY&r%iFNG*y_n42uN7yt$UUd#;uB)&Vx^m{pg002$e=7lf-{_U_2R00sV za#juzM^F`~Hk`!(aM4Q`Qr{;w`xKiU`+S%6yMcRUXE+4S;8*S;ai($B#~W;gHhZ?N zcRJ2gp5&PKiM`?VEtbt*A*7osk0-2D9em62EC}dIH3A`a@WY~`cbElIqEC#ziS~U$ zuHG=>lvhG69lgVcG{#}@9z7Y&ogBGB6kf3ca9mP|F*ELJ32JE?0dD~~fhV;j-UQJ3 zL^-W46iq-3&vBA3!VYF}>Y?#My0Kq`nM6I52a=vUTAC{~1%=yjrM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2$eZ~}xcQmuTxgXUa!G9_N4lDBN;0oE5>1kV^GYT5Ym$DDF< z3HeyE+^+O@FaN7r?%%(7%TU3k)pa$rP18`)Z$p437~ll}%x^>g{!{+{4*&WH{0DLR B#MA%) literal 0 HcmV?d00001 diff --git a/home/audio/discord-unmute.mp3 b/home/audio/discord-unmute.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..787e6bb26978dd025223170a391dbac3a6fa4222 GIT binary patch literal 10284 zcmeI1cTiK|w)S@lAwUA5hX4|KkrIkZl>nimhN2>ZCNu%12_hm&=q;4c1QZEXP*f09 z5KE|1f(j^tpwb1g0D^)bxxu6JojK>u+&Oo?@4xSv$e@JUO`PWMv;WwzHi-Xp^xyAV2Y3gv&#*58paDRU1@N(j zVM~rJb++`_GGlB1ww&4WV9TGaaJFLDO54^Ywo2HlVe1}SEo}8}Yly9Jwiei0WsAku zb|mbWJ=ihpXl)<-l^huVk6lGpp~lLSzaRg7XKiG90?_3ypX(^BN+|#!u>b%w^V zV2FnD(V|uywGH&6t}A7d=uN`LEY{ZNU&ECinRa+WxP)$1m5iz`YOm!TQ4|GG5#7}S zQt&x~A1JRMbKNTGH4d3DXR-oaW7OUIXbXZ=>;}?-}MLfy!B1>p+ zO@6cP^CqN*VZqm+4zAljrttCJuE=wOsX}IB<2zN(CWMo(2D?-jO>Zi4Blg8E#)&{R z@jiS<48*5Zo38bq%lrBs!`ggUVZ8XBwUOmXO#I&F-vn@kvuXSWgyFci1aM5E{s8*A zS$E@gScK_QNUEOkjyuPE(^i^7%w9CY(7fXYnRj?~dE>^{q>^)qD*~+_Bsa3qcLEE7 zzp%(4?j`x^(s<{?vRX=(Q=Zp+GmjvCYF?G&Eg$yVFq7{aHWybXSZ<1S?tIu$ z$9vEuwIU~*@KO|^6D~n=t1qPontu7-2z5A7AGMLC9rg1WEm3M>(gNJnhqM|w5m0b- z)yR0&ZxL_*ecwj`QIX|niqXk2y>ZFvEnrI{aK;Mt7m=ml+bl$<_pJ%k_x8A{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lKj!9vO_rWpE13dbX*GMlWxr~C>8TT9Jt*K=q?%-B zP%!#CfuApLH>C(*2o|~#BEJ0UIfPJbW}h(C3O>PS<=N?M*-{NkhNFiOJtS=p3Nr_Y zAGZ#2?dI_Mmx=j5R=)rB(dj=v-uBQ8-zvX<14Oy}FCmOtV-n)dmA_T)KfdVy>IVP` zh-;u7sWyPCZqde@%f$x9o&g+m5T9e&R_*FSYqOAb0!5n_c5I=aKYz|NhMNv?vy9RX!k< zHDE3Gr literal 0 HcmV?d00001 diff --git a/home/modules/pipewire-controller.nix b/home/modules/pipewire-controller.nix new file mode 100644 index 0000000..6020473 --- /dev/null +++ b/home/modules/pipewire-controller.nix @@ -0,0 +1,58 @@ +{ lib, config, pkgs, ... }: + +let + cfg = config.snowhawk.pipewire-controller; + + pipewire-controller = + let + mpv = lib.getExe pkgs.mpv; + pamixer = lib.getExe pkgs.pamixer; + in + pkgs.writers.writeRustBin "pipewire-controller" { } '' + use std::{process::Command, str}; + + const MUTE_AUDIO: &str = "${../audio/discord-mute.mp3}"; + const UNMUTE_AUDIO: &str = "${../audio/discord-unmute.mp3}"; + + fn main() { + let mute_status = Command::new("${pamixer}") + .args(["--default-source", "--get-mute"]) + .output() + .expect("Unable to get mute status from pamixer") + .stdout; + + let mute_status = str::from_utf8(&mute_status[..]).expect("pamixer output wasn't a string"); + + if mute_status == "false" { + Command::new("${pamixer}") + .args(["--default-source", "--mute"]) + .output() + .expect("Unable to mute via pamixer"); + + Command::new("${mpv}") + .args(["--no-video", MUTE_AUDIO]) + .output() + .expect("Unable to play audio via mpv"); + } else { + Command::new("${pamixer}") + .args(["--default-source", "--unmute"]) + .output() + .expect("Unable to mute via pamixer"); + + Command::new("${mpv}") + .args(["--no-video", UNMUTE_AUDIO]) + .output() + .expect("Unable to play audio via mpv"); + } + } + ''; +in +{ + options.snowhawk.pipewire-controller = { + enable = lib.mkEnableOption "pipewire-controller home-manager module"; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ pipewire-controller ]; + }; +} diff --git a/hosts/snowhawk/home.nix b/hosts/snowhawk/home.nix index c7403dc..96f172e 100644 --- a/hosts/snowhawk/home.nix +++ b/hosts/snowhawk/home.nix @@ -14,6 +14,7 @@ playerctl.enable = true; alacritty.enable = true; defaultPrograms.enable = true; + pipewire-controller.enable = true; # Games xivlauncher.enable = true;