Start configuring dwmblocks
This commit is contained in:
parent
d7a9b529e3
commit
bafbce7ac1
5 changed files with 68 additions and 6 deletions
21
modules/hosts/t480/dwm/dwmblocks/audio.nix
Normal file
21
modules/hosts/t480/dwm/dwmblocks/audio.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
flake.modules.homeManager.gui =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "status-audio";
|
||||
|
||||
runtimeInputs = with pkgs; [ pulseaudio ];
|
||||
|
||||
text = ''
|
||||
device="$(pactl list sinks | grep -A2 "$(pactl get-default-sink)" | grep "Description:" | awk '{print $2}')"
|
||||
|
||||
test "$device" == "Dummy" && exit 0
|
||||
|
||||
echo "$device";
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue